## here, have some rotations

Let us suppose that someone hands us these three rotation matrices about the z, y, and x axes respectively.

## around the z-axis

Now, just what are they? Better, what do they do to vectors?

Answer: viewed as active transformations (“alibi”), they do CW rotations of vectors. The keys: active transformation, CW.

Alternatively, viewed as passive transformations (“alias”), they are attitude matrices for CCW rotations of coordinate axes. There are three keys to that answer: passive transformation, CCW, and attitude matrix. (in more general cases, one of which I will look at below, they are inverse transition matrices instead of attitude matrices.)

We are looking specifically at rotations. (how do I know that? They are orthogonal matrices with determinant +1.)

In a sense, the active transformation is more fundamental when i’m simply given a matrix. How do I know which is the old coordinate system and which is the new? “Old or new coordinate system” only makes sense for the passive interpretation, but we always have the active interpretation: applied to an old vector, the matrix gives us a new one. In this case, Rz rotates a vector CW about the z axis. That’s what it does. Its input is the old vector, its output is the new vector.

If you want, remember that a matrix has an implicit coordinate system – it’s the representation of a linear operator wrt some basis, under the active interpretation – and if we’re given the matrix then we’re given its implicit coordinate system. When we investigate a matrix by applying it to a vector, the matrix and the vector are in one coordinate system, and we are about to compute something new.

I hate the feeling that i’m beating a dead horse, but…. it’s one thing to figure out what a matrix (such as Rz) does, when I have no additional information. It’s something else entirely if someone hands me a matrix (such as Rz) and says that it’s the transition matrix.

Let’s just get on with it. We apply Rz to some vector. Here’s a choice I like. Consider Rz…

we get…for a +45° rotation… applied to a +45° vector…

=

The result of the rotation – the result of applying Rz to a 45° vector – is unambiguously a vector which lies on the x-axis. But we have two choices for “the x-axis”. Viewed as an active transformation, the rotation maps that 45° vector to the stationary x-axis, our given vector has been rotated 45° CW to lie on the old x-axis. Alternatively, viewed as a passive transformation, the x-axis has been rotated 45° CCW to lie under our stationary 45° vector. We either have old vector (1,1,0) and new vector , or we have old components (1,1,0) and new components .

Under the passive interpretation I wrote a transformation, a rotation, from old to new, so Rz is the inverse transition matrix, i.e. the attitude matrix. The rows of an attitude matrix are the (old components of) the new basis vectors, so the first row of Rz(45°) is the old components of the new x-axis:

Those are both positive, so the new x-axis is in the first quadrant. As we said, the (x and y) coordinate axes have been rotated CCW.

Rz is either the attitude matrix (inverse transition matrix) for a CCW rotation of the x and y axes (passive transformation), or it is a CW rotation of vectors about the z-axis (active transformation).

I emphasize that there is nothing sacred about my choice of signs in Rz. since my recent and current applications were to planetary orbits and airplane coordinates, my choice gives me positive angles for the customary CCW rotations of coordinate axes to get planetary and airplane coordinates. If someone says that a rotation about the z axis is given by

… well, you know enough to show that this represents either a CCW rotation of a vector, or a CW rotation of the x and y axes.

## be careful

A positive angle in my Rz specifies a CCW rotation of the coordinate axes or a CW rotation of a vector. That can be confusing because we often denote the coordinate axes by unit vectors, but rotating a basis vector is not the same as rotating the coordinate axis it lies on.

I think I was confused by that when I was an undergraduate. It seems to me that when I was first dealing with rotations, I used to try to figure out the effect of a rotation matrix by applying it to a unit vector on the x-axis. No problem so far. But I think I thought that the image of the vector would be the new x-axis. It’s hard to be sure what I was really doing all that long ago, but what i’m sure of is that more often than not, I was off by the sign of the angle.

But here’s the thing. **What a rotation does to the unit vector is not what it does to the x-axis. The active interpretation rotates the unit vector one way, while the passive interpretation rotates the x-axis the other way.**

Even today, that seems a little strange, but there it is.

## around the y or x

Similarly, for Ry(, a rotation about the y axis…

we get…for a +45° rotation… applied to a +45° vector in the xz-plane…

=

maps our test vector to the z-axis (active) or rotates our z-axis to lie under the vector (passive), i.e. we have done a CCW rotation of the x and z coordinate axes about the y-axis. Ry is the attitude matrix, and our new z-axis is given by the 3rd row of Ry:

(If you can visualize that rotation, it’s the z-axis that is rotated into the first quadrant of the xz-plane; that’s why the signs are positive in the third row of Ry instead of in the first.)

Finally, for Rx, a rotation about the x-axis…

we get… from a 45° rotation applied to a 45° vector in the yz-plane…

=

which lies on the positive y-axis, so we have rotated the y-axis CCW. Once again, Rx is an attitude matrix, and the new y-axis is given by the 2nd row:

## not a rotation

Let’s take a simple example which is not a rotation: leave x alone, double y. that is, I want a matrix whose effect on any input vector is to double the y-component. That matrix is

Applied to an arbitrary vector (a,b)… we get

Or, applying L to the basis vectors, we get its columns (1,0) and (0,2). Those are the active interpretation. What does that say about the passive interpretation?

Looking at it directly, L must be the inverse transition matrix, because L maps old to new. Then the transition matrix is

Then the attitude matrix is the transpose transition, so (although it’s trivial for a diagonal matrix)

which says what we know: the y component has doubled, so the new y basis vector – which is the second row of A – has half the length.

Instead, we could have taken that as our starting point: the y component has doubled, so the new y basis vector has half the length. The attitude matrix must be

The transition matrix is the transpose attitude (again, trivial in this case):

and then the inverse transpose matrix is…

and that is, as it should be, our original matrix L.

## mars

We discussed planetary and solar system coordinate systems just a few days ago(here), and I said I’d show you this. Bates et al gives me orbital elements for mars; what I need are

- = 49.322°,
- i = 1.85°,
- “longitude of perihelion” = 335.497°,

and they tell me that

, so .

(and the orbital elements are in bates et al. but not in prussing; the books are not substitutes for each other.)

Now, I want a rotation about z thru :

Then a rotation about x thru i:

Then a rotation about z thru :

So the combined rotation is…

(note that the order is R1, then R2, then R3.)

That’s the attitude matrix relating mars to the solar system, with the solar system as old coordinates. The third row is mars’ z-axis (wrt the solar system). it is very nearly (0,0,1), as it should be: the angle of inclination was less than 2°. Let’s draw mars’ x and y axes in red.

That makes sense. If we neglect the rotation about x thru 1.85°, then we have two rotations about z thru a combined angle of = 335°, i.e. -25°: the new x-axis was rotated CCW almost all the way around.

Next time, we’ll see how to find the axis of rotation and angle of rotation for the final rotation matrix for mars, and, conversely, how to find the rotation matrix given the axis and angle.

February 5, 2009 at 5:42 pm

Damn, this post popped up as “possibl related”, and voila – whole new blog to subscribe 🙂

February 6, 2009 at 9:35 am

Welcome.