# Align vdots in equation

I want my vdots to fall under the expressions and not at the end as its now. I found solutions online for equations by using &=, but this is not applicable for me because I don't use the equal sign. My code is

\begin{equation*}
\begin{aligned}
(U_1^{(1)},U_2^{(1)}, \dots U_k^{(1)}) \\
(U_1^{(2)},U_2^{(2)}, \dots U_k^{(2)}) \\
\vdotswithin{=} \\
(U_1^{(N)},U_2^{(N)}, \dots U_k^{(N)})
\end{aligned}
\end{equation*}


How can I change this??

The ampersand symbol (&) is not limited to being used in conjunction with the equals sign.

Try this:

     \begin{align*}
(U_1^{(1)},U_2^{(1)}, &\dots U_k^{(1)}) \\
(U_1^{(2)},U_2^{(2)}, &\dots U_k^{(2)}) \\
& \vdots \\
(U_1^{(N)},U_2^{(N)}, &\dots U_k^{(N)})
\end{align*}


which produces this: You can place the & symbol wherever you want the alignment to occur.

• Thank you. I've used &= so many times and always believed it had to be used together. So many new possibilities opened up now. Apr 3, 2016 at 16:50

Use this for an automatic placement (and a simpler code):

\documentclass[border=2pt]{book}
\usepackage{mathtools}

\begin{document}

\begin{align*}
(U_1^{(1)},U_2^{(1)}, & \dots U_k^{(1)}) \\
(U_1^{(2)},U_2^{(2)}, & \dots, U_k^{(2)}) \\[-0.5ex]
& \vdotswithin{ \dots } \\[-0.5ex] % change the 120 mu value for appropriate position
(U_1^{(N)},U_2^{(N)}, & \dots, U_k^{(N)})
\end{align*}

\end{document} • This is the correct answer. I remove an unnecessary space ;) There's also \shortvdotswithin if anyone prefers it. Apr 6, 2016 at 13:33
• shortvdots withingives a bad vertical spacing for me (too tight above, too large below), but maybe I miss something. Apr 6, 2016 at 14:25

If you want the vertical dots to be horizontally centred under the equations, rather than being aligned with any particular alignment point, then the environment you need is not {align*} or {aligned}, but rather {gather*}, another one of the displayed equation structures offered by the amsmath package:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
(U_1^{(1)},U_2^{(1)}, \dots U_k^{(1)}) \\
(U_1^{(2)},U_2^{(2)}, \dots U_k^{(2)}) \\
\vdots \\
(U_1^{(N)},U_2^{(N)}, \dots U_k^{(N)})
\end{gather*}
\end{document}

• For novice users of the math environments of the amsmath package, you may want to add that with the gather and gather* environments, all rows will be centered, not just the row that contains the \vdots instruction.
– Mico
Apr 6, 2016 at 14:51

If you're going to use an environment such as align, you should provide indications where the alignment should take place. No natural optimal alignment point appears to be available, so I suggest you make the first , (comma) the common alignment point. Your \vdotswithin{=} directive seems to be a bit out of place, as there is no = symbol to align on. I suggest you use a simple &\vdots construct instead.

Separately, there seems to be no need to nest an aligned environment inside an equation* environment; I suggest you use a single align* environment instead. \documentclass{article}
\usepackage{amsmath} % for 'align*' environment
\begin{document}
\begin{align*}
(U_1^{(1)}&,U_2^{(1)}, \dots, U_k^{(1)}) \\
(U_1^{(2)}&,U_2^{(2)}, \dots, U_k^{(2)}) \\
&\vdots \\
(U_1^{(N)}&,U_2^{(N)}, \dots, U_k^{(N)})
\end{align*}
\end{document}


I found a solution using \mspace command, but it requires manulally adjusting the position of \vdots.

\documentclass[border=2pt]{book}
\usepackage{mathtools}

\begin{document}
\begin{equation*}
\begin{aligned}
(U_1^{(1)},U_2^{(1)}, \dots U_k^{(1)}) \\
(U_1^{(2)},U_2^{(2)}, \dots U_k^{(2)}) \\
\vdotswithin{\mspace{120mu}} \\ % change the 120 mu value for appropriate position
(U_1^{(N)},U_2^{(N)}, \dots U_k^{(N)})
\end{aligned}
\end{equation*}
\end{document} 