# Large horizontal gap between my align equations

I wanted to show how a bijection works and so created equations below:

\begin{align*}
x_1 &  \longmapsto &y_1 \\
x_2 &  \longmapsto &y_2 \\
& \vdots & \\
x_n &  \longmapsto &y_n
\end{align*}


However there is a large gap between my arrows and my y's. Can anyone help me reduce this so that the space between x and the arrow is the same as the gap between y and the arrow?

• Welcome to TeX.SX! Remove the second & in each line. – egreg Apr 18 '14 at 15:25

You're probably mistaken by the syntax of eqnarray; you need just one & per line.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
x_1 &  \mapsto y_1 \\
x_2 &  \mapsto y_2 \\
& \;\;\vdots \\
x_n &  \mapsto y_n
\end{align*}
\end{document}


• Ah thank you! That is such a big help. It seems obvious now that you point it out but I was trying to figure out how to sort it for ages. – Will Apr 18 '14 at 18:01