\mapsto maps to (↦) in LaTeX

Command\mapsto
Modemath
Packagenone, part of LaTeX
Unicode↦ U+21A6
KindArrows

\mapsto typesets the symbol “maps to” (↦). It is an arrow.

Try it

x↦x2x \mapsto x^2

Open this formula in the editor The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.

Example

\documentclass{article}
\begin{document}
\( x \mapsto x^2 \)
\end{document}

Open in the editor

Compiled with pdfLaTeX from TeX Live 2023.

How to use it

\mapsto works only in math mode. In running text, put it between $...$ or \(...\). Outside math mode LaTeX stops with Missing $ inserted. The command is part of LaTeX; you need no package.

About arrows

Arrow names are built from parts: left, right, up or down for the direction, a capital first letter for a double line, and long for a longer shaft. Arrows are spaced like relation symbols. An arrow with text above it is \xrightarrow{text} from amsmath.

More arrows

All arrows