1 of 14

2D Rotations�

2 of 14

Deriving the rotation matrix

Say we have a point (x1,y1) and we want to find the 2×2 transformation matrix that will rotate it (anticlockwise) around the origin by an angle θ to a new point, (x2,y2).

3 of 14

4 of 14

  • We can now pull out the coefficients and express this as a matrix multiplied by the first point i.e (X1,Y1)
  • That 2×2 matrix is the 2D rotation matrix. You can multiply it by any point (or series of points) to rotate them anticlockwise about the origin by the angle θ.

5 of 14

Properties of rotation matrices

  • Inverse = Transpose

6 of 14

Determinant = 1

7 of 14

Rotation X Rotation = Rotation

  • Rotation matrices have the property that if you multiple two of them together, you always get another rotation matrix. 

8 of 14

Experiment

9 of 14

3D Rotations�

  • When we add a third dimension, we add it in the Z direction. According to the right-hand rule, the Z direction is "out of the page" compared to the typical X-Y plane.

10 of 14

Right Hand Grip Rule�

  •  The right-hand grip rule comes into play here. It tells us that if we look from above, a positive rotation around the Z axis is an anticlockwise rotation (i.e. moving from the positive X axis through the first quadrant to the positive Y axis). 

11 of 14

Rotating about the Z axis

12 of 14

3D Rotations�

  • The z value could really be anything - it's just a height in space - and it shouldn't affect our rotated x and y positions at all, so we want the z contribution to be 0 multiplied by whatever the original z value is.

13 of 14

Rotating about the other axes��

14 of 14

Rotating anywhere in space

  • we could rotate first around the Z axis, then around the Y axis, and then around the X axis. You can even use the same axis twice (for the first and last ones), e.g. Z-Y-Z. So we can multiply the rotation matrices for the individual dimensions to form a single matrix.