3D Rotation Matrices and Examples

The following rotation matrices rotate vectors by an angle \theta in an anticlockwise direction about the x-, y-, or z-axis respectively (the rotated axis points towards the observer).

\begin{aligned}  R_x(\theta)&=\begin{pmatrix}1 &0 &0\\  0 &\cos\theta &-\sin\theta\\  0 &\sin\theta &\cos\theta  \end{pmatrix}\\  R_y(\theta)&=\begin{pmatrix}\cos\theta &0 &\sin\theta\\  0 &1 &0\\  -\sin\theta &0 &\cos\theta  \end{pmatrix}\\  R_z(\theta)&=\begin{pmatrix}  \cos\theta &-\sin\theta &0\\  \sin\theta &\cos\theta &0\\  0 &0 &1  \end{pmatrix}  \end{aligned}

Example 1

Rotating \begin{pmatrix}1\\ 0\\ 0\end{pmatrix} 45^\circ anticlockwise about z-axis:

\begin{aligned}  R_z(45^\circ)\begin{pmatrix}1\\ 0\\ 0\end{pmatrix}&=\begin{pmatrix}  \cos 45^\circ &-\sin 45^\circ &0\\  \sin 45^\circ &\cos 45^\circ &0\\  0 &0 &1  \end{pmatrix}  \begin{pmatrix}1\\ 0\\ 0\end{pmatrix}\\  &=\begin{pmatrix}\sqrt{2}/2\\\sqrt{2}/2\\0\end{pmatrix}.  \end{aligned}

Example 2

Rotating \begin{pmatrix}0\\ 1\\ 0\end{pmatrix} 45^\circ anticlockwise about z-axis:

\begin{aligned}  R_z(45^\circ)\begin{pmatrix}0\\ 1\\ 0\end{pmatrix}&=\begin{pmatrix}  \cos 45^\circ &-\sin 45^\circ &0\\  \sin 45^\circ &\cos 45^\circ &0\\  0 &0 &1  \end{pmatrix}  \begin{pmatrix}0\\ 1\\ 0\end{pmatrix}\\  &=\begin{pmatrix}-\sqrt{2}/2\\\sqrt{2}/2\\0\end{pmatrix}.  \end{aligned}

Advertisement

Author: mathtuition88

Math and Education Blog

One thought on “3D Rotation Matrices and Examples”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: