Cross Product in LaTeX: Vector Notation and Symbols

Date Published

Cross Product in LaTeX: Vector Notation and Symbols

Cross Product in LaTeX

Write cross products and vector operations correctly in LaTeX.

Quick answer: In math mode, the dot product is \vec{a} \cdot \vec{b} and the cross product (vector product) is \vec{a} \times \vec{b}. Write a vector as \vec{v} (arrow) or \mathbf{v} (bold), a unit vector as \hat{n}, and a magnitude as \lVert \vec{v} \rVert (amsmath). With the physics package you can also write \vb{a} \vdot \vb{b} and \vb{a} \cross \vb{b}.

Dot Product in LaTeX and Cross Product in LaTeX: Copy-Ready Snippet

This complete document compiles as is and shows the most-searched vector commands: the dot product, the cross product, vector notation, magnitude, the physics package shortcuts and the determinant form of the cross product.

1\documentclass{article}
2\usepackage{amsmath} % \boldsymbol, \lVert ... \rVert, vmatrix
3\usepackage{physics} % optional: \vb, \vdot, \cross
4\begin{document}
5Dot product: $\vec{a} \cdot \vec{b} = a_1 b_1 + a_2 b_2 + a_3 b_3$
6
7Cross product: $\vec{a} \times \vec{b}$
8
9Vectors: $\vec{v}$, $\mathbf{v}$, $\boldsymbol{\omega}$, unit vector $\hat{n}$, $\overrightarrow{AB}$
10
11Magnitude: $\lVert \vec{v} \rVert$ or $|\vec{v}|$
12
13physics package: $\vb{a} \vdot \vb{b}$ and $\vb{a} \cross \vb{b}$
14
15\[
16\vec{a} \times \vec{b} =
17\begin{vmatrix}
18 \hat{i} & \hat{j} & \hat{k} \\
19 a_1 & a_2 & a_3 \\
20 b_1 & b_2 & b_3
21\end{vmatrix}
22\]
23\end{document}

Try this in Octree — free LaTeX editor with AI, compiles in your browser

You want

LaTeX

Package

Dot product a · b

\vec{a} \cdot \vec{b}

none

Cross product a × b

\vec{a} \times \vec{b}

none

Vector with arrow

\vec{v}

none

Bold vector

\mathbf{v} or \boldsymbol{\omega}

amsmath for \boldsymbol

Long arrow over two letters

\overrightarrow{AB}

none

Unit vector

\hat{n}

none

Magnitude (norm)

\lVert \vec{v} \rVert

amsmath

Dot / cross shortcuts

\vb{a} \vdot \vb{b}, \vb{a} \cross \vb{b}

physics

Vectors in LaTeX: Arrow, Bold and Unit Vector Notation

Vectors in LaTeX are usually written with an arrow, \vec{v}, in school and physics texts, and in bold, \mathbf{v}, in most journals. \mathbf only bolds Latin letters, so use \boldsymbol{\omega} (amsmath) for Greek vectors. For a vector between two points, \overrightarrow{AB} stretches the arrow over both letters, and the esvect package gives a nicer arrow with \vv{AB}. The sections below show each style and the symbols used with them.

Cross Product Symbol

Standard Cross (\times)

$\vec{A} \times \vec{B}$

This is the most common notation for cross product.

Alternative: \wedge (Wedge Product)

$\vec{A} \wedge \vec{B}$

Used in differential geometry and exterior algebra.

Vector Notation

Arrow Over Vector

$\vec{v}$

Bold Vector

$\mathbf{v}$

Bold with Arrow (for emphasis)

$\boldsymbol{\vec{v}}$

Cross Product Formulas

Basic Definition

$\vec{A} \times \vec{B} = |\vec{A}||\vec{B}|\sin\theta \, \hat{n}$

Component Form

$\vec{A} \times \vec{B} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ A_x & A_y & A_z \\ B_x & B_y & B_z \end{vmatrix}$

Expanded Form

$\vec{A} \times \vec{B} = (A_y B_z - A_z B_y)\hat{i} - (A_x B_z - A_z B_x)\hat{j} + (A_x B_y - A_y B_x)\hat{k}$

Related Symbols

Dot Product

$\vec{A} \cdot \vec{B}$

Tensor Product

$\vec{A} \otimes \vec{B}$

Magnitude

$|\vec{A}|$ or $\|\vec{A}\|$

Unit Vectors

Cartesian

$\hat{i}, \hat{j}, \hat{k}$ or $\hat{x}, \hat{y}, \hat{z}$

General Unit Vector

$\hat{n}$ or $\hat{e}$

Physics Examples

Torque

$\vec{\tau} = \vec{r} \times \vec{F}$

Magnetic Force

$\vec{F} = q\vec{v} \times \vec{B}$

Angular Momentum

$\vec{L} = \vec{r} \times \vec{p}$

Poynting Vector

$\vec{S} = \frac{1}{\mu_0}\vec{E} \times \vec{B}$

Cross Product Properties

Anti-commutative

$\vec{A} \times \vec{B} = -\vec{B} \times \vec{A}$

Distributive

$\vec{A} \times (\vec{B} + \vec{C}) = \vec{A} \times \vec{B} + \vec{A} \times \vec{C}$

With Scalar

$(c\vec{A}) \times \vec{B} = c(\vec{A} \times \vec{B})$

Parallel Vectors

$\vec{A} \times \vec{A} = \vec{0}$

Triple Products

Scalar Triple Product

$\vec{A} \cdot (\vec{B} \times \vec{C})$

Vector Triple Product

$\vec{A} \times (\vec{B} \times \vec{C})$

BAC-CAB Rule

$\vec{A} \times (\vec{B} \times \vec{C}) = \vec{B}(\vec{A} \cdot \vec{C}) - \vec{C}(\vec{A} \cdot \vec{B})$

Packages for Vectors

physics Package

\usepackage{physics}

Provides: \vb{v} for bold vectors, \cross for cross product

$\vb{A} \cross \vb{B}$

esvect Package

\usepackage{esvect}

Better vector arrows: $\vv{AB}$

Common Errors with the Dot Product and Cross Product in LaTeX

1. ! Undefined control sequence for \vb, \vdot or \cross. These commands come from the physics package. Fix: add \usepackage{physics} to the preamble, or write the plain form \mathbf{a} \cdot \mathbf{b} and \mathbf{a} \times \mathbf{b}, which needs no package.

2. Using \dot instead of \cdot. \dot{a} puts a dot above the letter (the time derivative ȧ); it is not a multiplication sign. Fix: the dot product is \vec{a} \cdot \vec{b}. Avoid \bullet too; it is larger and reads as a list bullet.

3. ! Missing $ inserted. \vec, \cdot and \times only work in math mode, so typing them in a normal sentence fails. Fix: wrap the expression in dollar signs, $\vec{a} \times \vec{b}$, or put it in an equation environment.

4. Bold Greek vectors stay upright and thin. \mathbf{\omega} has no effect on Greek letters. Fix: load amsmath and use \boldsymbol{\omega}, or \vb*{\omega} with the physics package.

Related symbols and guides

Dot Product and Cross Product in LaTeX: FAQ

How do you write the dot product in LaTeX?

Use \cdot between the vectors in math mode: $\vec{a} \cdot \vec{b}$ or $\mathbf{a} \cdot \mathbf{b}$. With the physics package, $\vb{a} \vdot \vb{b}$ gives the same result.

How do you write the cross product in LaTeX?

Use \times: $\vec{a} \times \vec{b}$. The physics package adds \cross (also \cp). For the determinant form, put \hat{i}, \hat{j}, \hat{k} in the first row of a vmatrix (amsmath).

What is the LaTeX symbol for the vector product?

The vector product is the cross product, written with \times (×). In exterior algebra the wedge product \wedge (∧) plays a similar role, and \otimes (⊗) is the tensor (outer) product.

How do you write a vector in LaTeX?

Use \vec{v} for an arrow, \mathbf{v} for bold, \boldsymbol{\omega} for bold Greek letters (amsmath) and \hat{n} for a unit vector. Column vectors are written as a matrix: \begin{pmatrix} x \\ y \\ z \end{pmatrix} (amsmath).

What is the difference between \cdot and \times in LaTeX?

\cdot is a centered dot (·) for the dot (scalar) product and ordinary multiplication; \times is the cross (×) for the cross product, dimensions such as 3 × 4 and scientific notation. For more LaTeX math layout, see the LaTeX matrices guide.

Write Physics with Octree

Octree simplifies vector notation:

- Smart autocomplete for symbols - AI suggests correct notation - Real-time preview - Export publication-ready PDFs

Try it at https://useoctree.com

Try this in Octree — free LaTeX editor with AI, compiles in your browser