Dot Product

Calculus & Advanced Math

The dot product of two vectors multiplies their corresponding components and adds the results, producing a scalar that encodes the angle between them.

Formula

u \cdot v = u_1v_1 + u_2v_2 + \ldots = |u||v|\cos(\theta)

Definition

The dot product multiplies two vectors together and gives a single number (scalar). Multiply matching components, then add them all up.

Example

$u = (3, 4)$ and $v = (1, 2)$: $u \cdot v = 3 \times 1 + 4 \times 2 = 3 + 8 = 11$. The answer is a number, not a vector.

Key Insight

The dot product tells you how much two vectors "point in the same direction." If it is zero, the vectors are perpendicular.

Definition

For $u = (u_1, \ldots, u_n)$ and $v = (v_1, \ldots, v_n)$: $u \cdot v = \sum u_i v_i$. Equivalently, $u \cdot v = |u||v|\cos(\theta)$, where $\theta$ is the angle between them. If $u \cdot v = 0$, the vectors are orthogonal (perpendicular).

Example

$u = (1, 0)$, $v = (0, 1)$: $u \cdot v = 0$ (perpendicular). $u = (1, 1)$, $v = (2, 2)$: $u \cdot v = 4$, $|u| = \sqrt{2}$, $|v| = 2\sqrt{2}$, $\cos(\theta) = 4/(\sqrt{2} \cdot 2\sqrt{2}) = 4/4 = 1$, so $\theta = 0$ (parallel).

Key Insight

The dot product formula $u \cdot v = |u||v|\cos(\theta)$ is the foundation of the definition of angle in higher dimensions, and powers vector projection: $\text{proj}_v u = (u \cdot v / |v|^2) v$.

Definition

The dot product defines an inner product on $\mathbb{R}^n$: bilinear, symmetric, and positive definite. An inner product space generalizes this to abstract vector spaces, enabling definitions of length, angle, and orthogonality. In quantum mechanics, the inner product $\langle \psi | \phi \rangle$ gives the probability amplitude for transitioning between states.

Example

In $L^2([a,b])$, the inner product $\langle f,g \rangle = \int f(x)g(x)\, dx$ defines a Hilbert space. Fourier coefficients are dot products: $c_n = \langle f, e_n \rangle$ where $e_n = e^{2\pi i n x}$.

Key Insight

The Cauchy-Schwarz inequality $|u \cdot v| \le |u||v|$ (with equality iff parallel) is the most fundamental inequality in inner product spaces, underlying the triangle inequality, uncertainty principles in quantum mechanics, and correlation bounds in statistics.