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.

NameCommandOutput
Horizontal three dotsa,\ldots ,z\text{a}, \ldots \text{,z}
Horizontal central dotsa + 1 +\cdots + n\text{a}+1+ \cdots +\text{n}
Vertical three dots\vdots\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 three dots.

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:

Horizontal central three dots.

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:

Vertical three dots in matrix.

 

Leave a Reply

Your email address will not be published. Required fields are marked *