Module 6 · Lesson 6.4
Dot Products, Cross Products & Change of Basis
Learn how the dot product turns "how aligned are these two vectors?" into a single number — and how that same question lets you translate coordinates into a new basis.
Intuition
How much does one vector point in the same direction as another? The dot product answers exactly that, collapsing the comparison into a single number: large and positive when they point the same way, zero when they're perpendicular, negative when they point opposite ways. Run that same question in reverse, and you get something surprisingly useful: a way to describe a point using a completely different set of coordinate axes.
Core concept
A vector's coordinates are really just a record of how much it aligns with each axis direction. Swap in a new pair of axes — a camera's own forward and right directions, say — and dot-producting the point against each new axis gives its coordinates in that new "language." A close cousin, the 2D cross product $u_1v_2 - u_2v_1$, measures something different: signed area instead of alignment. You've actually already seen this exact expression — it's the same $ad-bc$ pattern from the determinant in Lesson 6.2.
Interactive Lab
Slide to rotate the new basis axes (imagine them as a camera's local view directions). The fixed green point never moves in the world, but its coordinates in the rotated basis — found purely with dot products — change as the axes turn.
Key Idea
The left side is easy to compute directly from components. The right side reveals what it means geometrically: it's the two lengths multiplied together, scaled down by how misaligned the vectors are. This exact formula, applied against each new axis direction, is what performs a change of basis.
Think Further
- If two vectors are perpendicular, predict what their dot product equals, and connect that back to the $\cos\theta$ term in the formula.
- A camera's view-space transform re-expresses every world point using the camera's own forward and right directions as a new basis. Why does the dot product provide exactly the right tool for that conversion?
- In Lesson 6.2, the expression $u_1v_2 - u_2v_1$ appeared inside the determinant. Predict what that same expression tells you geometrically when read as a 2D cross product, given what you know about signed area.
Show suggested answers
- Zero. Since $\cos 90^\circ = 0$, the entire right-hand side of the formula collapses to zero regardless of the vectors' lengths — which is exactly why "dot product equals zero" is the standard test for perpendicularity.
- Dot-producting a world point against each of the camera's basis directions asks precisely "how much does this point align with this axis," which is exactly the coordinate that point should have along that axis in the camera's own frame.
- It gives the signed area of the parallelogram formed by the two vectors: positive when the second vector sits counterclockwise from the first, negative when clockwise, and zero when the vectors point in the same or opposite direction with no area between them.