Using a linear transformation to represent a rotation

 
 
 
 
 

Representing a rotation as a linear transformation

In the previous lesson, we looked at an example of a linear transformation that included a reflection and a stretch. We can apply the same process for other kinds of transformations, like compressions, or for rotations.

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 

But we can also use a linear transformation to rotate a vector by a certain angle, either in degrees or in radians.

The rotation matrix

Instead of using the appropriate identity matrix like we did for reflecting, stretching, and compressing, we’ll use a matrix specifically for rotations. But the matrix will still always match the dimension of the space in which we’re transforming.

If we’re rotating in R2\mathbb{R}^2, we’re rotating counterclockwise around the origin through the angle θ\theta, and the transforming rotation matrix will be

And the transformation to rotate any vector x\vec{x} in R2\mathbb{R}^2 will be

If we’re rotating in R3\mathbb{R}^3, the transforming rotation matrix will be different depending on which axis we’re rotating around.

And the transformation to rotate any vector x\vec{x} in R3\mathbb{R}^3 will be

So if we know the angle by which we’re trying to rotate a vector, we can plug the angle into the rotation matrix, and then multiply the rotation matrix by the vector we want to transform.

We also want to know that rotations follow these properties:

Rotθ(u+v)=Rotθ(u)+Rotθ(v)\text{Rot}_{\theta}(\vec{u}+\vec{v})=\text{Rot}_{\theta}(\vec{u})+\text{Rot}_{\theta}(\vec{v})

Rotθ(cu)=cRotθ(u)\text{Rot}_{\theta}(c\vec{u})=c\text{Rot}_{\theta}(\vec{u})

 
 

How to build the transformation matrix for a rotation by a specific angle


 
 

Take the course

Want to learn more about Linear Algebra? I have a step-by-step course for that. :)

 
 

 
 

An example of a rotation in two-dimensional space

Let’s do an example of a rotation in R2\mathbb{R}^2.

Example

Rotate x\vec{x} by an angle of θ=135\theta=135^\circ.

x=(3,2)\vec{x}=(3,2)


The transformation to rotate any vector x\vec{x} in R2\mathbb{R}^2 by 135135^\circ will be

First, we’ll simplify the rotation matrix. We can get the sine and cosine values at θ=135\theta=135^\circ from the unit circle.

Then the transformation to rotate any vector x\vec{x} in R2\mathbb{R}^2 by 135135^\circ will be rewritten as

So if we know the angle by which we’re trying to rotate a vector, we can plug the angle into the rotation matrix, and then multiply the rotation matrix by the vector we want to transform.

Now we’ll apply this specific rotation matrix to x=(3,2)\vec{x}=(3,2).

If the original vector is x\vec{x}, and we call the transformed vector x1\vec{x}_1, then we can sketch x\vec{x} and x1\vec{x}_1 and the 135135^\circ angle between them.


 
 

Get access to the complete Linear Algebra course