Table of Contents
The dot product (also called the scalar product) is a way of multiplying two vectors that produces a number (a scalar), not another vector. In the plane, it is one of the main tools for connecting geometry (angles, lengths) with algebra (coordinates, components).
In this chapter, we assume you already know what vectors in the plane are and how to add and scale them. Here we focus only on the dot product itself.
Algebraic definition in coordinates
Let $\vec{u}$ and $\vec{v}$ be vectors in the plane, written in component form as
$$
\vec{u} = \langle u_1, u_2 \rangle,\quad
\vec{v} = \langle v_1, v_2 \rangle.
$$
The dot product of $\vec{u}$ and $\vec{v}$ is defined by
$$
\vec{u} \cdot \vec{v} = u_1 v_1 + u_2 v_2.
$$
So you:
- multiply corresponding components,
- then add the results.
Example:
Let $\vec{u} = \langle 3, -2 \rangle$ and $\vec{v} = \langle 4, 5 \rangle$.
Then
$$
\vec{u} \cdot \vec{v} = 3\cdot 4 + (-2)\cdot 5 = 12 - 10 = 2.
$$
Notice that the result $2$ is just a number (a scalar), not a vector.
Length of a vector via dot product
The dot product naturally expresses the length (magnitude) of a vector. If
$$
\vec{u} = \langle u_1, u_2 \rangle,
$$
then
$$
\vec{u} \cdot \vec{u} = u_1^2 + u_2^2.
$$
The length of $\vec{u}$, usually written $|\vec{u}|$, is
$$
|\vec{u}| = \sqrt{u_1^2 + u_2^2}.
$$
Combining these, we get
$$
\vec{u} \cdot \vec{u} = |\vec{u}|^2.
$$
This identity is useful again and again.
Geometric definition and the angle between vectors
The dot product can also be described using the angle between two vectors.
Let $\vec{u}$ and $\vec{v}$ be nonzero vectors, and let $\theta$ be the angle between them, with $0 \le \theta \le \pi$. Then
$$
\vec{u} \cdot \vec{v} = |\vec{u}|\,|\vec{v}| \cos \theta.
$$
Here:
- $|\vec{u}|$ is the length of $\vec{u}$,
- $|\vec{v}|$ is the length of $\vec{v}$,
- $\theta$ is the angle from one vector to the other.
This formula connects the algebraic definition (using components) with the geometric picture (using lengths and angles).
Finding the angle from the dot product
From
$$
\vec{u} \cdot \vec{v} = |\vec{u}|\,|\vec{v}| \cos \theta,
$$
we can solve for $\cos \theta$:
$$
\cos \theta = \dfrac{\vec{u} \cdot \vec{v}}{|\vec{u}|\,|\vec{v}|}.
$$
This allows you to compute the angle between two nonzero vectors:
$$
\theta = \cos^{-1} \left( \dfrac{\vec{u} \cdot \vec{v}}{|\vec{u}|\,|\vec{v}|} \right).
$$
Example (angle between two vectors):
Let $\vec{u} = \langle 1, 2 \rangle$, $\vec{v} = \langle 2, 3 \rangle$.
- Dot product:
$$
\vec{u} \cdot \vec{v} = 1\cdot 2 + 2\cdot 3 = 2 + 6 = 8.
$$ - Lengths:
$$
|\vec{u}| = \sqrt{1^2 + 2^2} = \sqrt{5}, \quad
|\vec{v}| = \sqrt{2^2 + 3^2} = \sqrt{13}.
$$ - Cosine of angle:
$$
\cos \theta = \dfrac{8}{\sqrt{5}\,\sqrt{13}} = \dfrac{8}{\sqrt{65}}.
$$
If needed, you can approximate $\theta$ using a calculator.
Orthogonality (perpendicular vectors)
Two vectors $\vec{u}$ and $\vec{v}$ are orthogonal (perpendicular) if the angle between them is $90^\circ$ (or $\pi/2$ radians).
From the geometric definition:
- If $\theta = 90^\circ$, then $\cos \theta = 0$,
so
$$
\vec{u} \cdot \vec{v} = |\vec{u}|\,|\vec{v}| \cos \theta = 0.
$$
Conversely, if the dot product is $0$ and the vectors are not zero, the angle between them must be $90^\circ$.
So we have a simple test:
- $\vec{u}$ and $\vec{v}$ are perpendicular $\Longleftrightarrow$ $\vec{u} \cdot \vec{v} = 0$.
Example (testing perpendicularity):
Let $\vec{u} = \langle 3, 4 \rangle$ and $\vec{v} = \langle 4, -3 \rangle$.
Then
$$
\vec{u} \cdot \vec{v} = 3\cdot 4 + 4\cdot(-3) = 12 - 12 = 0.
$$
Since the dot product is zero, the vectors are perpendicular.
This idea is especially useful in analytic geometry for checking whether two line directions are perpendicular.
Basic properties of the dot product
The dot product satisfies several algebraic rules. Let $\vec{u}, \vec{v}, \vec{w}$ be vectors in the plane, and let $c$ be a scalar (a real number).
- Commutative property
$$
\vec{u} \cdot \vec{v} = \vec{v} \cdot \vec{u}.
$$ - Distributive over addition
$$
\vec{u} \cdot (\vec{v} + \vec{w}) = \vec{u} \cdot \vec{v} + \vec{u} \cdot \vec{w}.
$$ - Scalar multiplication
$$
(c\vec{u}) \cdot \vec{v} = c(\vec{u} \cdot \vec{v}) = \vec{u} \cdot (c\vec{v}).
$$ - Dot product with the zero vector
If $\vec{0}$ is the zero vector, then for any $\vec{u}$,
$$
\vec{u} \cdot \vec{0} = 0.
$$ - Nonnegativity with itself
$$
\vec{u} \cdot \vec{u} = |\vec{u}|^2 \ge 0,
$$
and $\vec{u} \cdot \vec{u} = 0$ if and only if $\vec{u} = \vec{0}$.
These properties mirror familiar rules from algebra and are heavily used in computations and proofs.
Using the dot product to project one vector onto another
The dot product also measures how much one vector points in the direction of another. This idea is captured by the projection of one vector onto another.
Let $\vec{u}$ and $\vec{v}$ be vectors with $\vec{v} \ne \vec{0}$.
The scalar projection of $\vec{u}$ onto $\vec{v}$ (also called the component of $\vec{u}$ along $\vec{v}$) is
$$
\text{comp}_{\vec{v}}(\vec{u}) = \dfrac{\vec{u} \cdot \vec{v}}{|\vec{v}|}.
$$
This is a signed length:
- positive if the angle between $\vec{u}$ and $\vec{v}$ is less than $90^\circ$,
- negative if the angle is greater than $90^\circ$.
The vector projection of $\vec{u}$ onto $\vec{v}$ is the actual vector that lies along $\vec{v}$ with that length:
$$
\text{proj}_{\vec{v}}(\vec{u}) = \left(\dfrac{\vec{u} \cdot \vec{v}}{|\vec{v}|^2}\right) \vec{v}.
$$
Here we have used the fact that $|\vec{v}|^2 = \vec{v} \cdot \vec{v}$, so you will sometimes see this written as
$$
\text{proj}_{\vec{v}}(\vec{u}) = \dfrac{\vec{u} \cdot \vec{v}}{\vec{v} \cdot \vec{v}}\,\vec{v}.
$$
Example (projection):
Let $\vec{u} = \langle 3, 1 \rangle$ and $\vec{v} = \langle 2, 0 \rangle$.
- Dot product:
$$
\vec{u} \cdot \vec{v} = 3\cdot 2 + 1\cdot 0 = 6.
$$ - $|\vec{v}|^2 = 2^2 + 0^2 = 4$.
- Vector projection:
$$
\text{proj}_{\vec{v}}(\vec{u}) = \dfrac{6}{4}\,\vec{v}
= \dfrac{3}{2}\,\langle 2,0\rangle = \langle 3,0 \rangle.
$$
So the projection of $\vec{u}$ onto the horizontal vector $\vec{v}$ is $\langle 3,0 \rangle$.
Projections show up in many geometric and physical applications, because they isolate the part of a vector in a given direction.
Sign of the dot product and relative direction
The sign of $\vec{u} \cdot \vec{v}$ tells you how the vectors are oriented relative to each other, based on the formula
$$
\vec{u} \cdot \vec{v} = |\vec{u}|\,|\vec{v}| \cos \theta.
$$
- If $\vec{u} \cdot \vec{v} > 0$ then $\cos \theta > 0$, so $0^\circ < \theta < 90^\circ$:
the vectors point generally in the same direction. - If $\vec{u} \cdot \vec{v} = 0$ then $\theta = 90^\circ$:
the vectors are perpendicular. - If $\vec{u} \cdot \vec{v} < 0$ then $\cos \theta < 0$, so $90^\circ < \theta < 180^\circ$:
the vectors point generally in opposite directions.
This makes the dot product a quick measure of “directional agreement” between two vectors.
Application example: work as a dot product
In physics, the work done by a constant force $\vec{F}$ moving an object through a displacement vector $\vec{d}$ is defined as
$$
W = \vec{F} \cdot \vec{d}.
$$
Using the geometric definition of dot product, this is also
$$
W = |\vec{F}|\,|\vec{d}| \cos \theta,
$$
where $\theta$ is the angle between the force and the displacement.
- If the force is exactly in the direction of motion ($\theta = 0^\circ$), then $\cos \theta = 1$ and $W = |\vec{F}|\,|\vec{d}|$.
- If the force is perpendicular to the motion ($\theta = 90^\circ$), then $W = 0$; the force does no work in that direction.
This is one of the classic real-world uses of the dot product.
Summary
In the plane, the dot product
- takes two vectors and outputs a scalar,
- has a coordinate formula: $\vec{u} \cdot \vec{v} = u_1 v_1 + u_2 v_2$,
- has a geometric formula: $\vec{u} \cdot \vec{v} = |\vec{u}|\,|\vec{v}| \cos \theta$,
- detects perpendicularity via $\vec{u} \cdot \vec{v} = 0$,
- expresses length via $\vec{u} \cdot \vec{u} = |\vec{u}|^2$,
- is fundamental for angles, projections, and many applications in geometry and physics.