The equations defining the transformation in two dimensions, which rotates the xy axes counterclockwise through an angle \theta into the x'y' axes, are derived as follows. In the xy system, let the point P have
polar coordinates (r, \alpha) . Then, in the x'y' system, P will have polar coordinates (r, \alpha - \theta) . Using
trigonometric functions, we have and using the standard
trigonometric formulae for
differences, we have Substituting equations () and () into equations () and (), we obtain Equations () and () can be represented in matrix form as \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos \theta & \sin \theta \\ - \sin \theta & \cos \theta \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}, which is the standard matrix equation of a rotation of axes in two dimensions. The inverse transformation is or \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} \begin{bmatrix} x' \\ y' \end{bmatrix}.
Examples in two dimensions Example 1 Find the coordinates of the point P_1 = (x, y) = (\sqrt 3, 1) after the axes have been rotated through the angle \theta_1 = \pi / 6 , or 30°.
Solution: x' = \sqrt 3 \cos ( \pi / 6 ) + 1 \sin ( \pi / 6 ) = (\sqrt 3)({\sqrt 3}/2) + (1)(1/2) = 2 y' = 1 \cos ( \pi / 6 ) - \sqrt 3 \sin ( \pi / 6 ) = (1)({\sqrt 3}/2) - (\sqrt 3)(1/2) = 0 . The axes have been rotated counterclockwise through an angle of \theta_1 = \pi / 6 and the new coordinates are P_1 = (x', y') = (2, 0) . Note that the point appears to have been rotated clockwise through \pi / 6 with respect to fixed axes so it now coincides with the (new) x' axis.
Example 2 Find the coordinates of the point P_2 = (x, y) = (7, 7) after the axes have been rotated clockwise 90°, that is, through the angle \theta_2 = - \pi / 2 , or −90°.
Solution: \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos ( - \pi / 2 ) & \sin( - \pi / 2 ) \\ - \sin( - \pi / 2 ) & \cos( - \pi / 2 ) \end{bmatrix} \begin{bmatrix} 7 \\ 7 \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 7 \\ 7 \end{bmatrix} = \begin{bmatrix} -7 \\ 7 \end{bmatrix}. The axes have been rotated through an angle of \theta_2 = - \pi / 2 , which is in the clockwise direction and the new coordinates are P_2 = (x', y') = (-7, 7) . Again, note that the point appears to have been rotated counterclockwise through \pi / 2 with respect to fixed axes. == Rotation of conic sections ==