# 3 equations + vertical dots

I was googling the way of adding 3 dots between two equations, I found this question> (Vertical alignment of dots in equation)

What I want:

• Three equations.
• Between equation 2 and 3 I want 3 dots.

When I implemented their way into my equation, I got a really funny equation:

\begin{alignat}{1}
x_{0} = y + m_{0} \\
x_{1} = y + m_{1} \\
\vdotswithin{x_{1} = y + m_{1}}
x_{n} = y + m_{n}
\end{alignat}


the result:

questions:

1. how do i make these dots above the third equation and in the center?

2. why do I have to write the equation twice, once with
\vdotswithin{equation} and once without it? is there another way?

3. how do I only get equation numbers for the actual equations without the dots? because when i implement it the dots are numbered as an equation.

Edit 1: Replaying to @Thomas's answer this:

\begin{align*}
x_{0} &= y + m_{0} \\
x_{1} &= y + m_{1} \\
&\vdots\\
x_{n} &= y + m_{n}
\end{align*}


produces this:

the dots are still not aligned to the equal sign or at least the middle of the equation. How can i modify that?

• See the modified answer. Commented Apr 23, 2016 at 11:53
• You have to use &\vdotswithin{=}. Commented Apr 23, 2016 at 12:12

I think you can simplify a bit and use something like this (from the amsmath package):

\begin{align}
x_{0} &= y + m_{0} \\
x_{1} &= y + m_{1} \\
&\;\;\vdots \notag \\
x_{n} &= y + m_{n}
\end{align}


The notag command removes the equation numbering from the line with the vertical dots. I am sure there is a way of adding the exact amount of white space (equal to half the width of the equals sign) to center the dots under the =, but this does the job in a rather simple manner.

EDIT (with inspiration from Manuel's comment)

The mathtools package provides two versions of the vdotswithin command (notice the missing \\ in the short version).

\begin{align}
x_{0} &= y + m_{0} \\
&\shortvdotswithin{=}
x_{1} &= y + m_{1} \\
&\vdotswithin{=} \notag \\
x_{n} &= y + m_{n}
\end{align}


Resulting in:

You don't have to write the equation twice: you have to write the relation symbol w.r.t. which the dots will be centred. Illustration with \vdotswithin and \shortvdotswithin:

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\begin{align}
x_{0} & = y + m_{0} \\
x_{1} & = y + m_{1} \\
& \vdotswithin{ = }\notag \\
x_{n} & = y + m_{n}
\end{align}

\begin{align}
x_{0} & = y + m_{0} \\
x_{1} & = y + m_{1} \\
& \shortvdotswithin{ = }\notag \\[-3.5ex]
x_{n} & = y + m_{n}
\end{align}

\end{document}


• I am sorry for the overlap, but I was editing my answer while you posted yours so I didn't notice. What is the reason for \\[-3.5ex] after the short version? Commented Apr 23, 2016 at 12:27
• It's to get the vdots vertically centred between eqs (5) and (6) Commented Apr 23, 2016 at 12:31
• @Thomas: It seems there's a detail I hadn't seen in the use of \shortvdotswithin… I've learnt something today :o) Commented Apr 23, 2016 at 12:34
• It looks like it. Although I think including the linebreak (without adjusting space afterwards) would add to the consistency of the notation. Commented Apr 23, 2016 at 12:37
• What I couldn't find is how to change the vertical spacing in \shortvdotswithin – a little too tight for my taste. It works with a system key=value, but when I write modifications in my preamble, the compiler complains… Commented Apr 23, 2016 at 12:53

What about using an addiitonal column of &:

\begin{align*}
x_{0} &=& y + m_{0} \\
x_{1} &=& y + m_{1} \\
&\vdots& \\
x_{n} &=& y + m_{n}
\end{align*}

• The question was already answered in 2016 with the correct use of ONE alignment symbol per line. Creating an extra column in the middle of an equation would add some serious strange white space. Commented Jan 2, 2021 at 19:31