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)
Visualization

Definition

The dot product multiplies two vectors together and gives a single number (scalar): multiply matching components, then add them all up. Formally, 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). More abstractly, the dot product defines an inner product on $\mathbb{R}^n$: bilinear, symmetric, and positive definite, and 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

For $u = (3, 4)$ and $v = (1, 2)$: $u \cdot v = 3 \times 1 + 4 \times 2 = 11$, a number, not a vector. For $u = (1, 1)$ and $v = (2, 2)$: $u \cdot v = 4$, $|u| = \sqrt{2}$, $|v| = 2\sqrt{2}$, so $\cos(\theta) = 4/4 = 1$, meaning the vectors are parallel ($\theta = 0$). In $L^2([a,b])$, the inner product $\langle f,g \rangle = \int f(x)g(x)\, dx$ defines a Hilbert space, and Fourier coefficients are dot products, $c_n = \langle f, e_n \rangle$ with $e_n = e^{2\pi i n x}$.

Key Insight

The dot product tells you how much two vectors "point in the same direction"; if it is zero, the vectors are perpendicular, and the formula $u \cdot v = |u||v|\cos(\theta)$ is the foundation of the definition of angle in higher dimensions, powering vector projection: $\text{proj}_v u = (u \cdot v / |v|^2) v$. The Cauchy-Schwarz inequality $|u \cdot v| \le |u||v|$ (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.