Use of $\mapsto$ and $\to$

The $\to$ arrow points from the domain of a function to its codomain or target set. The $\mapsto$ arrow (fittingly called \mapsto in TeX) shows what an individual element of the domain will be mapped to, i.e. it shows what the function does while $\to$ shows where it operates (so to say).

So, the elaborate way to write a function definition is $$f:\begin{cases}A\to B\\x\mapsto f(x)\end{cases}$$ where "$f(x)$" will typically be something like "$x^2+42$" or whatever. So, both arrows play different roles when describing the function and they are both needed to describe the function as a whole.

But note that you might have a function like $$f:\begin{cases}{\cal P}(\{1,2,3\})\to \mathbb{N}\\A\mapsto |A|\end{cases}$$ where there's a set on the left side of the $\mapsto$, so the rule isn't as easy as "$\to$ is for sets and $\mapsto$ for the rest". (As every set theorist will be eager to explain to you, everything is a set anyway...)


Two examples:

$$f_1:\begin{cases}\mathbb{R}\to \mathbb{R}\\x\mapsto x^3\end{cases} \quad\quad f_2:\begin{cases}\mathbb{N}\to \mathbb{R}\\x\mapsto x^3\end{cases}$$

Here $f_1$ and $f_2$ are different functions. They do the same thing, but on different domains.

$$g_1:\begin{cases}\mathbb{R}\to \mathbb{R}\\x\mapsto x^3\end{cases} \quad\quad g_2:\begin{cases}\mathbb{R}\to \mathbb{R}\\x\mapsto x^5\end{cases}$$

And $g_1$ and $g_2$ are again different functions. This time, they act on the same domain, but they do different things.


The difference is that $\mapsto$ denotes the function itself. Thus you need not name the function. $a\mapsto b$ fully describes the action of the function. $\to$, on the other hand, describes only the domain and codomain. Thus one might say $x\mapsto x+1$ is equivalent to $f(x)=x+1$, in which case we would say $f:\mathbb{R}\to\mathbb{R}$.


Your operative definition of $\longrightarrow$ and $\longmapsto$ are correct. In your example you are dealing with vectors in $\mathbb{R}^n$, which are elements of a set, so you should use $\longmapsto$.

see also this wikipedia article: http://en.wikipedia.org/wiki/List_of_mathematical_symbols