Centering in the \align* environment

I'm using the \align* environment from the amsmath package. How can I center one of the lines inside the environment?

In the following example, I want to the \vdots to be centered, instead of awkwardly aligned with the b above it.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
& a = (a_1, a_2) \\
& b = (b_1, b_2) \\
& \vdots \\
& z = (z_1, z_2)
\end{align*}
\end{document}

-
Do you want it centered, or under the equal sign? – Peter Grill Apr 18 '12 at 22:57
You're misusing align: try a &= (a_1,a_2) \\ and similarly for the other lines; then & \mathrel{\:\vdots} \\ will be aligned under the equals signs. – egreg Apr 18 '12 at 22:59
or since you don't seem to be aligning anything, perhaps gather: \begin{gather*} a = (a_1, a_2) \ b = (b_1, b_2) \ \vdots \ z = (z_1, z_2) \end{gather*} – David Carlisle Apr 18 '12 at 23:01

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
a &= (a_1, a_2) \\
b &= (b_1, b_2) \\
&\phantom{b=\,} \vdots \\
z &= (z_1, z_2)
\end{align*}
\end{document}


-

I am sure there are plenty of ways of doing this. One of which would be to use \ooalign:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
& a = (a_1, a_2) \\
& b = (b_1, b_2) \\
& \vdots \\
& z = (z_1, z_2)
\end{align*}

\begin{align*}
a &= (a_1, a_2) \\
b &= (b_1, b_2) \\
\makebox[0pt][l]{%
\vphantom{$\vdots$}% For height
\ooalign{\phantom{$a=(a_1, a_2)$}\cr\hss$\vdots$\hss}}% Centered \vdots
\phantom{a}% For placement
& \\
z &= (z_1, z_2)
\end{align*}
\end{document}​

-

If you want to center the points unter the equal signs, then you should consider the package mathtools, which provides several corrections for and additions to amsmath.

\usepackage{mathtools}


It also provides a comfortable solution for your problem. You can even choose between a normal (\vdotswithin) and a short (\shortvdotswithin) distance.

\begin{align*}
a &= b \\
& \vdotswithin{=} \\
& = c \\
\shortvdotswithin{=}
& = d
\end{align*}


The result convinces.

More details can be found in the documentation of the package, section "Centered \vdots", where also the example above is taken from.

-