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
\vec{v}\mathbf{v}\boldsymbol{\alpha}\mathbf leaves Greek thin.\hat{u}\begin{pmatrix}\lVert v \rVertThe commands
\vec{v}
\mathbf{v}
\vec{AB} puts a small arrow over only the A. \overrightarrow{AB}
\hat{v} reads as v divided by its own length. \hat{i} \quad \hat{u}
\mathbf{v} = v_1\mathbf{i} + v_2\mathbf{j} + v_3\mathbf{k}
\begin{pmatrix} 3 \\ -1 \end{pmatrix}
\lVert v \rVert is the norm spelling used in linear algebra. |\vec{v}| = \sqrt{v_1^2 + v_2^2}
\vec{a} \cdot \vec{b}
\vec{a} \times \vec{b}
\mathbf{\omega} silently prints it upright and thin. \boldsymbol{\omega}
Worked examples
Both conventions at once
\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}\|}
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}
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
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_xis a scalar component, and only the bare\vec{v}carries direction. - Typing
a . bora * bfor a dot product. Both print visibly wrong;\cdotis the operator.
Questions about this notation
Should I use \vec or \mathbf for vectors?
\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?
How do I write a unit vector, a dot product or the magnitude of a vector?
\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.