Return to the current

Vector - Latex

This article will present how to print vectors in latex.

ENFR

Symbols

Arrow notation

To print a vector, we can use the \vec command.

\vec{v}

v\vec{v}

You can also use \overrightarrow or \overleftarrow.

\overrightarrow{v}
\overleftarrow{v}

v  v\overrightarrow{v} \ \ \overleftarrow{v}

Bold notation

It is also possible to use the \mathbf command if you want to print a bold vector.

\mathbf{v}

v\mathbf{v}

Vector

If you want to print v=(v1,v2,,vn)T\mathbf{v} = (v_1, v_2, \dots, v_n)^T, the method is analogous to the matrix.

\begin{pmatrix}
v_1 \\
v_2 \\
\vdots \\
v_n
\end{pmatrix}
(v1v2vn)\begin{pmatrix} v_1 \cr v_2 \cr \vdots \cr v_n \end{pmatrix}

You can also use:

  • \begin{bmatrix} for square brackets [v1]\begin{bmatrix}v_1\end{bmatrix}.
  • \begin{Bmatrix} for double square brackets {v1}\begin{Bmatrix}v_1\end{Bmatrix}.
  • \begin{matrix} for nothing v1\begin{matrix}v_1\end{matrix}.
  • \begin{vmatrix} for vertical bars v1\begin{vmatrix}v_1\end{vmatrix}.
  • \begin{Vmatrix} for double vertical bars v1\begin{Vmatrix}v_1\end{Vmatrix}.

You may want to check the matrix article to learn how to print matrices in latex.