• Nakafa

    Nakafa

    Learn free and with quality.
Subject
    • Grade 10
    • Grade 11
    • Grade 12
Exercises
Holy
  • Quran
Articles
  • Politics
  • Community
  • About

Command Palette

Search for a command to run...

Geometric Transformation

Rotation Matrix

Finding the Rotation Matrix about the Origin

The image of a point (x,y)(x,y)(x,y) rotated about the origin (0,0)(0,0)(0,0) by an angle θ\thetaθ is (xcos⁡θ−ysin⁡θ,xsin⁡θ+ycos⁡θ)(x \cos \theta - y \sin \theta, x \sin \theta + y \cos \theta)(xcosθ−ysinθ,xsinθ+ycosθ).

We want to find a 2×22 \times 22×2 matrix, say (rstu)\begin{pmatrix} r & s \\ t & u \end{pmatrix}(rt​su​), that represents this rotation transformation.

This matrix must satisfy:

(rstu)(xy)=(xcos⁡θ−ysin⁡θxsin⁡θ+ycos⁡θ)\begin{pmatrix} r & s \\ t & u \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x \cos \theta - y \sin \theta \\ x \sin \theta + y \cos \theta \end{pmatrix}(rt​su​)(xy​)=(xcosθ−ysinθxsinθ+ycosθ​)

From the matrix multiplication on the left side, we get:

(rx+sytx+uy)=(xcos⁡θ−ysin⁡θxsin⁡θ+ycos⁡θ)\begin{pmatrix} rx + sy \\ tx + uy \end{pmatrix} = \begin{pmatrix} x \cos \theta - y \sin \theta \\ x \sin \theta + y \cos \theta \end{pmatrix}(rx+sytx+uy​)=(xcosθ−ysinθxsinθ+ycosθ​)

By equating the corresponding components:

  • First row: rx+sy=xcos⁡θ−ysin⁡θrx + sy = x \cos \theta - y \sin \thetarx+sy=xcosθ−ysinθ.

    For this equation to hold for all xxx and yyy, the coefficients of xxx must be equal and the coefficients of yyy must be equal. Thus, r=cos⁡θr = \cos \thetar=cosθ and s=−sin⁡θs = -\sin \thetas=−sinθ.

  • Second row: tx+uy=xsin⁡θ+ycos⁡θtx + uy = x \sin \theta + y \cos \thetatx+uy=xsinθ+ycosθ.

    Similarly, t=sin⁡θt = \sin \thetat=sinθ and u=cos⁡θu = \cos \thetau=cosθ.

Rotation Matrix about the Origin

The matrix associated with a rotation by an angle θ\thetaθ radians (or degrees) about the origin O(0,0)O(0,0)O(0,0) is:

Rθ=(cos⁡θ−sin⁡θsin⁡θcos⁡θ)R_\theta = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}Rθ​=(cosθsinθ​−sinθcosθ​)

Matrix Operation for Rotation about an Arbitrary Point

To rotate a point (x,y)(x,y)(x,y) about an arbitrary point P(a,b)P(a,b)P(a,b) by an angle θ\thetaθ, we perform three steps:

  1. Translate the point (x,y)(x,y)(x,y) so that P(a,b)P(a,b)P(a,b) becomes the origin: (x−a,y−b)(x-a, y-b)(x−a,y−b).
  2. Rotate the translated point about the origin by θ\thetaθ using the matrix RθR_\thetaRθ​.
  3. Translate the rotated point back by adding (a,b)(a,b)(a,b).

Matrix Operation for Rotation about an Arbitrary Point

The operation associated with rotation by an angle θ\thetaθ radians about the point (a,b)(a,b)(a,b) is:

(x′y′)=(cos⁡θ−sin⁡θsin⁡θcos⁡θ)(x−ay−b)+(ab)\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} \begin{pmatrix} x-a \\ y-b \end{pmatrix} + \begin{pmatrix} a \\ b \end{pmatrix}(x′y′​)=(cosθsinθ​−sinθcosθ​)(x−ay−b​)+(ab​)

Finding a Specific Rotation Matrix

The matrix associated with a rotation by θ=14π\theta = \frac{1}{4}\piθ=41​π radians (45∘45^\circ45∘) about the origin is:

We know cos⁡(π4)=12\cos(\frac{\pi}{4}) = \frac{1}{\sqrt{2}}cos(4π​)=2​1​ and sin⁡(π4)=12\sin(\frac{\pi}{4}) = \frac{1}{\sqrt{2}}sin(4π​)=2​1​.

Rπ4=(cos⁡(π4)−sin⁡(π4)sin⁡(π4)cos⁡(π4))=(12−121212)R_{\frac{\pi}{4}} = \begin{pmatrix} \cos(\frac{\pi}{4}) & -\sin(\frac{\pi}{4}) \\ \sin(\frac{\pi}{4}) & \cos(\frac{\pi}{4}) \end{pmatrix} = \begin{pmatrix} \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{pmatrix}R4π​​=(cos(4π​)sin(4π​)​−sin(4π​)cos(4π​)​)=(2​1​2​1​​−2​1​2​1​​)

This is the required matrix.

Visualization of Rotating Point (2,0) by 45∘45^\circ45∘ about the Origin
Point A(2,0)A(2,0)A(2,0) is rotated by 45∘45^\circ45∘ to become A′(2,2)A'(\sqrt{2}, \sqrt{2})A′(2​,2​). 2≈1.414\sqrt{2} \approx 1.4142​≈1.414.

Exercises

  1. Determine the matrices associated with a rotation about the origin O(0,0)O(0,0)O(0,0) by 16π\frac{1}{6}\pi61​π radians.
  2. Determine the image of point P(4,2)P(4,2)P(4,2) if it is rotated about the origin O(0,0)O(0,0)O(0,0) by 60∘60^\circ60∘.
  3. Determine the image of point Q(3,1)Q(3,1)Q(3,1) if it is rotated about the point C(1,−2)C(1,-2)C(1,−2) by 90∘90^\circ90∘.

Key Answers

  1. Given θ=π6\theta = \frac{\pi}{6}θ=6π​ or 30∘30^\circ30∘:

    cos⁡(π6)=32\cos(\frac{\pi}{6}) = \frac{\sqrt{3}}{2}cos(6π​)=23​​
    sin⁡(π6)=12\sin(\frac{\pi}{6}) = \frac{1}{2}sin(6π​)=21​

    Rotation matrix:

    (32−121232)\begin{pmatrix} \frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \frac{1}{2} & \frac{\sqrt{3}}{2} \end{pmatrix}(23​​21​​−21​23​​​)
  2. Point P(4,2)P(4,2)P(4,2), θ=60∘\theta = 60^\circθ=60∘. cos⁡60∘=12\cos 60^\circ = \frac{1}{2}cos60∘=21​, sin⁡60∘=32\sin 60^\circ = \frac{\sqrt{3}}{2}sin60∘=23​​.

    (x′y′)=(12−323212)(42)=((4)(12)−(2)(32)(4)(32)+(2)(12))=(2−323+1)\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} \frac{1}{2} & -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & \frac{1}{2} \end{pmatrix} \begin{pmatrix} 4 \\ 2 \end{pmatrix} = \begin{pmatrix} (4)(\frac{1}{2}) - (2)(\frac{\sqrt{3}}{2}) \\ (4)(\frac{\sqrt{3}}{2}) + (2)(\frac{1}{2}) \end{pmatrix} = \begin{pmatrix} 2 - \sqrt{3} \\ 2\sqrt{3} + 1 \end{pmatrix}(x′y′​)=(21​23​​​−23​​21​​)(42​)=((4)(21​)−(2)(23​​)(4)(23​​)+(2)(21​)​)=(2−3​23​+1​)

    Image: P′(2−3,23+1)P'(2-\sqrt{3}, 2\sqrt{3}+1)P′(2−3​,23​+1).

  3. Given point Q(3,1)Q(3,1)Q(3,1), center C(1,−2)C(1,-2)C(1,−2), θ=90∘\theta = 90^\circθ=90∘. (a,b)=(1,−2)(a,b)=(1,-2)(a,b)=(1,−2).

    cos⁡90∘=0\cos 90^\circ = 0cos90∘=0
    sin⁡90∘=1\sin 90^\circ = 1sin90∘=1
    (x′y′)=(0−110)(3−11−(−2))+(1−2)\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 3-1 \\ 1-(-2) \end{pmatrix} + \begin{pmatrix} 1 \\ -2 \end{pmatrix}(x′y′​)=(01​−10​)(3−11−(−2)​)+(1−2​)
    =(0−110)(23)+(1−2)=(−32)+(1−2)=(−20)= \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 2 \\ 3 \end{pmatrix} + \begin{pmatrix} 1 \\ -2 \end{pmatrix} = \begin{pmatrix} -3 \\ 2 \end{pmatrix} + \begin{pmatrix} 1 \\ -2 \end{pmatrix} = \begin{pmatrix} -2 \\ 0 \end{pmatrix}=(01​−10​)(23​)+(1−2​)=(−32​)+(1−2​)=(−20​)

    Image: Q′(−2,0)Q'(-2,0)Q′(−2,0).

Previous

Translation Matrix

Next

Dilation Matrix

  • Rotation MatrixLearn rotation matrices for 2D transformations with derivation, formulas, and practical examples. Master rotations about origin and arbitrary points.
On this page
  • Finding the Rotation Matrix about the Origin
    • Rotation Matrix about the Origin
  • Matrix Operation for Rotation about an Arbitrary Point
    • Matrix Operation for Rotation about an Arbitrary Point
  • Finding a Specific Rotation Matrix
  • Exercises
    • Key Answers
  • Comments
  • Report
  • Source code