If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Linear algebra>Unit 2

Lesson 2: Linear transformation examples

# Rotation in R3 around the x-axis

Construction a rotation transformation in R3. Created by Sal Khan.

## Want to join the conversation?

• What is Sal not writing at when he says "you get the idea, I don't wanna write that whole thing again."
The truth is, I don't get the idea, that's why I'm here trying to learn. It looks to me like he went ahead and wrote what he said he wasn't going to anyway, which is incredibly confusing for a beginner. I'm not ready for shortcuts, omissions or other surprises yet.
(1 vote)
• Tabitha, you are correct. Sal did write what he said that he did not want to write. (We all do things that we don't want to do.)
Even so, stay with him. Sal often rambles, and he makes mistakes as well. Sometimes, he corrects them, and sometimes we in the KhanAcademy community are left to "proofread" his videos. But Sal is an excellent teacher. He constantly goes back to explain previous videos when developing the concept further.
Watch the videos in order. In math, each new concept depends on the ones before. Measure your progress in terms of how much you understand, not by how many videos you have watched, or how many points you have accrued.
Don't be frustrated if you feel lost. We have all been there. Review previous videos and read all the comments. Do the applicable exercise sets. Ask questions when you need clarification. The KA community will always be there for you.
Best of luck in your continued studies.
• Are there any further videos building on this basis? As for example: Theta rotations around x, Phi rotations around y and Psi rotations around z, where you need to combine the 3 individual matrices into one? Not the best explaination, but maybe some of you get the point.
• ψ for z, Φ for y, 𝛳 for x (Rotation angles)

we could create a rotation matrix around the z axis as follows:
cos ψ -sin ψ 0
sin ψ cos ψ 0
0 0 1

and for a rotation about the y axis:
cosΦ 0 sinΦ
0 1 0
-sinΦ 0 cosΦ

I believe we just multiply the matrix together to get a single rotation matrix if you have 3 angles of rotation.

(cosψ*cosΦ) (cosψ*sinΦ*sin𝛳 - sinψ*cos𝛳) (cosψ*sinΦ*cos𝛳 + sinψ*sin𝛳)
(sinψ*cosΦ) (sinψ*sinΦ*sin𝛳 + cosψ*cos𝛳) (sinψ*sinΦ*cos𝛳 - cosψ*sin𝛳)
(-sinΦ) (cosΦ*sin𝛳) (cosΦ*cos𝛳)

Where ( ) denotes one of the 9 row and column combinations of the rotation matrix.
• Does 90 degrees equal -270 degrees?
• Yes it does. If you rotate 90 degrees clockwise (positive rotation), or if you rotated 270 degrees counter clockwise (negative rotation), you would end up in the same place.
• if you have an angle of 30 degrees how do you find the coterminal angles? then find one positive and one negative angle?
• How do you find a transformation matrics that roate the #D point around the:

x-axis by angle a
y-axis by angle b
z-axis by angle c

x-axis by angle a=>y-axis by angle b=>z-axis by angle c
(1 vote)
• You could find 3 separate transformation matrices for each of the rotations and then multiply them together into one. If they were called tranX, tranY and tranZ, then they would need to be multiplied as follows: combined = tranZ * tranY * tranX.
• How could you figure out the rotation transform matrix for n dimensions on any axis?
(1 vote)
• The best way to think of rotations is on a plane. Every point on that plane gets spun around a point by θ degrees/radians. In 3 dimensions, you have an infinite set of planes and the point you rotate about becomes a line (or an axis). In 4 dimensions, that line gets extruded again and becomes a plane (not just a single axis). So, in n-dimensions, you can't rotate about an axis, that's specific to 3-dimensions. So, the best way to define an n-dimensional rotation isn't with the axis you rotate about, it's with the 2D subspace you rotate on (as well as the orientation/angle of rotation). This can be defined using 2 unit vectors, one for the initial position and one for the final. By setting the initial vector equal to 1 and an orthonormal, co-planar vector equal to i, we can then use complex number rotation tricks to get a rotation matrix for any n-dimensional rotation.

I realize I skimmed over a lot there, so let me know if you need me to expound on any points.
• in this video at 1 minute you say: "you can apply rotation transformations one after another". And that: "you will cover this in a lot more detail in a future video".
I can't find the other videos that cover this. Can you help me?
I found videos covering composition of 2 or 3 transformations but nothing specific on rotations.
• Is theta always the variable for angles?
(1 vote)
• you can always use any variable you want to represent anything, as long as it's recognizable what it is
• What happens if the angle is greater than 45 degrees? Then this method breaks down doesn't it?