Skip to main content
Mathematics LibreTexts

4.4: Rotation Matrices in 2-Dimensions

  • Page ID
    125046

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    The Rotation Matrix

    To this point, we worked with vectors and with matrices. Now, we will put them together to see how to use a matrix multiplication to rotate a vector in the counterclockwise direction through some angle \(\theta\) in 2-dimensions.

    This image shows two vectors on the xy plane: vector v and vector v'. Vector v = [x,y] and vector v' = [x',y'].  Vector v and vector v' are separated by theta degrees.
    Diagram of vector v and its rotational  vector v'. Vector v is rotated counterclockwise through an angle. The matrix values of vector v and vector v' have not been changed.

    Our plan is to rotate the vector \(v=\left[ \begin{array}{c} x \\ y \end{array} \right]\) counterclockwise through some angle \(\theta\) to the new position given by the vector \(v^{\prime}=\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\). To do so, we use the rotation matrix, a matrix that rotates points in the \(xy\)-plane counterclockwise through an angle \(\theta\) relative to the \(x\)-axis.

    \[\left[\begin{array}{cc}
    \cos \theta & -\sin \theta \\
    \sin \theta & \cos \theta
    \end{array}\right] \nonumber \]

    The Rotation Process

    To get the coordinates of the new vector \(\left[{ \begin{array}{c} x \\ y^{\mathrm{'}} \end{array} }^{\mathrm{'}}\right]\mathrm{,\ }\)perform the matrix multiplication

    \[\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]=\left[\begin{array}{cc}
    \cos \theta & -\sin \theta \\
    \sin \theta & \cos \theta
    \end{array}\right]\left[\begin{array}{l}
    x \\
    y
    \end{array}\right] \nonumber \]

    Example \(\PageIndex{1}\)

    Find the vector \(\left[{ \begin{array}{c} x \\ y^{\mathrm{'}} \end{array} }^{\mathrm{'}}\right]\mathrm{\ }\)that results when the vector \(\left[ \begin{array}{c} x \\ y \end{array} \right]\mathrm{=}\left[ \begin{array}{c} \mathrm{1} \\ --\mathrm{1} \end{array} \right]\) is rotated 90\(\mathrm{{}^\circ}\) counterclockwise.

    Solution

    Using the rotation formula \(\left[{ \begin{array}{c} x \\ y^{\mathrm{'}} \end{array} }^{\mathrm{'}}\right]\mathrm{=}\left[ \begin{array}{cc} \mathrm{cos}\theta & \mathrm{-}\mathrm{sin}\theta \\ \mathrm{sin}\theta & \mathrm{cos}\theta \end{array} \right]\left[ \begin{array}{c} x \\ y \end{array} \right]\) with \(\left[ \begin{array}{c} x \\ y \end{array} \right]\mathrm{=}\left[ \begin{array}{c} \mathrm{1} \\ --\mathrm{1} \end{array} \right]\)

    and \(\theta \mathrm{=90{}^\circ ,}\) we get

    \[\begin{aligned}
    & {\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]=\left[\begin{array}{cc}
    \cos \theta & -\sin \theta \\
    \sin \theta & \cos \theta
    \end{array}\right]\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{cc}
    \cos 90^{\circ} & -\sin 90^{\circ} \\
    \sin 90^{\circ} & \cos 90^{\circ}
    \end{array}\right]\left[\begin{array}{c}
    1 \\
    -1
    \end{array}\right]} \\
    & {\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]=\left[\begin{array}{cc}
    0 & -1 \\
    1 & 0
    \end{array}\right]\left[\begin{array}{c}
    1 \\
    -1
    \end{array}\right]=\left[\begin{array}{c}
    0 \cdot 1+(-1) \cdot(-1) \\
    1 \cdot 1+0 \cdot(-1)
    \end{array}\right]} \\
    & {\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]=\left[\begin{array}{l}
    1 \\
    1
    \end{array}\right]}
    \end{aligned} \nonumber \]

    When rotated counterclockwise 90°, the vector \(\left[\begin{array}{c}
    1 \\
    -1
    \end{array}\right] \) becomes \(\left[\begin{array}{c}
    1 \\
    1
    \end{array}\right]\)

    This image shows a vector v = [1,negative 1] in the xy plane.
    This images shows that vector v = [1,negative 1] has been rotated counterclockwise through 90 degrees into v' = [1,1].
    Example \(\PageIndex{2}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\)
    that results when the vector \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    2 \\
    6
    \end{array}\right]\) is rotated 60° counterclockwise.

    Solution

    Using the rotation formula \(\left[\begin{array}{c}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]=\left[\begin{array}{cc}
    \cos \theta & -\sin \theta \\
    \sin \theta & \cos \theta
    \end{array}\right]\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]\) with \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    2 \\
    6
    \end{array}\right]\) and \(\theta =60\mathrm{{}^\circ },\) we get

    \[\begin{aligned}
    & {\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]=\left[\begin{array}{cc}
    \cos \theta & -\sin \theta \\
    \sin \theta & \cos \theta
    \end{array}\right]\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{cc}
    \cos 60^{\circ} & -\sin 60^{\circ} \\
    \sin 60^{\circ} & \cos 60^{\circ}
    \end{array}\right]\left[\begin{array}{l}
    2 \\
    6
    \end{array}\right]} \\
    & {\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]=\left[\begin{array}{cc}
    1 / 2 & -\sqrt{3} / 2 \\
    \sqrt{3} / 2 & 1 / 2
    \end{array}\right]\left[\begin{array}{l}
    2 \\
    6
    \end{array}\right]=\left[\begin{array}{c}
    1 / 2 \cdot 2+(-\sqrt{3} / 2) \cdot 6 \\
    \sqrt{3} / 2 \cdot 2+1 / 2 \cdot 6
    \end{array}\right]} \\
    & {\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]=\left[\begin{array}{l}
    1-3 \sqrt{3} \\
    3+\sqrt{3}
    \end{array}\right]}
    \end{aligned} \nonumber \]

    When rotated counterclockwise 60\(\mathrm{{}^\circ}\), the vector \(\left[\begin{array}{l}
    2 \\
    6
    \end{array}\right]\) becomes \(\left[\begin{array}{l}
    1-3 \sqrt{3} \\
    3+\sqrt{3}
    \end{array}\right]\).

    This image shows  vector v = [2,6].
    This image shows the vector v = [2,6] being rotated counterclockwise 60 degrees to become v' = [1 -  (3  multiplied by square root of 3), 3 + square root of 3].

    Using Technology

    We can use technology to help us find the rotation. WolframAlpha evaluates the trig functions for us.

    Go to www.wolframalpha.com.

    We can check the above problem from Example 2 by using WolframAlpha. Find the vector \(\left[\begin{array}{c}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when the vector \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    2 \\
    6
    \end{array}\right]\) is rotated 60° counterclockwise. To find rotation of the vector enter evaluate \([[\cos (60),-\sin (60)],[\sin (60), \cos (60)]] *[2,6]\) into the entry field.

    This screenshot from Wolfram Alpha shows [[2],[6]] being rotated 60 degrees. This is done by [[cos(60), –sin(60)], [sin(60), cos(60)]] * [2,6]. The result is [1 minus (3 multiplied by square root of 3), 3 + square root of 3].

    When rotated counterclockwise 60\(\mathrm{{}^\circ}\), the vector \(\left[ \begin{array}{c} 2 \\ 6 \end{array} \right]\) becomes \(\left[ \begin{array}{c} 1--3\sqrt{3} \\ 3+\sqrt{3} \end{array} \right]\).

    Try these

    Exercise \(\PageIndex{1}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    1 \\
    1
    \end{array}\right]\) is rotated 90° counterclockwise.

    Answer

    \(\left[ \begin{array}{c} -1 \\ 1 \end{array} \right]\)

    Exercise \(\PageIndex{2}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    1 \\
    1
    \end{array}\right]\) is rotated 180° counterclockwise.

    Answer

    \(\left[ \begin{array}{c} -1 \\ -1 \end{array} \right]\)

    Exercise \(\PageIndex{3}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    1 \\
    1
    \end{array}\right]\) is rotated 270° counterclockwise.

    Answer

    \(\left[ \begin{array}{c} 1 \\ -1 \end{array} \right]\)

    Exercise \(\PageIndex{4}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    0 \\
    1
    \end{array}\right]\) is rotated 90° counterclockwise.

    Answer

    \(\left[ \begin{array}{c} 1 \\ 0 \end{array} \right]\)

    Exercise \(\PageIndex{5}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    1 \\
    1
    \end{array}\right]\) is rotated 45° counterclockwise.

    Answer

    \(\left[ \begin{array}{c} 0 \\ \sqrt{2} \end{array} \right]\)

    Exercise \(\PageIndex{6}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    -1 \\
    1
    \end{array}\right]\) is rotated 45° counterclockwise.

    Answer

    \(\left[ \begin{array}{c} -\sqrt{2} \\ 0 \end{array} \right]\)

    Exercise \(\PageIndex{7}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    – 2.20205 \\
    4.48898
    \end{array}\right]\) is rotated -63° counterclockwise.

    Answer

    \(\left[ \begin{array}{c} 3 \\ 4 \end{array} \right]\)

    Exercise \(\PageIndex{8}\)

    Find the vector \(\left[\begin{array}{l}
    x^{\prime} \\
    y^{\prime}
    \end{array}\right]\) that results when \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{l}
    -3 \\
    -3
    \end{array}\right]\) is rotated -90° counterclockwise.

    Answer

    \(\left[ \begin{array}{c} -3 \\ 3 \end{array} \right]\)

    Exercise \(\PageIndex{9}\)

    Approximate, to five decimal places, the coordinates of the vector \(\left[\begin{array}{l}
    x \\
    y
    \end{array}\right]=\left[\begin{array}{c}
    -1 \\
    1
    \end{array}\right]\) when it is rotated counterclockwise 30°.

    Answer

    \(\left[ \begin{array}{c} -1.36603 \\ 0.36603 \end{array} \right]\)


    This page titled 4.4: Rotation Matrices in 2-Dimensions is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Denny Burzynski (Downey Unified School District) .

    • Was this article helpful?