Push a stuck cart at an angle and only part of your effort moves it forward. The rest presses it into the ground or pushes it sideways. The dot product measures exactly how much of one vector points along another, and that single number turns out to answer questions about angles, shadows, right angles and work.
Key terms
Dot product
Definition The dot product of and is the real number
For all vectors , , and every real number it satisfies
The same formula with two components defines the dot product in the plane.
In plain words Multiply matching components and add. The answer is a number, not a vector.
Example For and ,
Length from the dot product
Definition For every vector ,
so . In particular , with equality only when .
In plain words Dotting a vector with itself gives its length squared. This is how lengths get into dot product calculations.
Example For , , so . Expanding with the rules above also gives a useful identity,
Angle between vectors
Definition Let and be nonzero vectors, and let be the angle between them when they are drawn from a common initial point, chosen with . Then
which follows from comparing the identity above with the law of cosines in the triangle with sides , and . Solving for the angle,
The range of arccos is exactly the range of possible angles. For the zero vector no angle is defined.
In plain words The dot product is large and positive when the vectors point roughly the same way, zero at a right angle, and negative when they point roughly opposite ways.
Example The face diagonals and of the unit cube give and , so
That makes sense, since together with these diagonals form an equilateral triangle.
Orthogonality
Definition Two vectors and are orthogonal when . For nonzero vectors this happens exactly when , that is when and the vectors are perpendicular. By this definition the zero vector is orthogonal to every vector.
In plain words A zero dot product is the test for a right angle. No angle needs to be computed.
Example The vectors and are orthogonal, since . To make orthogonal to , solve , which gives .
Direction cosines
Definition For a nonzero vector , the direction angles , , in are the angles that makes with , and . Their cosines, the direction cosines, are
They are the components of the unit vector , so
In plain words The direction cosines say how much a direction leans toward each axis. Together they are just the unit vector in that direction.
Example For the length is , so the direction cosines are , and . Their squares add to . The angle with the axis is , so this vector points steeply upward.
Scalar and vector projection
Definition Let . The scalar projection of onto and the vector projection of onto are
The scalar projection equals when and is negative when the angle is obtuse. The remainder is orthogonal to , so splits into a part parallel to and a part perpendicular to it.
In plain words Shine a light straight down onto the line of . The shadow of is the vector projection, and its signed length is the scalar projection.
Example Project onto . Here and , so
The remainder has dot product with , as it should. Its length is the distance from the point to the line through the origin in the direction of .
Work
Definition If a constant force acts on an object that moves in a straight line from to , the work done by the force is
where is the angle between the force and the displacement. With force in newtons and distance in meters, work is in joules (J). Forces that vary, or paths that curve, need line integrals, which come later in the course.
In plain words Only the part of the force along the motion does work. A force at a right angle to the motion does none, and a force against the motion does negative work.
Example A constant force newtons moves an object from to , in meters. The displacement is , so
The component of the force does nothing here, since the object never changes height.
Cauchy-Schwarz inequality
Definition For all vectors and ,
with equality exactly when one of the vectors is a scalar multiple of the other. For nonzero vectors it follows from the angle formula and , and it is trivial when either vector is . The inequality is what guarantees that the quotient inside arccos lies in , and it implies the triangle inequality .
In plain words The dot product can never be bigger in size than the two lengths multiplied together. It reaches that size only when the vectors lie along one line.
Example For and , the dot product is , while
With instead, both sides equal .
Check yourself
- Find the angle between and , to the nearest tenth of a degree.
Show the answer
The dot product is and the lengths are and , so
- Find the vector projection of onto .
Show the answer
The dot product is and , so the projection is
- A force of newtons points in the direction of and moves an object in a straight line from the origin to , in meters. How much work does it do?
Show the answer
The force is , and the displacement is , so