Tutorials › Linear Algebra › Rotation and Uniform Scaling Matrices in the Plane

Linear Transformations of R^n · Tutorial 199 of 1000

Rotation and Uniform Scaling Matrices in the Plane

Learn how basis-vector images determine the matrices for planar rotations and uniform scalings, and use them to transform points.

Intermediate 9 min read

What You'll Learn

  • Derive the matrix for a counterclockwise rotation through an angle.
  • Derive the matrix for uniform scaling about the origin.
  • Apply both matrices to basis vectors and selected points.
  • Verify that rotation preserves length and scaling changes it by the scale factor.
  • Distinguish positive scaling from the zero scaling case.
  • Identify and correct a common sign error in rotation matrices.

Two Basic Transformations of the Plane

A rotation about the origin changes the direction of a point while keeping its distance from the origin fixed. A uniform scaling about the origin changes that distance by the same factor for every point. These geometric descriptions become precise matrix rules once we determine where each transformation sends the standard basis vectors. That approach also makes the signs in the rotation matrix easier to track.

Throughout, points and vectors are columns in \(\mathbb{R}^2\). The standard basis vectors are \(\mathbf{e}_1=\begin{bmatrix}1\\0\end{bmatrix}\) and \(\mathbf{e}_2=\begin{bmatrix}0\\1\end{bmatrix}\). Each vector \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\end{bmatrix}\) has the decomposition \(\mathbf{x}=x_1\mathbf{e}_1+x_2\mathbf{e}_2\). The standard matrix of a linear transformation \(T:\mathbb{R}^2\to\mathbb{R}^2\) has columns \(T(\mathbf{e}_1)\) and \(T(\mathbf{e}_2)\).

Definition: A counterclockwise rotation about the origin through angle \(\theta\) sends each point to the point obtained by turning it through the signed angle \(\theta\), with positive angles measured counterclockwise from the positive \(x\)-axis. A uniform scaling about the origin by factor \(k\), where \(k\ge 0\), sends \(\mathbf{x}\) to \(k\mathbf{x}\). In particular, when \(k=0\), every point is sent to the origin.

Angles may be specified in radians or degrees, provided the same unit is used when evaluating sine and cosine. We will use radians in the formulas. The scaling convention takes \(k\) to be nonnegative: for \(k>0\), every nonzero point keeps its direction; for \(k=0\), every point maps to \(\mathbf{0}\), so the image of a nonzero point has no direction.

Deriving the Rotation Matrix from Basis Images

To determine a rotation, first rotate the two standard basis vectors. The vector \(\mathbf{e}_1\) has length \(1\) and angle \(0\) from the positive \(x\)-axis. After a counterclockwise turn by \(\theta\), its coordinates are \((\cos\theta,\sin\theta)\). The vector \(\mathbf{e}_2\) has angle \(\frac{\pi}{2}\), so after the same turn its angle is \(\frac{\pi}{2}+\theta\). Its coordinates are \((\cos(\frac{\pi}{2}+\theta),\sin(\frac{\pi}{2}+\theta))=(-\sin\theta,\cos\theta)\).

Theorem (Standard matrix for rotation): The counterclockwise rotation \(R_\theta:\mathbb{R}^2\to\mathbb{R}^2\) through angle \(\theta\) is represented by $$ \mathbf{R}_\theta= \begin{bmatrix} \cos\theta&-\sin\theta\\ \sin\theta&\cos\theta \end{bmatrix}. $$ Thus \(R_\theta(\mathbf{x})=\mathbf{R}_\theta\mathbf{x}\).

Proof. The basis-vector images found from the geometry of the unit circle are \(R_\theta(\mathbf{e}_1)=\begin{bmatrix}\cos\theta\\\sin\theta\end{bmatrix}\) and \(R_\theta(\mathbf{e}_2)=\begin{bmatrix}-\sin\theta\\\cos\theta\end{bmatrix}\). Since the columns of a standard matrix are the images of \(\mathbf{e}_1\) and \(\mathbf{e}_2\), placing these images in order gives the displayed matrix. For any \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\end{bmatrix}=x_1\mathbf{e}_1+x_2\mathbf{e}_2\), linearity gives \(R_\theta(\mathbf{x})=x_1R_\theta(\mathbf{e}_1)+x_2R_\theta(\mathbf{e}_2)=\begin{bmatrix}x_1\cos\theta-x_2\sin\theta\\x_1\sin\theta+x_2\cos\theta\end{bmatrix}=\mathbf{R}_\theta\mathbf{x}\). This verifies the matrix action for every input, not only for the basis vectors. \(\square\)

The first column records where the positive \(x\)-axis points after rotation; the second records where the positive \(y\)-axis points. This column interpretation is a useful sign check. In particular, for a positive quarter-turn, \(\mathbf{e}_1\) must point upward and \(\mathbf{e}_2\) must point left.

Worked Example: A Quarter-Turn of a Point

Rotate \(\mathbf{x}=\begin{bmatrix}3\\2\end{bmatrix}\) counterclockwise by \(90^\circ=\frac{\pi}{2}\).

Since \(\cos\frac{\pi}{2}=0\) and \(\sin\frac{\pi}{2}=1\), the standard matrix is

$$ \mathbf{R}_{\pi/2}= \begin{bmatrix} 0&-1\\ 1&0 \end{bmatrix}. $$

Multiply the matrix by the input column:

$$ \mathbf{R}_{\pi/2}\mathbf{x} = \begin{bmatrix} 0&-1\\ 1&0 \end{bmatrix} \begin{bmatrix}3\\2\end{bmatrix} = \begin{bmatrix} 0\cdot3+(-1)\cdot2\\ 1\cdot3+0\cdot2 \end{bmatrix} = \begin{bmatrix}-2\\3\end{bmatrix}. $$

Check: the basis images are \(\mathbf{e}_1\mapsto\begin{bmatrix}0\\1\end{bmatrix}\) and \(\mathbf{e}_2\mapsto\begin{bmatrix}-1\\0\end{bmatrix}\). Therefore \(3\mathbf{e}_1+2\mathbf{e}_2\) maps to \(3\begin{bmatrix}0\\1\end{bmatrix}+2\begin{bmatrix}-1\\0\end{bmatrix}=\begin{bmatrix}-2\\3\end{bmatrix}\), as the matrix calculation gives.

Worked Example: A Rotation Through \(60^\circ\)

Rotate \(\mathbf{x}=\begin{bmatrix}2\\-2\end{bmatrix}\) counterclockwise by \(60^\circ=\frac{\pi}{3}\). Use \(\cos\frac{\pi}{3}=\frac12\) and \(\sin\frac{\pi}{3}=\frac{\sqrt3}{2}\), so

$$ \mathbf{R}_{\pi/3}= \begin{bmatrix} \frac12&-\frac{\sqrt3}{2}\\ \frac{\sqrt3}{2}&\frac12 \end{bmatrix}. $$

Then

$$ \mathbf{R}_{\pi/3}\mathbf{x} = \begin{bmatrix} \frac12\cdot2+\left(-\frac{\sqrt3}{2}\right)(-2)\\ \frac{\sqrt3}{2}\cdot2+\frac12(-2) \end{bmatrix} = \begin{bmatrix} 1+\sqrt3\\ \sqrt3-1 \end{bmatrix}. $$

Check: the input has squared length \(2^2+(-2)^2=8\). The output has squared length \((1+\sqrt3)^2+(\sqrt3-1)^2=(4+2\sqrt3)+(4-2\sqrt3)=8\). The lengths agree, as expected for a rotation.

Deriving the Uniform Scaling Matrix

Scaling by \(k\) multiplies every vector by \(k\). In particular, it sends \(\mathbf{e}_1\) to \(\begin{bmatrix}k\\0\end{bmatrix}\) and \(\mathbf{e}_2\) to \(\begin{bmatrix}0\\k\end{bmatrix}\). These images determine the two columns of its standard matrix.

Theorem (Standard matrix for uniform scaling): Uniform scaling about the origin by factor \(k\ge0\) is represented by $$ \mathbf{S}_k= \begin{bmatrix} k&0\\ 0&k \end{bmatrix} =k\mathbf{I}_2. $$ It sends \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\end{bmatrix}\) to \(\begin{bmatrix}kx_1\\kx_2\end{bmatrix}\).

Proof. The images of the standard basis vectors are \(S_k(\mathbf{e}_1)=\begin{bmatrix}k\\0\end{bmatrix}\) and \(S_k(\mathbf{e}_2)=\begin{bmatrix}0\\k\end{bmatrix}\). Hence the columns of the standard matrix are \(\begin{bmatrix}k\\0\end{bmatrix}\) and \(\begin{bmatrix}0\\k\end{bmatrix}\), giving \(\mathbf{S}_k=\begin{bmatrix}k&0\\0&k\end{bmatrix}\). For any \(\mathbf{x}=x_1\mathbf{e}_1+x_2\mathbf{e}_2\), linearity gives \(S_k(\mathbf{x})=x_1\begin{bmatrix}k\\0\end{bmatrix}+x_2\begin{bmatrix}0\\k\end{bmatrix}=\begin{bmatrix}kx_1\\kx_2\end{bmatrix}\). This is exactly \(k\mathbf{x}\), including when \(k=0\). \(\square\)

Worked Example: Scaling a Point by \(\frac32\)

Scale \(\mathbf{x}=\begin{bmatrix}-4\\2\end{bmatrix}\) uniformly about the origin by factor \(k=\frac32\). The matrix is

$$ \mathbf{S}_{3/2}= \begin{bmatrix} \frac32&0\\ 0&\frac32 \end{bmatrix}. $$

Applying it gives

$$ \mathbf{S}_{3/2}\mathbf{x} = \begin{bmatrix} \frac32&0\\ 0&\frac32 \end{bmatrix} \begin{bmatrix}-4\\2\end{bmatrix} = \begin{bmatrix} \frac32(-4)+0\cdot2\\ 0\cdot(-4)+\frac32\cdot2 \end{bmatrix} = \begin{bmatrix}-6\\3\end{bmatrix}. $$

Check: the input length is \(\sqrt{(-4)^2+2^2}=\sqrt{20}\). The output length is \(\sqrt{(-6)^2+3^2}=\sqrt{45}=3\sqrt5\), while \(\frac32\sqrt{20}=3\sqrt5\). The length has been multiplied by \(\frac32\), and both coordinates retain their signs.

What Happens to Length and Direction?

For \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\end{bmatrix}\), its Euclidean length is \(\|\mathbf{x}\|=\sqrt{x_1^2+x_2^2}\). The rotation matrix preserves this length, while scaling multiplies it by \(k\). These facts can be checked directly from the coordinate formulas.

Theorem: For every \(\mathbf{x}\in\mathbb{R}^2\), rotation through angle \(\theta\) satisfies \(\|R_\theta(\mathbf{x})\|=\|\mathbf{x}\|\). For every \(k\ge0\), scaling satisfies \(\|S_k(\mathbf{x})\|=k\|\mathbf{x}\|\). When \(k>0\) and \(\mathbf{x}\ne\mathbf{0}\), the scaled vector has the same direction as \(\mathbf{x}\); when \(k=0\), every input maps to \(\mathbf{0}\).

Proof. Write \(c=\cos\theta\) and \(s=\sin\theta\). The rotation formula gives \(R_\theta(\mathbf{x})=\begin{bmatrix}cx_1-sx_2\\sx_1+cx_2\end{bmatrix}\). Its squared length is \((cx_1-sx_2)^2+(sx_1+cx_2)^2=(c^2+s^2)x_1^2+(c^2+s^2)x_2^2=x_1^2+x_2^2\), because the cross terms \(-2csx_1x_2\) and \(2csx_1x_2\) cancel and \(c^2+s^2=1\). Taking nonnegative square roots proves the rotation claim. For scaling, \(\|S_k(\mathbf{x})\|=\|k\mathbf{x}\|=\sqrt{(kx_1)^2+(kx_2)^2}=k\sqrt{x_1^2+x_2^2}=k\|\mathbf{x}\|\), since \(k\ge0\). If \(k>0\) and \(\mathbf{x}\ne\mathbf{0}\), the output \(k\mathbf{x}\) is a positive multiple of the input, so it points in the same direction. If \(k=0\), then \(S_0(\mathbf{x})=\mathbf{0}\) for every \(\mathbf{x}\); the zero vector has no direction. \(\square\)

The same length statements describe distances between any two points. For rotation, the difference between the images of \(\mathbf{x}\) and \(\mathbf{y}\) is \(R_\theta(\mathbf{x})-R_\theta(\mathbf{y})=R_\theta(\mathbf{x}-\mathbf{y})\), so its length equals \(\|\mathbf{x}-\mathbf{y}\|\). For scaling, the difference is \(k(\mathbf{x}-\mathbf{y})\), whose length is \(k\|\mathbf{x}-\mathbf{y}\|\). Thus rotation preserves all distances, and uniform scaling multiplies all distances by the same nonnegative factor.

Common Pitfalls

Reversing the rotation signs changes the direction. A common incorrect matrix for a counterclockwise rotation is \(\begin{bmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{bmatrix}\). At \(\theta=\frac{\pi}{2}\), this becomes \(\begin{bmatrix}0&1\\-1&0\end{bmatrix}\), which sends \(\mathbf{e}_1=\begin{bmatrix}1\\0\end{bmatrix}\) to \(\begin{bmatrix}0\\-1\end{bmatrix}\). That points downward, so the matrix describes a clockwise quarter-turn, not the specified counterclockwise one. The correction is to use \(\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}\), whose first column sends \(\mathbf{e}_1\) upward at \(\frac{\pi}{2}\).

Do not claim that zero scaling preserves direction. For \(k=0\), \(\mathbf{S}_0\begin{bmatrix}1\\2\end{bmatrix}=\begin{bmatrix}0\\0\end{bmatrix}\). The input is nonzero, but the output is the zero vector, which has no direction. The accurate statement is that positive scaling preserves the direction of every nonzero point; zero scaling sends every point to the origin.

Both transformations are linear because their formulas are given by multiplication by a matrix. Their matrices also show why basis images are central: the columns record the transformed coordinate axes, and every other point follows by expressing it as a linear combination of those axes. Rotation keeps the two axis images at right angles and preserves length; uniform scaling multiplies each axis by the same factor.

Check Your Understanding

Use the matrix formulas and verify each computed image by substituting the coordinates.

  1. Write the standard matrix for a counterclockwise rotation through \(180^\circ\), and find the image of \(\begin{bmatrix}2\\-3\end{bmatrix}\).
  2. Find the images of \(\mathbf{e}_1\) and \(\mathbf{e}_2\) under rotation through \(\frac{\pi}{4}\).
  3. Scale \(\begin{bmatrix}4\\-2\end{bmatrix}\) by factor \(\frac12\), and compare the input and output lengths.
  4. Explain why scaling by \(k=0\) does not preserve the direction of a nonzero input.
  5. For the proposed matrix \(\begin{bmatrix}0&1\\-1&0\end{bmatrix}\), determine whether the quarter-turn is clockwise or counterclockwise by applying it to \(\mathbf{e}_1\).

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon