BLOGS WEBSITE

Rotation confusion

I had a long chat with one of the students the other day about rotation matrices. They had come up in the Engineering Physics course called Dynamics as a way of finding the components of vectors relative to rotated axes. He had some notes scrawled on a piece of paper from one of my MLC tutors, which regrettably were not actually correct for his situation. I know precisely why this happened: rotation matrices are used in both Dynamics and Maths 1B, but they are used in different ways (in fact, there are two different uses just within Maths 1B!). It’s high time I made an attempt to clear up this confusion, especially since three more students have asked me about this very issue in the last week!

In Maths 1B, you learn about Linear Transformations, which are a special kind of function that you enact upon vectors in some dimension to produce vectors in some dimension. It turns out that all linear transformations can be described by representing your vector as a column of coordinates and multiplying it by a matrix. Each linear transformation has its own matrix that works for all the vectors it acts upon. Rotations happen to be a type of linear transformation and in two dimensions there is a formula based on the angle you rotate that tells you what the matrix is. I’ve included just such a matrix in the picture here.

rotation of points before and after

One reason this works is because multiplying a matrix by your standard basis vectors of (1,0)T and (0,1)T gives you the first and second columns of your matrix respectively. But multiplying by the matrix has the same effect as the rotation transformation, so to figure out what these columns actually are, all we have to do is rotate the points (1,0) and (0,1). If you do this, then because of trigonometry, you get the two points (cos θ, sin θ) and (-sin θ, cos θ), which are indeed the columns of the matrix.

Let’s just make sure we know what’s going on here before we move on: You have a point in the 2D plane, you take its coordinates as a column, you multiply this column by the matrix, and you produce a new set of coordinates, which is a new point. So your matrix in effect moves your point from one place to another. The point with coordinates (1,0) moves to the point with coordinates (cos θ, sin θ); the point with coordinates (0,1) moves to the point with coordinates (-sin θ, cos θ).

So now we have that a rotation matrix has cos θ on the main diagonal, sin θ in the bottom left corner and – sin θ in the top right corner. And it tells you where a point moves to under a rotation of θ anticlockwise. (It’s worth noting that it also works perfectly well on the components of vectors imagined as arrows.)

The problem is that over in Dynamics, a rotation matrix does not look quite like this! In particular, the minus sign is in the opposite corner. Why?

The answer is that in Dynamics the rotation matrix is not a description of a transformation of the points or arrows themselves, but a description of how their coordinates change when you transform the coordinate axes. The points themselves don’t move at all, it’s the coordinate axes that move and we just relabel the points with new coordinates.

The reason this works is again because of the standard basis vectors. The point (1,0) has its coordinates recalculated according to the new axes, and its coordinates turn out to be (cos θ, -sin θ); while the point (0,1) also has its coordinates recalculated and its coordinates turn out to be (sin θ, cos θ).

You may notice that this is precisely what the coordinates would have been if you did rotate the points themselves, but in the opposite direction to the original rotation matrix. This makes sense. If you turn your head to match the new coordinate axes, then this is precisely what has happened. Basically, if you rotate the coordinate axes one way, the points “move” the other way relative to the axes.

And this would be the end of the story, except that in Maths 1B you also rotate coordinate axes, and yet the rotation matrix is somehow still not the same as the one in Dynamics! Why?

The reason is that in Maths 1B we rotate axes in the context of equations of curves, and this is quite a different situation from when you rotate axes in the context of the points themselves.

Imagine I have an equation which describes a curve. A point is part of the curve if its coordinates satisfy the equation, and it’s not part of the curve if its coordinates don’t satisfy the equation. But what if I relabel all the points with new coordinates according to a new set of axes? I want an equation for my curve so that a point is on the curve if its new coordinates satisfy the new equation. How do I achieve that? Well I do already have an equation, it’s just in terms of the old coordinates. So if I have a point in the new coordinates, to tell if it’s in the curve, I just need to figure out what the old coordinates are and sub them into the old equation. It ought to be possible to make one equation that encompasses both of these actions — the transferring to the old coordinate system and the subbing into the old equation.

Did you notice what happened there? In order to create an equation that described the same curve relative to the new axes, I had to begin with the new coordinates and transform them into the old coordinates. Let me repeat: I had to go from new to old. The coordinate transformation matrix in Dynamics goes from old to new. To go in the opposite direction I have to have the minus in the opposite corner.

So that’s why the matrices are different. In Dynamics you are moving the axes but not the points, and finding new coordinates for the points. In Maths 1B you are moving the points, not the axes, so the rotation appears to be in the other direction. Or alternatively in Maths 1B you are moving the axes, but you already know the new coordinates and you want the old ones, so you actually are doing the calculation in the opposite direction.

I’m glad we cleared that up!

This entry was posted in Being a good teacher, Other MLC stuff, Thoughts about maths thinking and tagged , , . Bookmark the permalink.
 

Comments are closed.