Is there any difference between mapping and function?

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.


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.


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.