1

I am trying to implement a Rotation matrix showing that intrinsic rotations equal extrinsic rotations, with a simple reordering of matrix arguments and angles.

From wikipedia, "Any extrinsic rotation is equivalent to an intrinsic rotation by the same angles but with inverted order of elemental rotations, and vice versa."

Let $Rx$,$Ry$,$Rz$ be the common Rotation matrices given in the literature and wiki link.

Let $\alpha$, $\beta$,$\gamma$ be the angles by which the Rotations are rotated about the axes.

Suppose I use a Z-X-Z extrinsic convention. Then I have $R$ = $Rz(\gamma$)$Rx(\beta$)$Rz(\alpha$). Physically, this means I Rotate an object in the order,starting from the rightmost angle to the left and get a resulting Rotation matrix, $R$.

If I then use a z-x'-z'' intrinsic convention, I would swap angles and get $R$ =$Rz(\alpha$)$Rx(\beta$)$Rz(\gamma$). Meaning, on the intrinsic (movable) axis, I start rotating by the $\gamma$ angle about the $Zaxis$ and continue to the left.

My understanding is both Rotations should be mathematically equivalent.

Yet when I try to use concrete values like ($\alpha$,$\beta$,$\gamma$) = (45,30,15) degrees, respectively, I get two different answers depending on the method.

Running the models in R I get for Extrinsic:

> round(Rz(D2R(angles[3]))%*%Rx(D2R(angles[2]))%*%Rz(D2R(angles[1])),4)
>       [,1]    [,2]    [,3]
> [1,] 0.5245 -0.8415  0.1294
> [2,] 0.7745  0.4085 -0.4830
> [3,] 0.3536  0.3536  0.8660

Intrinsic:

> round(Rz(D2R(angles[1]))%*%Rx(D2R(angles[2]))%*%Rz(D2R(angles[3])),4)
>       [,1]    [,2]    [,3]
> [1,] 0.5245 -0.7745  0.3536
> [2,] 0.8415  0.4085 -0.3536
> [3,] 0.1294  0.4830  0.8660

Note that the Rotations are not equivalent, but similar. If I transpose the Intrinsic result, they are even closer -- the absolute values are exact.

> round(t(Rz(D2R(angles[1]))%*%Rx(D2R(angles[2]))%*%Rz(D2R(angles[3]))),4)
         [,1]    [,2]   [,3]
  [1,]  0.5245  0.8415 0.1294
  [2,] -0.7745  0.4085 0.4830
  [3,]  0.3536 -0.3536 0.8660

Even though the values are correct, now the signs are wrong. If I lastly convert the angles to negative values, the answers line up perfectly.

> round(t(Rz(D2R(-angles[1]))%*%Rx(D2R(-angles[2]))%*%Rz(D2R(-angles[3]))),4)
        [,1]    [,2]    [,3]
 [1,] 0.5245 -0.8415  0.1294
 [2,] 0.7745  0.4085 -0.4830
 [3,] 0.3536  0.3536  0.8660

So, concretely, the Rotation matrices will be equal if I equate

$Rz(\gamma$)$Rx(\beta$)$Rz(\alpha$) = ($Rz(-\alpha$)$Rx(-\beta$)$Rz(-\gamma$))$^T$

Extrinsic being the left side, and intrinsic being the right. I've looked high and low in the literature and questions here, but i still don't understand why this is the case, and have not found any concrete examples that show this. I have seen some examples showing to invert or transpose one frame to get the other, but nothing about negative angles. Can someone explain why this is true?

*D2R in my code is just a function to convert degrees to radians.

edit. I should also add that I"m aware the negative angles alone imply clockwise (lefthand) rotation. I still don't get the equivalence of intrinsic to extrinsic though.

pat
  • 111

1 Answers1

2

I think the reason you are having difficulty is because you do not know how to represent the $x'$ or $z''$ rotations in matrix notation.

A single rotation matrix takes a set of $(x,y,z)$ coordinates for one point $P$ in a particular fixed coordinate system and gives you a set of $(x,y,z)$ coordinates for a (usually different) point $P'$ in the same fixed coordinate system, namely the point $P'$ to which the rotation would move an object at point $P$. In some applications the fixed coordinate system is called the "world" coordinates.

The rotation matrices you can obtain by plugging in various angles $\theta$ and $\phi$ in $R_x(\theta)$ and $R_z(\phi)$ will always represent rotations around the "world" $x$ and $z$ axes, never around the "body" axes $x'$ or $z''$ except in the cases where those axes happen to coincide with the world axes (which happens when the previous intrinsic rotation angles are zero).

In order to perform a rotation around the $x'$ axis in general you need a way to perform a rotation around an arbitrary axis in the $x,y$ plane. One way to do this is to rotate the arbitrary axis back onto the world $x$ axis (which you can do via an $R_z$ matrix), rotate things around the world $x$ axis (via an $R_x$ matrix), and then undo the first rotation (via another $R_z$ matrix). You can multiply these matrices together to get a single matrix that represents the rotation around the desired axis, although the form of that matrix is (typically) not equal to any $R_x,$ $R_y,$ or $R_z$ matrix.

Likewise to rotate around the $z''$ axis, you can rotate the $z''$ axis back to the $z$ axis, perform your rotation there, and then undo the first rotation.

A more detailed explanation of this, showing how the complete matrix multiplication for the intrinsic rotations produces the same composed rotation matrix as the matrix multiplication for the extrinsic rotations, is given in this answer.


By the way, while you can get the inverse of a world-axis rotation by changing the sign of the angle (for example, from $R_z(\alpha)$ to $R_z(-\alpha)$), you can also get an inverse of a rotation by transposing the rotation matrix. That is, $$ R_z(-\alpha) = R_z(\alpha)^T. $$

Now observe that \begin{align} (R_z(-\alpha)R_x(-\beta)R_z(-\gamma))^T &= (R_z(-\gamma))^T (R_x(-\beta))^T (R_z(-\alpha))^T \\ &= R_z(\gamma)R_x(\beta)R_z(\alpha), \end{align}

which is the identity formula you confirmed at the end of your question.

David K
  • 98,388