# Is there any difference between mapping and function?

I wonder if there is any difference between mapping and a function. Somebody told me that the only difference is that mapping can be from any set to any set, but function must be from $\mathbb R$ to $\mathbb R$. But I am not ok with this answer. I need a simple way to explain the differences between mapping and function to a lay man together with some illustration (if possible).

Thanks for any help.

• I added the terminology tag. Jan 2, 2012 at 7:00

I'm afraid the person who told you that was wrong. There is no difference between a mapping and a function, they are just different terms used for the same mathematical object. Generally, I say "mapping" when I want to emphasize that what I am talking about pairing elements in one set with elements in another set, and "function" when I want to emphasize that the thing I am talking about takes input and returns output. But that's just a personal preference, and there is no convention I'm aware of.

• Mapping from any set to $\mathbb C$ or $\mathbb R$ is a function. What can you say about it? Jan 2, 2012 at 16:41
• But why Serge Lang says: A function is a special type of mapping, namely it is a mapping from a set into the set of numbers, i.e. into $\mathbb{R}$, or $\mathbb{C}$, or into a field $K$. (Serge Lang, Linear Algebra, page: 43) Oct 11, 2014 at 15:30
• Created an account just to upvote the comment from @user96402. It is important. Feb 15, 2016 at 12:48
• seems it's the definition also followed in the programming fields for the term "map". at least in object oriented languages Mar 1, 2019 at 10:40
• @Dante Can you please tell me what does C mean here? Jul 7, 2022 at 13:44

Although in most cases the words function and mapping can be used interchangeably, in several parts of mathematics differences in emphasis, especially in analysis and differential geometry. I can think of two.

First, especially in differential geometry, "mapping" is the universal word, and the word "function" is used for mappings that map to $\mathbb{R}$ or $\mathbb{C}$. Thus a mapping which maps to $\mathbb{R}^n$ for instance would not be called a function. This convention is not always adhered to (you might occasionally read about "vector-valued functions"), but this is the usual interpretation.

Second, especially in analysis, it is not uncommon to call members of $L^p$ "functions", even though they are actually equivalence classes of mappings. Again the idea is that functions should assign numbers to some objects (e.g. points in some space) in a suitable sense. Thus functions are thought of being objects studied in analysis, whereas "mapping" is thought of being a term from set theory.

• That is why we called a map to $\mathbb R$ or $\mathbb C$ FUNCTIONAL in functional analysis. Jan 2, 2012 at 16:38
• @Hassan : Not exactly. A functional usually refers to a mapping with a function space as its domain and $\Bbb R$ or $\Bbb C$ as its range. Dec 27, 2012 at 11:44
• @PatrickDaSilva: actually, in context of analysis, I've usually seen a functional to mean a linear function into the scalar field, often implied to be continuous. The meaning you refer to, I've found in context of differential equations and more closely related things than general analysis. Dec 27, 2012 at 11:57

To me, function and map mean two entirely different things. A function is just a set-theoretic construction, something that assigns to each object in a set some unique object of another set. A map, on the other hand, is a construction from category theory rather than set theory. It means more or less the same thing as morphism: a function that preserves the structure in whatever category we are working in. So a map is not just a map, it is a map of something:

• A map of groups or rings is a homomorphism
• A map of vector spaces is a linear function
• A map of topological spaces is a continuous function
• A map of smooth manifolds is a smooth function
• A map of measurable spaces is a measurable function
• A map of varieties is a morphism
• A map of sets is any function

Note that I deliberately avoided the term “map” in the predicates here. That is because the “map” parts of terms like “continuous map” and “linear map” are actually redundant; a linear map is really just a map (of vector spaces), and a continuous map is just a map (of topological spaces). Consequently, I avoid many of these redundant terms and simply say “let $f\colon X\to Y$ be a map” when it is clear from the context which category I currently think of $X$ and $Y$ as being objects of. I am particularly pleased to avoid the long and complicated term “homomorphism.”

On the other hand, I use the word “function” when I want to think of it as my object of study rather than a method of carrying structure from one object to another. Thus I would always call members of $\mathscr L^p$ spaces (which is the space of functions rather than the space $L^p$ of equivalence classes of functions) by the word “function,” even though they are measurable and hence can be thought of as maps of measurable spaces. Similarly, I would mostly call elements of polynomial rings or coordinate rings “functions” unless I am interested in some structure they preserve.

So to sum up: A map is a function preserving some structure, namely the structure of whatever category we are working in. The “function” part is just the underlying set-theoretic object, which is more or less the same thing as a map of sets. (Note, however, that I am well aware that not all people follow this convention.)

• I guess then it is ok to say that all functions are are maps but vice versa ain't plausible. Feb 28, 2023 at 12:24

Although the terms function and map are technically synonymous, in studying smooth manifolds it is often convenient to make a slight distinction between them. Throughout this book we generally reserve the term function for a map whose range is $\mathbb{R}$ (a real-valued function) or $\mathbb{R}^k$ for some $k > 1$ (a vector-valued function). The word map or mapping can mean any type of map, such as a map between arbitrary manifolds.

Not that much difference in the long run. When I use the word function I generally mean that a point maps to a single point. So, if a point might map to several points, I am not going to use that word, more likely mapping or transformation. In a recent article I had one of these, each point went to several points, and each point in the image probably had several pre-images, so I emphasized, in a traditional phrase, that the mapping was "many-to-many." Now, both primage and image were equivalence classes under a weaker equivalence, so the mapping did induce a function from "genus" to "genus," but was not well-defined on the level of isometry classes of quadratic forms.

Anyway, if a point goes to only a single point, you are allowed to call it a function.

EDIT: I see, you have finished college and are just asking about preferences. I've got to think about popularity in English... Function is used for $\mathbb C \mapsto \mathbb C,$ also maps from any smooth manifold to the reals. I might use function for almost any map into $\mathbb R^n$ from almost anything, but would be less likely to use function for a mapping between two other manifolds. Various kinds of mappings in algebra are unlikely to be called function.

• If I understand you, in a mapping one element from the domain may be map to two or more element in the co-domain? Jan 2, 2012 at 7:08
• @HassanMuhammad yes, that is absolutely correct, it does in my paper. But then, sometimes in mathematics, we switch to equivalence classes, so what we are talking about also changes. Suppose you have a group $G$ with a normal subgroup $H.$ There is a mapping taking any element $a \in G$ to all the elements $ah, \; \mbox{for} \; h \; \in H.$ On this level it is one-to-many. But then we define the quotient group $G/H,$ and suddenly we have the function $a \mapsto aH.$ Jan 2, 2012 at 7:28
• Most people use the two terms interchaningly, in particular the require mappings to map each point to a single points. For "mappings" that point one point to several, one usually speaks of corespondences, relations, or multifunctions. Jan 2, 2012 at 13:58

From P216 of Mathematical Proofs by Gary Chartrand:

By a function f from A to B, written f : A → B, we mean a relation from A to B with the property that every element a in A is the first coordinate of exactly one ordered pair in f. ...

If (a, b) ∈ f , then we write b = f (a) and refer to b as the image of a. Sometimes f is said to map a into b. Indeed, f itself is sometimes called a mapping.

A function is a relation which can be characterized as a set of ordered pairs. The set of first components is called the first domain. Every element of the first domain appears exactly once as a first component in the set of ordered pairs. The set of of second components is called the second domain. Every element of the second domain appears at least once as a second component in the set of ordered pairs.

Let $$f$$ be a relation. A function is characterized by

$$\forall_{x}\forall_{y}\forall_{z}\left(\left(xfy\land xfz\right)\implies y=z\right)$$

In each ordered pair, the second component is called the image under $$f$$ of the first component. This is typically written $$xfy\iff f\left(x\right)=y$$ when the relation is a function.

A mapping is a function whose second domain is a subset of the "target" domain. In other words, a function is always onto. A mapping is into. In either case every element of the first domain (often simply called the domain) has exactly one image element. What is typically called the range of a function is what is formally canned the second domain in the theory of relations.

By Nii: To my best understanding, mapping is just a process of matching elements of one set to elements of another set. Mapping is not a function unless some conditions are defined. Thus every mapping is a retation but not necessary a function.

• What are the "conditions"? Jan 5, 2023 at 4:52