Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Rotation matrix
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Basic 3D rotations=== [[File:Angle-orientation-in-rotation-matrix-around-x-y-and-z.svg|thumb]] A basic 3D rotation (also called elemental rotation) is a rotation about one of the axes of a coordinate system. The following three basic rotation matrices rotate vectors by an angle {{mvar|θ}} about the {{mvar|x}}-, {{mvar|y}}-, or {{mvar|z}}-axis, in three dimensions, using the [[right-hand rule]]—which codifies their alternating signs.<ref>{{cite web | url=https://alphons.io/question/5497/what-are-the-rotation-matrix-in-3d | title=What are the rotation matrices in 3D ? }}</ref> Notice that the right-hand rule only works when multiplying <math>R \cdot \vec{x}</math>. (The same matrices can also represent a clockwise rotation of the axes.<ref group=nb>Note that if instead of rotating vectors, it is the reference frame that is being rotated, the signs on the {{math|sin ''θ''}} terms will be reversed. If reference frame A is rotated anti-clockwise about the origin through an angle {{mvar|θ}} to create reference frame B, then {{mvar|R<sub>x</sub>}} (with the signs flipped) will transform a vector described in reference frame A coordinates to reference frame B coordinates. Coordinate frame transformations in aerospace, robotics, and other fields are often performed using this interpretation of the rotation matrix.</ref>) :<math> \begin{alignat}{1} R_x(\theta) &= \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \theta & -\sin \theta \\[3pt] 0 & \sin \theta & \cos \theta \\[3pt] \end{bmatrix} \\[6pt] R_y(\theta) &= \begin{bmatrix} \cos \theta & 0 & \sin \theta \\[3pt] 0 & 1 & 0 \\[3pt] -\sin \theta & 0 & \cos \theta \\ \end{bmatrix} \\[6pt] R_z(\theta) &= \begin{bmatrix} \cos \theta & -\sin \theta & 0 \\[3pt] \sin \theta & \cos \theta & 0 \\[3pt] 0 & 0 & 1 \\ \end{bmatrix} \end{alignat} </math> For [[column vector]]s, each of these basic vector rotations appears counterclockwise when the axis about which they occur points toward the observer, the coordinate system is right-handed, and the angle {{mvar|θ}} is positive. {{math|''R''<sub>''z''</sub>}}, for instance, would rotate toward the {{nowrap|{{math|''y''}}-axis}} a vector aligned with the {{nowrap|{{math|''x''}}-axis}}, as can easily be checked by operating with {{math|''R''<sub>''z''</sub>}} on the vector {{math|(1,0,0)}}: :<math> R_z(90^\circ) \begin{bmatrix} 1 \\ 0 \\ 0 \\ \end{bmatrix} = \begin{bmatrix} \cos 90^\circ & -\sin 90^\circ & 0 \\ \sin 90^\circ & \quad\cos 90^\circ & 0\\ 0 & 0 & 1\\ \end{bmatrix} \begin{bmatrix} 1 \\ 0 \\ 0 \\ \end{bmatrix} = \begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0\\ 0 & 0 & 1\\ \end{bmatrix} \begin{bmatrix} 1 \\ 0 \\ 0 \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \\ 0 \\ \end{bmatrix} </math> This is similar to the rotation produced by the above-mentioned two-dimensional rotation matrix. See [[#Ambiguities|below]] for alternative conventions which may apparently or actually invert the sense of the rotation produced by these matrices.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)