05 Linear transformations as rotations
05 Linear transformations as rotations
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.
[ sin θ cos θ ]
cos θ −sin θ
Rotθ =
279
1 0 0
Rotθ around x = 0 cos θ −sin θ
0 sin θ cos θ
cos θ 0 sin θ
Rotθ around y = 0 1 0
−sin θ 0 cos θ
cos θ −sin θ 0
Rotθ around z = sin θ cos θ 0
0 0 1
1 0 0 x1
Rotθ around x( x ⃗ ) = 0 cos θ −sin θ x2
0 sin θ cos θ x3
cos θ 0 sin θ x1
Rotθ around y( x ⃗ ) = 0 1 0 x2
−sin θ 0 cos θ x3
cos θ −sin θ 0 x1
Rotθ around z( x ⃗ ) = sin θ cos θ 0 x2
0 0 1 x3
280
Rotθ(c u ⃗ ) = cRotθ( u ⃗ )
Example
x ⃗ = (3,2)
First, we’ll simplify the rotation matrix. We can get the sine and cosine
values at θ = 135∘ from the unit circle.
2 2
−2 −2
[ sin(135∘) cos(135∘) ]
∘ ∘
cos(135 ) −sin(135 )
=
2 2
2
−2
2 2
−2 −2
[x2]
x1
Rot135∘( x ⃗ ) =
2 2
2
−2
281
Now we’ll apply this specific rotation matrix to x ⃗ = (3,2).
2 2
−2 −2
( [ ] ) [2]
3 3
Rot135∘ =
2 2 2
2
−2
3 2 2 2
− −
( [ ] )
3 2 2
Rot135∘ =
2 3 2 2 2
2
− 2
5 2
−
[
( 2 )]
3 2
Rot135∘ =
2
2
282
283