Loading editor...

13. Normal vectors

A rotation matrix satisfies , so its transpose is its inverse. That equality came straight from the dot products of its columns. In this chapter we lean on the same machinery to answer a very concrete question about perpendicular vectors.

Suppose you have drawn a vector perpendicular to another vector , and now you transform by a matrix into . You would like the perpendicular vector to follow along and stay perpendicular. The catch is that is usually not perpendicular to . So the question is: by what matrix should we transform so that stays perpendicular to ?


13.1 The problem

Take and attach to each , meaning a vector perpendicular to . If we transform the points by a matrix

and , the transformed pairs are no longer at right angles.


13.2 Working out the solution

We know and we want , where is the unknown matrix to apply to the normal. Writing the dot product as a matrix product and using :

Compare this last line with the fact we started from, . If we could make the middle factor disappear, the two expressions would match and would be forced to zero exactly when is. That happens precisely when

So is the inverse of the transpose of . This matrix is important enough that it has a name: it is called the inverse-transpose (or the cotangent / normal matrix in graphics, where it is exactly how surface normals are transformed).


13.3 The solution

For our matrix

transposing gives

and inverting that gives

Let's redo the experiment on the same four pairs, but this time and instead of . Now every normal meets its at a right angle again, all the way around the circle.

This is the whole point of the inverse-transpose. Whenever you transform geometry by a matrix , its normals must be transformed by to keep pointing perpendicular to the surface.

It is tempting to think a normal is "just another vector" and transform it by the same . Section 13.1 shows why that fails: stretches and shears the space, and a direction that was perpendicular before the shear is tilted afterwards. Only the inverse-transpose undoes exactly the part of that would have spoiled the right angle.

In the next chapter we turn to eigenvectors and eigenvalues, the special directions a matrix leaves unrotated, scaling them by just a number.


โ† 12. Rotations ยท 14. Eigenvectors and eigenvalues โ†’