All in a day’s work


A friend of mine is teaching engineering-type stuff at another university, and he relayed a question to me, which I think he said came from his students.  He asked me if I could prove why a certain transformation works.  After a false start in interpretation, wherein I proved that it works, which he was already convinced of and for which didn’t need any further corroboration, I think I understand the spirit of his question well enough to provide a (hopefully) satisfactory answer.  And since I will be writing the answer up anyway, I may as well blog it up here.

The problem:  You have two coordinate frames, each Cartesian, with one frame rotated and displaced relative to the other.  Let be the matrix that describes the rotation, and let be the vector that gives the displacement of the origin.  A point, , with coordinates given in the second frame (as a column vector) can be expressed in the first frame by the transformation .  If you picked the wrong direction to rotate or translate, replace with or with .  Regardless, this transformation is annoyingly affine.

The solution:  Augment with as a new column, and row filled with zeros in all entries except the last, which will be 1.  Let’s call this augmented matrix .  Append a 1 to the bottom of , too.  Let’s call that .  Now will also have a 1 in the bottom entry, and can be read off by ignoring that extra 1.  The question of whether this will work is left as an exercise to the reader; it is not difficult to convince oneself it will always work.

The puzzle:  Why does adding a dimension like this convert our transformation from one that is affine to one that is linear?

An aside, as to the engineering significance of the problem, suppose you have several rods connected by rotating joints.  If you want to know the position of the end of the last rod, relative to the base of the first rod, this kind of transformation, possibly composed several times, would be a way to determine that position.  The potential for composing the transformation several times is very good reason why it is so nice that the affine transformation can be converted to a linear one.

The justification:  Generalize the problem to the case where the direction of the displacement is fixed, but the magnitude is not.  That is, , where .  The reason for this generalization is that it makes the affine transformation we are interested in be a special case of this transformation, with , and just as importantly, this transformation is a linear combination of linear transformations!  The value of is independent of the rotation, which means we have the side effect of increasing the dimension of the transformation by 1, as seen in the solution.

A calculation analogous to the exercise above shows for this generalization, the matrix representing it is , augmented by .  This is not a square matrix, but square matrices are rather convenient, since the vector space in the codomain is the same as in the domain.  We can make it square by adding a row.  This row will be filled with zeros except the last column, which will be 1, in order to make the determinant 1.  This is exactly .  Now let’s take a look at why is what it is.  In order to translate by , is appended to instead of 1.  But as we have already seen, the transformation we are actually interested in is when .  Therefore the linearization ought to have the form prescribed by the solution.