Vectors in LaTeX: Arrows, Bold and Unit Vectors

The two competing conventions for marking a vector, why the arrow breaks on bold Greek letters, and how column vectors are built.

Vector notation is a convention, not a command: arrows, bold and underlines all mean the same thing in different houses, and a document should pick one and keep it. What varies technically is how well each mark behaves — the arrow is a fixed-width accent (Math Accents), bold needs a font switch that reaches Greek (Bold & Italic), and a column vector is really a one-column matrix (Determinant Notation).

Which one to use

Situation Write this Because
A single Latin letter
\vec{v}
Arrow accent; fixed width.
The bold convention
\mathbf{v}
Standard in physics and engineering.
A bold Greek letter
\boldsymbol{\alpha}
\mathbf leaves Greek thin.
A unit vector
\hat{u}
Hat, not arrow — see accents.
A column vector
\begin{pmatrix}
Parentheses plus rows; it is a matrix.
The magnitude
\lVert v \rVert
Named norm delimiters, not typed bars.

The commands

What Type this Renders as
Arrow accent Short and unambiguous; the standard in school and first-year texts.
\vec{v}
\vec{v}
Bold Roman The ISO convention. It only reaches Latin letters and digits, which is the trap below.
\mathbf{v}
\mathbf{v}
From two points A multi-letter label needs the wide arrow command; \vec{AB} puts a small arrow over only the A.
\overrightarrow{AB}
\overrightarrow{AB}
Unit vector A hat marks normalisation, so \hat{v} reads as v divided by its own length.
\hat{i} \quad \hat{u}
\hat{i} \quad \hat{u}
Basis expansion Components subscripted, basis symbols not — they are named objects, not variables.
\mathbf{v} = v_1\mathbf{i} + v_2\mathbf{j} + v_3\mathbf{k}
\mathbf{v} = v_1\mathbf{i} + v_2\mathbf{j} + v_3\mathbf{k}
Column vector Rounded brackets around a one-column matrix environment.
\begin{pmatrix} 3 \\ -1 \end{pmatrix}
\begin{pmatrix} 3 \\ -1 \end{pmatrix}
Magnitude Bars are ordinary absolute value; \lVert v \rVert is the norm spelling used in linear algebra.
|\vec{v}| = \sqrt{v_1^2 + v_2^2}
|\vec{v}| = \sqrt{v_1^2 + v_2^2}
Dot product A period operator, never an ASCII full stop, which sits on the baseline.
\vec{a} \cdot \vec{b}
\vec{a} \cdot \vec{b}
Cross product Reads as multiplication unless the operands make the meaning obvious.
\vec{a} \times \vec{b}
\vec{a} \times \vec{b}
Bold Greek The workaround when a Greek letter must be bold: \mathbf{\omega} silently prints it upright and thin.
\boldsymbol{\omega}
\boldsymbol{\omega}

Worked examples

Both conventions at once

\vec{F} = m\vec{a} \qquad \mathbf{F} = m\mathbf{a}
\vec{F} = m\vec{a} \qquad \mathbf{F} = m\mathbf{a}

Identical physics. Choose one per document, because switching mid-text makes a scalar look like it became a vector.

Unit vector from a vector

\hat{\mathbf{v}} = \frac{\mathbf{v}}{\|\mathbf{v}\|}
\hat{\mathbf{v}} = \frac{\mathbf{v}}{\|\mathbf{v}\|}

The double-bar norm spelled as \| rather than \lVert; both render and neither is wrong.

Component form

\vec{v} = \begin{pmatrix} 2 \\ 5 \\ -3 \end{pmatrix} = 2\mathbf{i} + 5\mathbf{j} - 3\mathbf{k}
\vec{v} = \begin{pmatrix} 2 \\ 5 \\ -3 \end{pmatrix} = 2\mathbf{i} + 5\mathbf{j} - 3\mathbf{k}

Column and basis-expansion notation side by side, which is how most worked answers present a result.

Product giving a scalar

\vec{a} \cdot \vec{b} = |\vec{a}||\vec{b}|\cos\theta
\vec{a} \cdot \vec{b} = |\vec{a}||\vec{b}|\cos\theta

The theta here is the angle between the two, and cos must be a command or it prints as a product of three italic letters.

Common mistakes

  • \mathbf{\alpha} for a bold Greek letter. In KaTeX and in plain LaTeX this produces nothing useful; \boldsymbol{\alpha} is the command that works.
  • Writing \vec{AB} for the vector from A to B. The accent covers one glyph, so use \overrightarrow{AB}.
  • Setting velocity components as \vec{v_x}. The subscript belongs outside the accent: v_x is a scalar component, and only the bare \vec{v} carries direction.
  • Typing a . b or a * b for a dot product. Both print visibly wrong; \cdot is the operator.

Questions about this notation

Should I use \vec or \mathbf for vectors?
Whichever your context uses. Arrow notation dominates teaching material because it survives photocopying and handwriting; bold Roman is the ISO and publisher convention because it does not collide with accents such as \hat or \bar. Never mix them in one derivation.
How do I write a zero vector?
\mathbf{0} or \vec{0}, matching whatever convention the surrounding text uses for non-zero vectors. A plain 0 is ambiguous, since it also denotes the scalar zero.
Why does my column vector have no brace?
pmatrix gives rounded brackets, bmatrix square ones and Bmatrix braces. Any of them is a correct column vector; the delimiter is a house-style choice, not syntax.
How do I write a unit vector, a dot product or the magnitude of a vector?
Basis vectors take hats, and the dotted letters have dotless forms for that reason: \hat{\imath}, \hat{\jmath}. Dot product is \mathbf{a} \cdot \mathbf{b}, cross product uses \times. Magnitude is \lvert \mathbf{v} \rvert rather than a plain |v|, so it cannot be read as absolute value or as a divides sign.

Keep reading

Three ways into the same idea: the notation itself, the lesson that teaches it, and an article that applies it.