Skip to content
VidiMaster it, module by module
Module 1/Matrices

Geometric Transformations in ℝ²

Every scaling, rotation, reflection, and shear of the plane is captured by a single 2×22\times 2 matrix, and applying the transformation is just matrix-vector multiplication. This lesson teaches you to read a matrix as a geometric motion and to build the matrix for the motion you want.

Before you start — give these a try

Attempting first primes your brain for the lesson — even if you miss. Nothing is graded or saved; it's just a warm-up.

Write the 2×22\times 2 matrix for a counterclockwise rotation by 180∘180^\circ about the origin.

Write the 2×22\times 2 matrix for a horizontal shear with shear factor k=3k = 3.

What you’ll be able to do

  • Construct the 2×2 matrix for scaling, rotation, reflection, and shear transformations of the plane.
  • Identify the geometric transformation represented by a given 2×2 matrix.
  • Compute the image of a point under a transformation using matrix-vector multiplication.
  • Explain why the columns of a transformation matrix are the images of the standard basis vectors.
  • Build exact rotation matrices for θ ∈ {90°, 180°, 270°} and the approximate matrix for a 45° rotation.

In your course

· MATH2015 · Linear Algebra & Probability
§4.1 Matrices and linear maps ℝ²→ℝ²
  • Theorem 4.12×2 matrices ⟷ linear maps of the plane
  • Example 4.1Rotation, reflection, scaling, shear
    Counter-clockwise rotation by θ\theta: [cos⁡θ−sin⁡θsin⁡θcos⁡θ]\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}; reflection in the axis at angle θ/2\theta/2: [cos⁡θsin⁡θsin⁡θ−cos⁡θ]\begin{bmatrix}\cos\theta&\sin\theta\\\sin\theta&-\cos\theta\end{bmatrix}; shears [1k01]\begin{bmatrix}1&k\\0&1\end{bmatrix}, [10k1]\begin{bmatrix}1&0\\k&1\end{bmatrix}.
1

Transformations are matrix multiplication

A geometric transformation of the plane is a rule that takes each point and moves it somewhere new. We write points as column vectors:

v=[xy],\mathbf{v} = \begin{bmatrix} x \\ y \end{bmatrix},

where xx and yy are the horizontal and vertical coordinates.

The transformations we care about here are linear: they keep the origin fixed, send straight lines to straight lines, and keep grid lines evenly spaced. Every such transformation TT can be written as multiplication by a fixed 2×22\times 2 matrix AA:

T(v)=Av.T(\mathbf{v}) = A\mathbf{v}.

If A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, the product is computed row-by-column:

Av=[abcd][xy]=[ax+bycx+dy].A\mathbf{v} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}.

The image of v\mathbf{v} is the output vector AvA\mathbf{v}. So the whole geometric question — where does this point go? — becomes a single multiplication.

2

The columns tell the whole story

Here is the key idea that makes every matrix below easy to remember. Let the standard basis vectors be

e1=[10],e2=[01],\mathbf{e}_1 = \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \qquad \mathbf{e}_2 = \begin{bmatrix} 0 \\ 1 \end{bmatrix},

the unit arrows pointing right and up. Multiplying A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} by them picks out the columns:

Ae1=[ac],Ae2=[bd].A\mathbf{e}_1 = \begin{bmatrix} a \\ c \end{bmatrix}, \qquad A\mathbf{e}_2 = \begin{bmatrix} b \\ d \end{bmatrix}.

So the first column of AA is where e1\mathbf{e}_1 lands, and the second column is where e2\mathbf{e}_2 lands. To build the matrix for any transformation, just ask two questions: Where does the right-pointing arrow go? and Where does the up-pointing arrow go? Stack those two answers as columns and you are done. To read a matrix, do the reverse: look at its columns to see what happens to the two basis arrows.

3

A catalog of plane transformations

Using the column idea, here are the standard transformations. In each case sx,sy,θ,ks_x, s_y, \theta, k are given numbers and (x,y)(x,y) is a general point.

Scaling by factors sxs_x horizontally and sys_y vertically stretches each axis independently: diag⁡(sx,sy)=[sx00sy],(x,y)↦(sxx,  syy).\operatorname{diag}(s_x, s_y) = \begin{bmatrix} s_x & 0 \\ 0 & s_y \end{bmatrix}, \qquad (x,y) \mapsto (s_x x,\; s_y y).

Rotation counterclockwise about the origin by angle θ\theta: R(θ)=[cos⁡θ−sin⁡θsin⁡θcos⁡θ].R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}. For the clean angles: R(90∘)=[0−110]R(90^\circ) = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, R(180∘)=[−100−1]R(180^\circ) = \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}, R(270∘)=[01−10]R(270^\circ) = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}. For 45∘45^\circ, use cos⁡45∘=sin⁡45∘≈0.7071\cos 45^\circ = \sin 45^\circ \approx 0.7071.

Reflections flip the plane across a line through the origin: across the x-axis: [100−1],across the y-axis: [−1001],across y=x:[0110].\text{across the } x\text{-axis: } \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}, \quad \text{across the } y\text{-axis: } \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}, \quad \text{across } y=x: \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}. Reflecting across y=xy=x simply swaps the coordinates: (x,y)↦(y,x)(x,y)\mapsto(y,x).

Shears slide the plane parallel to one axis by an amount proportional to the other coordinate: horizontal: [1k01]    (x,y)↦(x+ky,  y),vertical: [10k1]    (x,y)↦(x,  kx+y).\text{horizontal: } \begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix} \;\;(x,y)\mapsto(x+ky,\;y), \qquad \text{vertical: } \begin{bmatrix} 1 & 0 \\ k & 1 \end{bmatrix} \;\;(x,y)\mapsto(x,\;kx+y). Here kk is the shear factor controlling how much the plane is slanted.

4

Composing transformations

To apply one transformation and then another, you multiply the matrices. If T1(v)=A1vT_1(\mathbf{v}) = A_1\mathbf{v} is done first and T2(v)=A2vT_2(\mathbf{v}) = A_2\mathbf{v} second, the combined effect is

T2(T1(v))=A2 (A1v)=(A2A1) v.T_2\big(T_1(\mathbf{v})\big) = A_2\,(A_1\mathbf{v}) = (A_2 A_1)\,\mathbf{v}.

Notice the matrix of the first transformation sits on the right, next to the vector — because that is what touches v\mathbf{v} first.

Order matters. Matrix multiplication is generally not commutative, A2A1≠A1A2A_2 A_1 \neq A_1 A_2, so rotating then reflecting usually gives a different result than reflecting then rotating. Always compose in the order the transformations actually happen.

Standard Matrix of a Linear Transformation

If T:R2→R2T:\mathbb{R}^2 \to \mathbb{R}^2 is linear, then T(v)=AvT(\mathbf{v}) = A\mathbf{v} for the unique matrix A=[ T(e1)    T(e2) ]A = \big[\,T(\mathbf{e}_1)\;\;T(\mathbf{e}_2)\,\big] whose columns are the images of the standard basis vectors e1=[10]\mathbf{e}_1 = \begin{bmatrix}1\\0\end{bmatrix} and e2=[01]\mathbf{e}_2 = \begin{bmatrix}0\\1\end{bmatrix}.

Intuition. A linear map is completely pinned down by what it does to the two basis arrows, because every other vector is a combination of them. Record those two destinations as columns and you can reproduce the map anywhere by multiplication.
Rotation Matrix

Counterclockwise rotation of R2\mathbb{R}^2 about the origin by angle θ\theta is given by R(θ)=[cos⁡θ−sin⁡θsin⁡θcos⁡θ]R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}.

Intuition. The right-pointing arrow e1\mathbf{e}_1 swings to (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta) and the up-pointing arrow e2\mathbf{e}_2 swings to (−sin⁡θ,cos⁡θ)(-\sin\theta, \cos\theta). Reading those as columns gives the matrix, and because lengths and the right angle between the arrows are preserved, the whole plane simply turns.
Matrix of a Composition

If T1(v)=A1vT_1(\mathbf{v}) = A_1\mathbf{v} is applied first and T2(v)=A2vT_2(\mathbf{v}) = A_2\mathbf{v} second, then the composition satisfies (T2∘T1)(v)=(A2A1)v(T_2 \circ T_1)(\mathbf{v}) = (A_2 A_1)\mathbf{v}.

Intuition. Doing transformations back-to-back is the same as multiplying their matrices, with the first-applied matrix on the right next to the vector. Since matrix multiplication need not commute, swapping the order can change the result.

Worked examples

Example 1

Rotate the point P=(4,2)P = (4, 2) counterclockwise by 90∘90^\circ about the origin. Find its image.

  1. 1

    Choose the right matrix. A rotation uses R(θ)=[cos⁡θ−sin⁡θsin⁡θcos⁡θ]R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}, and here θ=90∘\theta = 90^\circ.

  2. 2

    Plug in the angle. Since cos⁡90∘=0\cos 90^\circ = 0 and sin⁡90∘=1\sin 90^\circ = 1, the matrix becomes R(90∘)=[0−110]R(90^\circ) = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}.

  3. 3

    Write the point as a column vector. v=[42]\mathbf{v} = \begin{bmatrix} 4 \\ 2 \end{bmatrix}.

  4. 4

    Multiply row-by-column. Top entry: 0⋅4+(−1)⋅2=−20\cdot 4 + (-1)\cdot 2 = -2. Bottom entry: 1⋅4+0⋅2=41\cdot 4 + 0\cdot 2 = 4. So R(90∘)v=[−24]R(90^\circ)\mathbf{v} = \begin{bmatrix} -2 \\ 4 \end{bmatrix}.

  5. 5

    Sanity-check. The distance from the origin should not change. Original: 42+22=20\sqrt{4^2+2^2}=\sqrt{20}. Image: (−2)2+42=20\sqrt{(-2)^2+4^2}=\sqrt{20}. It matches, and the point has swung a quarter-turn counterclockwise, as expected.

Answer. The image is (−2,4)(-2, 4).
Example 2

A transformation is given by M=[0110]M = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}. Name the transformation and find the image of (2,5)(2, 5).

Example 3

Apply a horizontal shear with factor k=2k = 2 to the point (1,3)(1, 3), and then reflect the result across the xx-axis.