#### 16.2.6 Dots, horizontal or vertical ¶

Ellipses are the three dots (usually three) indicating that a pattern continues.

\begin{array}{cccc}
a_{0,0}    &a_{0,1}   &a_{0,2} &\ldots \\
a_{1,0}    &\ddots                     \\
\vdots
\end{array}


LaTeX provides these.

\cdots

Horizontal ellipsis with the dots raised to the center of the line, as in ⋯. Used as: $$a_0\cdot a_1\cdots a_{n-1}$$.

\ddots

Diagonal ellipsis, ⋱. See the above array example for a usage.

\ldots
\mathellipsis
\dots

Ellipsis on the baseline, …. Used as: $$x_0,\ldots x_{n-1}$$. Another example is the above array example. Synonyms are \mathellipsis and \dots. A synonym from the amsmath package is \hdots.

You can also use this command outside of mathematical text, as in The gears, brakes, \ldots{} are all broken.

\vdots

Vertical ellipsis, ⋮. See the above array example for a usage.

The amsmath package has the command \dots to semantically mark up ellipses. This example produces two different-looking outputs for the first two uses of the \dots command.

\usepackage{amsmath}  % in preamble
...
Suppose that $$p_0, p_1, \dots, p_{n-1}$$ lists all of the primes.
Observe that $$p_0\cdot p_1 \dots \cdot p_{n-1} +1$$ is not a
multiple of any $$p_i$$.
Conclusion: there are infinitely many primes $$p_0, p_1, \dotsc$$.


In the first line LaTeX looks to the comma following \dots to determine that it should output an ellipsis on the baseline. The second line has a \cdot following \dots so LaTeX outputs an ellipsis that is on the math axis, vertically centered. However, the third usage has no follow-on character so you have to tell LaTeX what to do. You can use one of the commands: \dotsc if you need the ellipsis appropriate for a comma following, \dotsb if you need the ellipses that fits when the dots are followed by a binary operator or relation symbol, \dotsi for dots with integrals, or \dotso for others.

The \dots command from amsmath differs from the LaTeX kernel’s \dots command in another way: it outputs a thin space after the ellipsis. Furthermore, the unicode-math package automatically loads amsmath, so amsmath’s \dots may be active even when you did not explicitly load it, thus changing the output from \dots in both text and math mode.

Yet more about the ellipsis commands: when running under Unicode engines (lualatex, xelatex), LaTeX will use the Unicode ellipsis character (U+2026) in the font if it’s available; under traditional TeX engines (pdflatex, latex), it will typeset three spaced periods. Generally, the Unicode single-character ellipsis has almost no space between the three periods, while the spacing of the non-Unicode ellipsis is looser, more in accordance with traditional typography.