Horizontal and Vertical three dots in LaTeX
In this tutorial, you will learn how to get Horizontal, Horizontal central, and Vertical three dots in LaTeX.
In the table below I have shown the command and output of all these symbols.
Name | Command | Output |
---|---|---|
Horizontal three dots | a,\ldots ,z | ![]() |
Horizontal central dots | a + 1 +\cdots + n | ![]() |
Vertical three dots | \vdots | ![]() |
Horizontal three dots in LaTeX
In order to get the best horizontal three dots in LaTeX, you need to use the \ldots
command instead of typing three dots ...
manually.
You can also use the \dots
command, the output will be similar.
\documentclass{article} \usepackage{amsmath} % To access the \text{} \begin{document} $$ \text{a},\text{b},\dots ,\text{z} $$ $$ a_{1}, a_{2},\ldots,a_{n} $$ $$ \text{a},\text{b}, . . . ,\text{z} \quad (\text{Not Recommended})$$ \end{document}
Output:
Horizontal central three dots in LaTeX
If you want a centered horizontal three dots, you can use the \cdots
command. With this command, the three dots will appear vertically in the center of the line.
\documentclass{article} \usepackage{amsmath} % To access the \text{} \begin{document} $$ \text{a}+1+2+ \cdots + (\text{n}-1) +\text{n} $$ $$ a_{1} + a_{2}+ \cdots + a_{n} $$ $$ f(x) = x+ x^{2}+ \cdots +x^{(n-1)} +x^{n} $$ \end{document}
Output:
Vertical three dots in LaTeX
To get the vertical three dots in LaTeX you can use the \vdots
command. Generally, it is used in a matrix.
\documentclass{article} \usepackage{amsmath} \begin{document} $$ \begin{bmatrix} a_{1}\\ a_{2}\\ \vdots\\ a_{n} \end{bmatrix} $$ $$ \begin{bmatrix} a_1 & \cdots & \\ \vdots & \ddots & \\ & & a_n \end{bmatrix} $$ \end{document}
Output:
Leave a Reply