2

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?

This is what I get

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

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}

enter image description here

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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