The LaTeX command for mapsto (↦) is \mapsto (maps to).
\mapstoWriting a paper? The table generator and the BibTeX cleaner are one click away, no account.
Write \mapsto inside math mode, that is between $…$ for inline math or in a \[ … \] or equation block for display math. It is part of core LaTeX math, so no extra package is required.
Arrows are relations in LaTeX, so \mapsto gets the same thick spacing as an equals sign. With unicode-math under XeLaTeX or LuaLaTeX, typing ↦ in a formula gives the same symbol. Not to be confused with \to (→).
$A \mapsto B$Open this example in the live preview: it renders as you type, with no compiler and no signup.
\to (→): right arrow\rightarrow (→)\uparrow\downarrow\updownarrow\nearrow\searrow\swarrow\nwarrow\longmapsto\hookrightarrow\hookleftarrow\twoheadrightarrow\twoheadleftarrow\rightharpoonup\rightharpoondownArrows in LaTeX: the full table or search all 350+ LaTeX symbols.
Use \mapsto in math mode; it needs no extra package. For example, $A \mapsto B$.
None: \mapsto is built into LaTeX, so no extra package is required.