Rotation matrix about an axis from the origin to (1,1,1)

In summary: R = a * R_{x'}gives me the correct answer:In summary, the transformation matrix R that describes a rotation by 120 about an axis from the origin through the point (1,1,1) is given byR = R_{z}(\frac{2 \pi}{3}). * R_{x}(2 \pi - Cos^{-1}(\frac{1}{\sqrt{3}})) * R_{z}(\frac{3 \pi}{4}).
  • #1
mjordan2nd
177
1

Homework Statement



Find the transformation matrix R that describes a rotation by 120 about an axis from the origin through the point (1,1,1). The rotation is clockwise as you look down the axis toward the origin.

Homework Equations



Rotations about the z-axis are given by

[tex]R_{z}(\alpha) = \left( \begin{array}{ccc}
cos(\alpha) & sin(\alpha) & 0 \\
-sin(\alpha) & cos(\alpha) & 0 \\
0 & 0 & 1
\end{array} \right)[/tex]

whereas rotations about the x-axis are given by

[tex]R_{x}(x) = \left( \begin{array}{ccc}
1 & 0 & 0 \\
0 & cos(x) & sin(x) \\
0 & -sin(x) & cos(x)
\end{array} \right)[/tex].

The Attempt at a Solution



My strategy in solving this problem was to rotate the coordinate system in such a way as to align the z-axis along the axis extending from the origin to (1,1,1). Once this was done, I was to rotate the system as a regular rotation in a two-dimensional x-y system.

The first rotation should be such that the x-axis is aligned perpendicular to the x-y projection of [tex]\hat{x} + \hat{y} + \hat{z}[/tex], or perpendicular to [tex]\hat{x} + \hat{y}[/tex]. This was done with a rotation about the z-axis, more specifically [tex]R_{z}(\frac{3 \pi}{4})[/tex].

I intended the second rotation to be about the x-axis to orient the z-axis as desired. Working now with primed coordinates after the previous rotation the desired axis lied in the y'-z plane. The coordinates of the original vector <1, 1, 1> in the primed system was [tex]\sqrt{2} \hat{y} + \hat{z}[/tex]. Therefore, I wanted to rotate the x-axis clockwise by [tex]Cos^{-1}(\frac{1}{\sqrt{3}})[/tex] degress. However, the way my matrices in section 2 were set up should have all rotations going counterclockwise, so I wanted my rotation matrix to be [tex]R_{x}(2 \pi - Cos^{-1}(\frac{1}{\sqrt{3}}))[/tex].

Now that the z-axis was properly aligned, I could rotate about it, so my final rotation matrix should be [tex]R_{z}(\frac{2 \pi}{3})[/tex].

If my logic is correct then the final rotation should be

[tex]R = R_{z}(\frac{2 \pi}{3}) * R_{x}(2 \pi - Cos^{-1}(\frac{1}{\sqrt{3}})) * R_{z}(\frac{3 \pi}{4})[/tex].

That said, I know my answer should be

[tex]R = \left( \begin{array}{ccc}
0 & 0 & 1 \\
1 & 0 & 0 \\
0 & 1 & 0
\end{array} \right)[/tex]

however this is not what I am getting. I am getting something very messy. Where have I gone wrong?
 
Physics news on Phys.org
  • #2
I didn't closely check the logic of your other rotations, but I didn't see anything obviously wrong when I skimmed over your post. After the 120-degree rotation about the z'' axis, I think you still need to undo the first two rotations to get back to the original coordinates.
 
  • #3
I'm not sure I understand why I need to undo the first rotations. If I'm looking for the rotation matrix which represents a series of rotations shouldn't I just multiply the individual matrices?
 
  • #4
Think about this. The point (1,1,1) lies on the axis of rotation, so it should map to itself. Your scheme, however, would map it to the z-axis.

(I tried calculating your matrices in Mathematica, and it doesn't seem to map (1,1,1) correctly. It seems your middle matrix rotates in the wrong direction.)
 
Last edited:
  • #5
I see that my second rotation did go the wrong way. After correction, however, my answer is still bogus. Forgive me if I'm wrong, it's very possible that I've completely misunderstood/forgotten the concept, but shouldn't the ultimate rotation matrix be frame independent? Shouldn't the axis of rotation be z" since in the double-primed frame the goal was to have z" be the axis of rotation?
 
  • #6
The rotation itself is coordinate-independent, but the particular matrix which represents the rotation depends on the basis/coordinates you've chosen.

Let's take the vector (1,1,1). The rotation should leave it unchanged. This is what you get when you apply the first two rotations:

[tex]R_{x'}(\theta_2)R_z(\theta_1)\begin{pmatrix} 1 \\ 1 \\ 1\end{pmatrix} = \begin{pmatrix}0 \\ 0 \\ \sqrt{3}\end{pmatrix}[/tex]

So that's what you wanted. It's lined up with the z''-axis. Now you apply the final rotation

[tex]R_{z''}(\theta_3)\begin{pmatrix}0 \\ 0 \\ \sqrt{3}\end{pmatrix} = \begin{pmatrix}0 \\ 0 \\ \sqrt{3}\end{pmatrix}[/tex]

As expected, the vector is unchanged since it lies along the axis of rotation. The thing is, you want the final answer to be (1,1,1), right? You need to transform the vector's coordinates back to be in terms of the original set of axes.
 
Last edited:
  • #7
Thank you very much, I appreciate your help. I feel as though I am very close to solving this, however the answer seems to be eluding me for some reason. On Mathematica, I have defined the following

Code:
z[a_] := {{Cos[a], Sin[a], 0}, {-Sin[a], Cos[a], 0}, {0, 0, 1}}

which is the rotation matrix function about the z-axis, and

Code:
x[a_] := {{1, 0, 0}, {0, Cos[a], Sin[a]}, {0, -Sin[a], Cos[a]}}

which is the rotation matrix function about the x-axis.

I have defined a third matrix as the dot product x.z with the desired angles plugged into the matrix functions for convenience:

Code:
a = x[ArcCos[1/Sqrt[3]]].z[3*Pi/4].

The angle of rotation about the x-axis has been corrected from above. Multiplying this with the vector (1,1,1) we arrive at the expected result:

Code:
In[16]:= a.{1, 1, 1}

Out[16]= {0,0,Sqrt[3]}

The final rotation about the z" axis also acts as it's supposed to:

Code:
In[18]:= z[2*Pi/3].(a.{1, 1, 1})

Out[18]= {0,0,Sqrt[3]}
.

I assumed, therefore, my answer was correct. However, after attempting to revert back to my original coordinate system the rotation matrix was once again bogus. The line

Code:
answer = Inverse[a].z[2*Pi/3].a

produced the following matrix:

[Tex]
\left(
\begin{array}{ccc}
-\frac{\frac{1}{2 \sqrt{6}}-\frac{\sqrt{\frac{3}{2}}}{2}}{\sqrt{6}}-\frac{1}{6} & \frac{5}{6}-\frac{\frac{1}{2 \sqrt{6}}-\frac{\sqrt{\frac{3}{2}}}{2}}{\sqrt{6}} & \sqrt{\frac{2}{3}} \left(\frac{1}{2 \sqrt{6}}-\frac{\sqrt{\frac{3}{2}}}{2}\right)+\frac{1}{3} \\
\frac{1}{3}-\frac{\frac{\sqrt{\frac{3}{2}}}{2}+\frac{1}{2 \sqrt{6}}}{\sqrt{6}} & \frac{1}{3}-\frac{\frac{\sqrt{\frac{3}{2}}}{2}+\frac{1}{2 \sqrt{6}}}{\sqrt{6}} & \sqrt{\frac{2}{3}} \left(\frac{\sqrt{\frac{3}{2}}}{2}+\frac{1}{2 \sqrt{6}}\right)+\frac{1}{3} \\
1 & 0 & 0
\end{array}
\right)[/Tex].

Attempting to undo the coordinate change through flipping the signs of the angles initially rotated and rerotating through gave me the same matrix:

Code:
z[-3*Pi/4].x[-ArcCos[1/Sqrt[3]]].z[2*Pi/3].a

[Tex]\left(
\begin{array}{ccc}
-\frac{\frac{1}{2 \sqrt{6}}-\frac{\sqrt{\frac{3}{2}}}{2}}{\sqrt{6}}-\frac{1}{6} & \frac{5}{6}-\frac{\frac{1}{2 \sqrt{6}}-\frac{\sqrt{\frac{3}{2}}}{2}}{\sqrt{6}} & \sqrt{\frac{2}{3}} \left(\frac{1}{2 \sqrt{6}}-\frac{\sqrt{\frac{3}{2}}}{2}\right)+\frac{1}{3} \\
\frac{1}{3}-\frac{\frac{\sqrt{\frac{3}{2}}}{2}+\frac{1}{2 \sqrt{6}}}{\sqrt{6}} & \frac{1}{3}-\frac{\frac{\sqrt{\frac{3}{2}}}{2}+\frac{1}{2 \sqrt{6}}}{\sqrt{6}} & \sqrt{\frac{2}{3}} \left(\frac{\sqrt{\frac{3}{2}}}{2}+\frac{1}{2 \sqrt{6}}\right)+\frac{1}{3} \\
1 & 0 & 0
\end{array}
\right)[/Tex]

Even stranger, this matrix rotated (1,1,1) as it should:

Code:
In[29]:= answer.{1, 1, 1}

Out[29]= {1, 1, 1}

I'm not sure how to proceed from here. Thanks again for your help.
 
Last edited:
  • #8
For some reason in the previous post the image of the matrices is not rendering. I do not know how to fix this. Sorry.

The following is tests.

[tex]\left(
\begin{array}{ccc}
1 & 1 & 0 \\
0 & 1 & 2 \\
1 & 1 & 1
\end{array}
\right)[/tex]

Hmm... mathematica seems to generate compatible Latex, don't know what went wrong up there. Perhaps the latex code was simply too complex.
 
  • #9
You got the right answer. Try

Code:
Simplify[answer]

in Mathematica.
 
  • #10
Wow, that's a powerful little statement there. Thank you very much for your help.
 
  • #11
I have found a way to rotate the coordinate system about any axis through the origin (given it's direction cosines or a point on it) by any angle. I had to make five rotations (had to multiply five matrices using wxMaxima) in order to get that final matrix. All five rotation were about either x, y or z axis. Checked and worked for the example mentioned above.

To find the transformation matrix for rotation by an angle 'theta' around an axis 'I' passing through the origin and a point (a, b, c), do the following steps (you can use the final result directly of course!).
Denote the coordinate column vector by X and the rotational matrix by R.

1st Rotation: Rotate about z-axis so that x, I and z are coplanar. X1 = R1 . X
2nd Rotation: Rotate about the y1-axis so that z1 coincides with I. X2 = R2 . X1
3rd Rotation: Rotate about the z2-axis by an angle theta. X3 = R3 . X2
4th Rotation: Reverse step 2. X4 = R4 . X3
5th Rotation: Reverse step 1. X5 = R5 . X4

The desired NEW coordinate system X' is itself X5. The desired total rotational matrix is R.
X' = R . X
R = R5 . R4 . R3 . R2 . R1

The matrices are attached to this comment. Make sure you extract the zip file first then click the html file.

The derivation of the final total rotational matrix is kind of complicated. I feel that there could be a more elegant way of finding it.

NOTE: I have found this result on my own without consulting any reference. I checked it and it worked. Any comment is welcomed.
 

Attachments

  • Rotational Matrix.zip
    99 KB · Views: 424

1. How do you calculate the rotation matrix about an axis from the origin to (1,1,1)?

The rotation matrix about an axis from the origin to (1,1,1) can be calculated using the Rodrigues' rotation formula, which involves the cross product of the axis and the vector being rotated. The resulting matrix will have a combination of sine and cosine terms that depend on the angle of rotation.

2. What is the purpose of a rotation matrix?

A rotation matrix is used to describe the transformation of a coordinate system from its original orientation to a new orientation. It is commonly used in 3D graphics and computer vision to rotate objects in a virtual space.

3. Can a rotation matrix be used to rotate a point/vector about an arbitrary axis?

Yes, a rotation matrix can be used to rotate a point/vector about an arbitrary axis by applying the rotation formula with the desired axis and angle of rotation. However, the resulting rotation may not be intuitive and may require additional calculations to achieve the desired rotation.

4. How does the axis of rotation affect the resulting rotation matrix?

The axis of rotation is an essential component in calculating the rotation matrix. It determines the direction of the rotation and the resulting matrix will be different for each axis. The axis also affects the orientation of the resulting rotated object in space.

5. Can a rotation matrix be used to rotate a 2D object?

Yes, a rotation matrix can be used to rotate a 2D object in a 3D space. The rotation will only occur in the 3D plane defined by the rotation axis and the object being rotated. The resulting matrix will have the same form as a 3D rotation matrix, but with the z-axis terms removed.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
561
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
725
  • Calculus and Beyond Homework Help
Replies
3
Views
914
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
799
  • Mechanical Engineering
Replies
3
Views
457
  • Calculus and Beyond Homework Help
Replies
4
Views
136
  • Calculus and Beyond Homework Help
Replies
6
Views
759
Replies
1
Views
1K
Back
Top