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.
 A: 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.
A: 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: 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.
A: 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.)
A: 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. 
A: John M. Lee, Introduction to Smooth Manifolds, 2002:
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.
A: 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.
