# 2 Rotations on different coordinate systems

1. Sep 19, 2013

### mostarac2487

I have a question that i been trying to solve which seam simple but been having trouble. Today I thought about rotation matrix and how the following problem would be solved.

Initial Coordinate system (x,y,z) a rotation is desired about x lets say α=30 degrees so that a new coordinate system is formed (x',y',z') (This is simple part just using the matrix for rotation its straight forward). But it is not clear to me how another rotation lets say about y' (β=60) would be expressed to get the expression in the initial (x,y,z).

The expression R(α)*R(β) simple gives rotation about (x,y,z), but it is desired to rotated about y' in the second rotation.

Any insight would help.

My try always give me a minus sign away. I will post what i tried when i type it out.

2. Sep 19, 2013

### D H

Staff Emeritus
What do you mean by a "rotation matrix"? Given some vector v, does your matrix represent a physical rotation of the vector v, or does it represent a means to transform the coordinate representation of v as expressed in the x,y,z frame to the representation in the x',y',z' frame? The two concepts are different. Conjugate operations. So, which of the two do *you* mean?

I'll be able to tell which scheme are using if you tell us what your rotation matrix for that +30 degree rotation about the x axis is.

3. Sep 19, 2013

### mostarac2487

Sorry your right my question was ambiguous!! Ok here is the clarification:

Image shows xy-Plane: and rotation, Let say this is a right-handed 3D coordinate system where z is coming towards us.

Now my question is: if i want to do another rotation this time about the X'-axis how would I go about doing that.

Thank you, Apologize again for the bad wording the first time. Hope its more clear this time.

#### Attached Files:

• ###### rotation.png
File size:
22.6 KB
Views:
78
4. Sep 19, 2013

### D H

Staff Emeritus
No need to apologize about the distinction between what some call "active versus passive transformations". (Wikipedia article: http://en.wikipedia.org/wiki/Active_and_passive_transformation). Lots of people don't know the distinction exists.

Aside: I'm not a fan of that particular terminology. Which is which? I like to use two different words for two different things. I use rotation versus transformation myself. A rotation matrix rotates an object, a transformation transforms coordinates.

I'm still a bit confused, though. In this last post you are apparently talking about a rotation about z following by a rotation about x'. In the first post, you talked about a rotation about x followed by a rotation about y'. So which is it?

Before I help you further, is this homework, or is this something you're trying to understand on your own? Be honest!

5. Sep 19, 2013

### mostarac2487

Yes transformation is translation and so on, Always thought that rotation is a type of transformation just like rotation or reflection, anyhow.

Well I did change up the rotation cause the picture that i found online has xy-plane; but it does not matter which axis we rotate the second time as long as its x' y' or z' well excluding the one from the first rotation.
I think it should be possible to generalize this to work with any x' y' or z', second time around.

No, this is not homework. Just was brought up at work and argument broke out what the right answer is. As it usually does, I am sure you know how engineers are.

6. Sep 19, 2013

### D H

Staff Emeritus
Okay then.

The image you posted in post #3 contains what I call a 2D transformation matrix. Given some fixed point, this matrix transforms the x,y coordinates of the point to the x',y' coordinates of the same point. Rotation and transformation in 2D are a bit boring. Let's take that to three dimensional space. The z axis is unchanged by a rotation about z, so that 2d transformation matrix becomes

$\begin{bmatrix} \phantom{-}\cos\theta & \sin\theta & 0 \\ -\sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix}$

Suppose we have two reference frames. Instead of calling them the x,y,z and x',y',z' systems, I'll denote these as reference frames A and B just to keep the labels short. Suppose there exists some vector $\vec x$. It's just a vector, an arrow in space, with no representation attached to it yet. We can express that vector as coordinates in frame A or in frame B, but regardless of representation, it's still the same vector. Let's denote these two representations as $\vec x_A$ and $\vec x_B$.

I'll start by denoting the transformation matrix that transforms the frame A representation of this vector to the frame B representation as $T_{A\to B}$. Read that as "the transformation matrix from frame A to frame B". In math, $\vec x_B = T_{A\to B} \, \vec x_A$.

Now suppose we have a third coordinate system, call it frame C, and a transformation matrix $T_{B\to C}$ that transforms from frame B to frame C: $\vec x_C = T_{B\to C} \, \vec x_B$. This is your sequence of rotations you asked about in your first post: Start with frame A, rotate the axes to get frame B, rotate again to get frame C. The question you asked in that first post is how does one construct the transformation matrix from frame A to frame C given the transformation matrices from frame A to frame B and from frame B to frame C.

We already have $\vec x_C = T_{B\to C} \, \vec x_B$ and $\vec x_B = T_{A\to B} \, \vec x_A$. Substituting the $\vec x_B$ in the latter into the former yields $\vec x_C = T_{B\to C} \, (T_{A\to B} \, \vec x_A)$. Since matrix multiplication is associative, this expression can be written as $\vec x_C = (T_{B\to C} \, T_{A\to B}) \, \vec x_A$. We want the matrix $T_{A\to C}$ such that $\vec x_C = T_{A\to C} \, \vec x_A$. Thus $T_{A\to C} \vec x_A = (T_{B\to C} \, T_{A\to B}) \, \vec x_A$. This has to be valid for all vectors $\vec x_A$, which means $T_{A\to C} = T_{B\to C} \, T_{A\to B}$.

In short, transformation matrices chain right to left. That's why your R(α)*R(β) didn't work.

Since rotation is the conjugate of transformation, rotation matrices chain left to right: $R_{A\to C} = R_{A\to B} \, R_{B\to C}$. This is a bit more intuitive than transformation matrices since you just list the rotation matrices left to right in the order the rotations are applied. The arrows help as mnemonic for rotation.

This suggests an alternative nomenclature for transformation matrices: Instead of $T_{A\to B}$, write $T_{B\gets A}$: "The transformation to frame B from frame A". With this, look at how vectors transform: $\vec x_B = T_{B\gets A} \vec x_A$. The subscript A's are right next to one another, and the subscript B's are also relatively close together. This notation also makes the chaining of transformation matrices a lot more intuitive: $T_{C\gets A} = T_{C\gets B} \, T_{B\gets A}$. Just follow the arrows from frame A to frame C, and voila!

7. Sep 19, 2013

### mostarac2487

Thank you, explanation makes sense! I tried similar logic to:

"We already have x→C=TB→Cx→B and x→B=TA→Bx→A... " but came short.

I will try a simple problem to convince myself tomorrow and will post the results!

Thanks again!

8. Sep 19, 2013

### D H

Staff Emeritus
You're welcome!