LatexNotes

Ellipsis / dots (…) in LaTeX

\dots prints an ellipsis whose height LaTeX infers from context; \cdots gives centred dots, \vdots vertical dots and \ddots diagonal dots for matrices and long sums.

LaTeX command

\dots

Not the symbol you meant? Draw it to find the command →

Typing up handwritten notes? Convert a whole page of handwriting to LaTeX →

\dots is the general ellipsis command: in modern LaTeX it inspects the surrounding symbols and chooses low dots (like \ldots) between commas and centred dots (like \cdots) between operators such as + or =. For explicit control use \ldots for baseline dots and \cdots for vertically centred dots.

For arrays and matrices there are two more: \vdots draws three vertical dots for a column continuing downward, and \ddots draws three diagonal dots for a leading diagonal. Together with \cdots they fill out an n-by-n matrix cleanly. All four are core commands and render in KaTeX.

Choose the dots to match the neighbours. Use \cdots in a sum such as 1 + 2 + \cdots + n because the dots sit at the level of the plus signs, and \ldots in a list such as x_1, \ldots, x_n where the dots sit on the baseline with the commas. \dots is a safe default that usually picks correctly.

Other forms

\cdotscentred (⋯)
\vdotsvertical (⋮)
\ddotsdiagonal (⋱)

Examples

$1 + 2 + \cdots + n$

centred dots between operators

$x_1, x_2, \ldots, x_n$

baseline dots in a list

$a_1 + a_2 + \dots + a_n$

\dots choosing dots from context

$\begin{pmatrix} 1 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 1 \end{pmatrix}$

dots filling a matrix

Tips and common mistakes

Working from handwritten notes?

LatexNotes turns a photo or PDF of handwritten mathematics into LaTeX, graphs and all. It is built with real pdflatex before you see it, and the .tex file is yours to edit or take to Overleaf. Free to try, no sign-up.

See how handwriting to LaTeX works, step by step, or go from GoodNotes to LaTeX if you write on an iPad (Notability works the same way).

Convert your maths to LaTeX →

FAQ

What is the difference between \ldots and \cdots?

\ldots sits on the baseline, for lists separated by commas; \cdots is vertically centred, for expressions joined by operators like + or =.

How do I put dots in a matrix?

Use \cdots for a horizontal row, \vdots for a vertical column and \ddots for the diagonal, combining them to show the omitted entries.

Should I just type three dots (...)?

No. Three full stops have incorrect spacing. Use \dots, \ldots or \cdots so the ellipsis is spaced properly.

See also