Rotation as a Trigonometric Operation

Chapter 12, Trigonometry of the Unit Circle

Learning objectives

  • Write the rotation matrix for angle θ\theta
  • Apply the rotation matrix to rotate a point
  • Compose two rotations and simplify
  • Understand rotations as linear transformations

So far the unit circle has been a static picture. Now we make it move. A rotation spins the whole plane around the origin by some angle θ\theta, taking each point to a new point. The question this section answers: if I know (x,y)(x, y) and I rotate by θ\theta, what are the new coordinates? The answer is a single, beautiful formula, the rotation matrix, whose entries are sine and cosine of θ\theta. It is also the first time matrices show up in this textbook, and rotations are the cleanest possible introduction to what a matrix really is: a recipe for transforming a vector.

Deriving the formula

Write the point (x,y)(x, y) in polar form (rcos⁡α, rsin⁡α)(r\cos\alpha,\, r\sin\alpha) for some radius rr and angle α\alpha. A counterclockwise rotation by θ\theta keeps the radius and adds θ\theta to the angle:

(rcos⁡(α+θ),  rsin⁡(α+θ))(r\cos(\alpha + \theta),\; r\sin(\alpha + \theta))

Apply the addition formulas:

rcos⁡(α+θ)=r(cos⁡αcos⁡θ−sin⁡αsin⁡θ)=xcos⁡θ−ysin⁡θr\cos(\alpha + \theta) = r(\cos\alpha\cos\theta - \sin\alpha\sin\theta) = x\cos\theta - y\sin\theta rsin⁡(α+θ)=r(sin⁡αcos⁡θ+cos⁡αsin⁡θ)=ycos⁡θ+xsin⁡θr\sin(\alpha + \theta) = r(\sin\alpha\cos\theta + \cos\alpha\sin\theta) = y\cos\theta + x\sin\theta

So the new coordinates (x′,y′)(x', y') are

x′=xcos⁡θ−ysin⁡θ,y′=xsin⁡θ+ycos⁡θx' = x\cos\theta - y\sin\theta, \qquad y' = x\sin\theta + y\cos\theta

The rotation matrix

Stack the two scalar equations into one matrix equation:

(x′y′)=(cos⁡θ−sin⁡θsin⁡θ−cos⁡θ)(xy)\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \phantom{-}\cos\theta \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}

The 2×22\times 2 matrix is the rotation matrix, usually written R(θ)R(\theta). Multiplying it against the column vector (x,y)T(x, y)^T gives the rotated point.

Where this shows up
  • Computer Graphics: Every 2D rotation in a game engine, character turning, sprite spinning, UI flourish, is (x,y)↦(xcos⁡θ−ysin⁡θ,  xsin⁡θ+ycos⁡θ)(x, y) \mapsto (x\cos\theta - y\sin\theta,\; x\sin\theta + y\cos\theta); this single matrix is hand-coded into thousands of game loops.
  • Robotics: Rotation matrices about each joint axis are composed to compute the end-effector position; this is forward kinematics, and every industrial robot's controller runs this composition tens of times per second.
  • Cryptography: Some lattice-based cryptosystems rely on rotations in high-dimensional integer lattices; the difficulty of recovering small basis vectors after rotation is what makes them post-quantum secure.

Unit CircleInteractive figure, enable JavaScript to interact.

(Snap to a standard angle and read off cos⁡θ\cos\theta and sin⁡θ\sin\theta. Those two values are the entries of the rotation matrix: column one is (cos⁡θ,sin⁡θ)T(\cos\theta, \sin\theta)^T, column two is (−sin⁡θ,cos⁡θ)T(-\sin\theta, \cos\theta)^T. The columns are exactly the images of the basis vectors e^1=(1,0)\hat e_1 = (1, 0) and e^2=(0,1)\hat e_2 = (0, 1) under the rotation.)

Composition: rotating twice

If you rotate by α\alpha and then by β\beta, the net effect is a rotation by α+β\alpha + \beta. In matrix form:

R(β)⋅R(α)=R(α+β)R(\beta) \cdot R(\alpha) = R(\alpha + \beta)

The proof is a direct computation using the addition formulas. So the family of rotation matrices is closed under multiplication, with the angle adding modulo 2π2\pi. This is the cleanest possible example of an abelian group, and it foreshadows the role of complex multiplication in section 15.2.

Four properties to remember

  • Distances are preserved, rotations are rigid motions. ∣R(θ)𝐯∣=∣𝐯∣|R(\theta) \mathbf{v}| = |\mathbf{v}|.
  • Angles between any two vectors are preserved.
  • The inverse of R(θ)R(\theta) is R(−θ)R(-\theta). Rotating by −θ-\theta undoes the rotation by θ\theta.
  • The determinant is det⁡R(θ)=cos⁡2θ+sin⁡2θ=1\det R(\theta) = \cos^2\theta + \sin^2\theta = 1. Areas are preserved with orientation.

Worked example

Rotate (3,0)(3, 0) by π/6\pi/6. From the standard table cos⁡(π/6)=3/2\cos(\pi/6) = \sqrt{3}/2, sin⁡(π/6)=1/2\sin(\pi/6) = 1/2:

x′=3⋅32−0⋅12=332x' = 3 \cdot \tfrac{\sqrt{3}}{2} - 0 \cdot \tfrac{1}{2} = \tfrac{3\sqrt{3}}{2} y′=3⋅12+0⋅32=32y' = 3 \cdot \tfrac{1}{2} + 0 \cdot \tfrac{\sqrt{3}}{2} = \tfrac{3}{2}

The image is (33/2,  3/2)(3\sqrt{3}/2,\; 3/2). Sanity check: the distance from origin is 27/4+9/4=9=3\sqrt{27/4 + 9/4} = \sqrt{9} = 3. Same as before, rotations preserve distance.

Try it

  • Rotate (1,1)(1, 1) by π/2\pi/2. (Expect (−1,1)(-1, 1).)
  • Compute R(π/3)⋅R(π/6)R(\pi/3) \cdot R(\pi/6). Use the composition rule, not the matrix product, then verify by direct multiplication.
  • A point at (2,5)(2, 5) is the result of rotating some original point PP by π/2\pi/2. Find PP. (Apply the inverse rotation R(−π/2)R(-\pi/2).)

Pause: if a matrix preserves distances and has determinant 11, it must be a rotation. Can you sketch why? (Hint: a rigid map that fixes the origin sends basis vectors to two perpendicular unit vectors; the determinant being +1+1 rules out reflection.)

A trap to watch for

The sign convention. Counterclockwise rotations correspond to positive θ\theta; clockwise to negative. Computer graphics often uses the opposite convention (because the screen y-axis points down), so a "rotate by 90°" in a CSS transform might look like a rotation in the wrong direction relative to mathematical convention. Always re-check the orientation of the y-axis before plugging into the rotation matrix. In this textbook the y-axis always points up and CCW is positive.

A second trap: the formula R(β)⋅R(α)=R(α+β)R(\beta) \cdot R(\alpha) = R(\alpha + \beta) holds because rotations commute. This is a luxury, matrix multiplication is not generally commutative. For arbitrary 2×22 \times 2 matrices AB≠BAAB \neq BA in general. Rotations are special because they form an abelian subgroup of the general linear group.

What you now know

You can write the rotation matrix R(θ)R(\theta), apply it to a point to compute the rotated coordinates, compose two rotations by adding angles, recognise that rotations preserve distance and area, and check the sign convention before plugging in. The next chapter switches gears: we leave trigonometry behind and begin analytic geometry, where coordinate methods are turned loose on lines, parabolas, ellipses, and hyperbolas.

Quick check

Mark section complete →

References

  • Lang, S. (1971). Basic Mathematics. Springer. Chapter 11, Section 6, rotations derived from the addition formulas, leading into matrix notation.
  • Apostol, T. M. (1969). Calculus, Volume 2: Multi-Variable Calculus and Linear Algebra (2nd ed.). Wiley. Chapter 5: rotations as orthogonal transformations.
  • Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge Press. Chapter 7: rotation matrices as the simplest orthogonal matrices.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.