What's the difference between "relation", "mapping", and "function"?

I think that a mapping and function are the same; there's only a difference between a mapping and relation. But I'm confused. What's the difference between a relation and a mapping and a function?


Mathematically speaking, a mapping and a function are the same. We called the relation $$ f=\{(x,y)\in X\times Y : \text{For all $x$ there exists a unique $y$ such that $(x,y)\in f$} \} $$ a function from $X$ to $Y$, denoted by $f:X\to Y$. A mapping is just another word for a function, i.e. a relation that pairs exactly one element of $Y$ to each element of $X$.

In practice, sometime one word is preferred over another, depending on the context.

The word mapping is usually used when we want to view $f:X\to Y$ as a transformation of one object to another. For instance, a linear mapping $T:V \to W$ signifies that we want to view $T$ as a transformation of $v\in V$ to the vector $Tv\in W$. Another example is a conformal map, which transforms a domain in $\Bbb C$ to another domain.

The word function is used more often and in various contexts. For example, when we want to view $f:X\to Y$ as a graph in $X\times Y$.


There is basically no difference between mapping and function. In algebra, one uses the notion of operation which is the same as mapping or function. The notion of relation is more general. Functions are specific relations (those which are left-total and right-unique).