TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is perhaps half a math question and half a typesetting one. In what circumstances do I use \mapsto and when \rightarrow? I feel like the standard seems to be: when you're specifying the operator you use \rightarrow, but if you're just saying that one domain maps to another you use \mapsto. Is that correct?

e.g. I would say Q\times\Gamma\mapsto Q but \delta:Q\times\Gamma\rightarrow Q.

share|improve this question
up vote 29 down vote accepted

You use \mapsto to denote the actual function mapping. For example, consider the function $f:\mathbb N\to\mathbb N$ given by $f(n)=5n$. You could write that second part as $n\mapsto5n$.

share|improve this answer
See also the Wikipedia article. – Caramdir Nov 10 '10 at 1:16
The \mapsto notation is useful for talking about a function without inventing a name for it, e.g. "the map $\mathbb{R}\to \mathbb{R}$ given by $x\mapsto x^2$ is not injective". Note that \to is a nice shorthand for \rightarrow, which at the same time is more semantic. – Villemoes Nov 10 '10 at 10:36
I'd prefer using \colon instead of :; in fact I'd even more prefer $f\from\mathbb N\to\mathbb N$, with \newcommand*\from{\colon}. – Hendrik Vogt Nov 10 '10 at 14:41
@Hendrik: I like the idea of using \from. I think I've seen equal numbers of : and \colon in books (or the equivalent spacing) so I think it's just up to personal preference (or editor preference, really). I have no strong feelings on that one. – TH. Nov 11 '10 at 5:43
@TH., Is the difference only semantic, or is the visual display of the arrows actually different? – Pacerier Feb 17 '15 at 4:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.