The dot product combines two vectors into a single scalar. Unlike vector addition, the result is not another vector.
In Cartesian form, the dot product measures how much one vector points in the same direction as the other.
It is one of the most important operations in mechanics, geometry, and linear algebra.
Component formula
If two vectors are written in component form, the dot product is obtained by multiplying matching components and then adding them.
2D formula.
\[
\begin{aligned}
A \cdot B &= A_x B_x + A_y B_y
\end{aligned}
\]
3D formula.
\[
\begin{aligned}
A \cdot B &= A_x B_x + A_y B_y + A_z B_z
\end{aligned}
\]
This formula is often the quickest way to calculate the dot product when the vector components are already known.
Angle interpretation
The dot product is also related to the angle between the vectors:
Geometric dot-product formula.
\[
\begin{aligned}
A \cdot B &= |A|\,|B| \cos\theta
\end{aligned}
\]
Solving this for the angle gives
Angle formula.
\[
\begin{aligned}
\cos\theta &= \frac{A \cdot B}{|A|\,|B|} \\
\theta &= \cos^{-1}\!\left(\frac{A \cdot B}{|A|\,|B|}\right)
\end{aligned}
\]
This shows why the sign of the dot product matters:
| Sign of \(A \cdot B\) |
Angle meaning |
Interpretation |
| Positive |
\(0^\circ \le \theta < 90^\circ\) |
The vectors point partly in the same direction. |
| Zero |
\(\theta = 90^\circ\) |
The vectors are orthogonal. |
| Negative |
\(90^\circ < \theta \le 180^\circ\) |
The vectors point partly in opposite directions. |
Orthogonality
Two nonzero vectors are orthogonal when they are perpendicular. The dot product gives a direct test:
Orthogonality test.
\[
\begin{aligned}
A \cdot B &= 0
\end{aligned}
\]
This is used constantly in analytic geometry, coordinate methods, and the study of perpendicular forces or directions.
Projection
The dot product also measures how much of one vector lies along the direction of another.
The scalar projection of \(B\) onto \(A\) is
Scalar projection.
\[
\begin{aligned}
\operatorname{comp}_{A}(B) &= \frac{A \cdot B}{|A|}
\end{aligned}
\]
The corresponding projection vector is
Projection vector.
\[
\begin{aligned}
\operatorname{proj}_{A}(B) &= \frac{A \cdot B}{A \cdot A}\,A
\end{aligned}
\]
In the graph, this appears as the shadow of \(B\) on the line of \(A\).
If the projection is negative, the shadow lies in the direction opposite to \(A\).
Work interpretation
In physics, the dot product gives the work done by a force acting through a displacement:
Work formula.
\[
\begin{aligned}
W &= F \cdot d \\
&= |F|\,|d| \cos\theta
\end{aligned}
\]
Only the component of the force parallel to the displacement contributes to the work.
If the force is perpendicular to the displacement, the work is zero.
If the force points partly opposite to the displacement, the work is negative.
Worked example
Let
\(A = \langle 2,3 \rangle\)
and
\(B = \langle 4,-1 \rangle\).
Step 1. Compute the dot product.
\[
\begin{aligned}
A \cdot B &= 2\cdot 4 + 3\cdot(-1) \\
&= 8 - 3 \\
&= 5
\end{aligned}
\]
Step 2. Compute the magnitudes.
\[
\begin{aligned}
|A| &= \sqrt{2^2 + 3^2} \\
&= \sqrt{13}
\end{aligned}
\]
\[
\begin{aligned}
|B| &= \sqrt{4^2 + (-1)^2} \\
&= \sqrt{17}
\end{aligned}
\]
Step 3. Compute the angle.
\[
\begin{aligned}
\cos\theta &= \frac{5}{\sqrt{13}\sqrt{17}} \\
&\approx 0.336
\end{aligned}
\]
\[
\begin{aligned}
\theta &= \cos^{-1}(0.336) \\
&\approx 70.4^\circ
\end{aligned}
\]
Because the dot product is positive, the angle is acute. The vectors are not orthogonal.
The same value can be interpreted as work if one vector represents force and the other displacement.
Summary
| Concept |
Main relation |
Meaning |
| Dot product |
\(A \cdot B = A_xB_x + A_yB_y (+ A_zB_z)\) |
Component-by-component multiplication and sum |
| Angle formula |
\(\cos\theta = (A \cdot B)/(|A||B|)\) |
Find the angle between two nonzero vectors |
| Orthogonality |
\(A \cdot B = 0\) |
Detect perpendicular vectors |
| Projection |
\(\operatorname{proj}_{A}(B) = (A \cdot B)/(A \cdot A)\,A\) |
Shadow of one vector on another |
| Work |
\(W = F \cdot d\) |
Parallel part of force times displacement |