topic badge

4.13 Matrices as functions

Lesson

Introduction

Learning objectives

  • 4.13.A - Determine the association between a linear transformation and a matrix.
  • 4.13.B - Determine the composition of two linear transformations.
  • 4.13.C - Determine the inverse of a linear transformation.

Linear transformation and matrices

A linear transformation is a map between two vector spaces that preserves the operations of addition and scalar multiplication. When we're dealing with vectors in the plane, these transformations can often be associated with a specific 2 \times 2matrix.

The rule to find the associated matrix is to see how the transformation acts on the unit vectors in the plane.

The general form of a linear transformation of a vector \left\langle x,\,y \right\rangle in the plane is given by: L:\left\langle x,\,y \right\rangle \longrightarrow \left\langle a_{11} x + a_{12} y,\, a_{21} x + a_{22} y\right\rangle

The matrix associated with this transformation is \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}. Each element in the matrix corresponds to a coefficient in the transformation. This is because when this matrix multiplies a vector, it gives the same result as the linear transformation.

The mapping of unit vectors, such as \overrightarrow{i} = \left\langle 1,\,0 \right\rangle and \overrightarrow{j} = \left\langle 0,\,1 \right\rangle under a linear transformation can help us determine the matrix associated with a linear transformation. By applying the transformation to these vectors and seeing where they end up, the transformed unit vectors essentially become the columns of the corresponding transformation matrix.

There are also special matrices associated with specific types of transformations. For example, the matrix \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin\theta & \cos \theta \end{bmatrix} corresponds to a rotation by \theta degrees counterclockwise. This rotation matrix is multiplied by the given vector.

The determinant of a 2 \times 2 transformation matrix, calculated as a_{11} a_{22} - a_{12}a_{21} or ad - bc has a special significance: its absolute value gives the scale factor under the transformation.

Examples

Example 1

Given the linear transformation T that maps \left\langle x,\,y \right\rangle to \left\langle 2x + y ,\, x - 3y \right\rangle, find the matrix associated with T.

Worked Solution
Create a strategy

The coefficients of the transformation correspond to the matrix associated with T.

Apply the idea

Each row of the matrix associated with a transformation corresponds to the coefficients of the components. The matrix is \begin{bmatrix} 2 & 1 \\ 1 & -3 \end{bmatrix}.

Example 2

Given the matrix \begin{bmatrix} 4 & -1 \\ 2 & 3 \end{bmatrix}, find the linear transformation associated with this matrix.

Worked Solution
Create a strategy

The rows of the matrix correspond to the coefficients of the transformation.

Apply the idea

The linear transformation maps \left\langle x,\,y \right\rangle to \left\langle 4x - y,\, 2x + 3y \right\rangle.

Example 3

Suppose you have the vector \overrightarrow{v} = \left\langle 2,\,2 \right\rangle.

a

What is the result of rotating this vector 90 degrees counterclockwise about the origin?

Worked Solution
Create a strategy

Use the rotation matrix \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} and multiply by the given vector.

Apply the idea
\displaystyle \text{Result}\displaystyle =\displaystyle \begin{bmatrix} \cos ( 90) & -\sin ( 90) \\ \sin ( 90) & \cos ( 90) \end{bmatrix}Substitute \theta = 90
\displaystyle =\displaystyle \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}Simplify
\displaystyle =\displaystyle \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 2 \\ 2 \end{bmatrix}Multiply the matrix and the vector
\displaystyle =\displaystyle \begin{bmatrix} -2 \\ 2 \end{bmatrix}Evaluate
b

What is the result of rotating this vector 45 degrees counterclockwise about the origin?

Worked Solution
Create a strategy

Use the rotation matrix \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} and multiply by the 2 \times 1 matrix representing the given vector.

Apply the idea
\displaystyle \text{Result}\displaystyle =\displaystyle \begin{bmatrix} \cos ( 45) & -\sin ( 45) \\ \sin ( 45) & \cos ( 45) \end{bmatrix}Substitute \theta = 45
\displaystyle =\displaystyle \begin{bmatrix} \dfrac{\sqrt{2}}{2} & -\dfrac{\sqrt{2}}{2} \\\\ \dfrac{\sqrt{2}}{2} &\dfrac{\sqrt{2}}{2} \end{bmatrix}Simplify
\displaystyle =\displaystyle \begin{bmatrix} \dfrac{\sqrt{2}}{2} & -\dfrac{\sqrt{2}}{2} \\\\ \dfrac{\sqrt{2}}{2} &\dfrac{\sqrt{2}}{2} \end{bmatrix}\begin{bmatrix} 2 \\ 2 \end{bmatrix}Multiply the matrix and the vector
\displaystyle =\displaystyle \begin{bmatrix} 0 \\ 2 \sqrt{2} \end{bmatrix}Evaluate

Example 4

Consider a linear transformation that doubles the x-coordinate and triples the y-coordinate of any given vector.

a

Write the transformation matrix associated with this transformation.

Worked Solution
Create a strategy

The transformation matrix is associated with the coefficients of the transformation.

Apply the idea

The transformation can be written as v = \left\langle 2x,\, 3y\right\rangle which can be also written as \left\langle 2x+ 0y,\, 0x + 3y\right\rangle.

The associated matrix is \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}.

b

What is the image of the vector v = \left\langle 3,\, 2\right\rangle under this transformation?

Worked Solution
Create a strategy

Multiply the associated transformation matrix by the 2 \times 1 matrix associated with the vector.

Apply the idea
\displaystyle \text{Image of the vector}\displaystyle =\displaystyle \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}\begin{bmatrix} 3 \\ 2 \end{bmatrix}Multiply the matrix and the vector
\displaystyle =\displaystyle \begin{bmatrix} 6 \\ 6 \end{bmatrix}Evaluate
Idea summary

A linear transformation mapping a vector L:\left\langle x,\,y \right\rangle \longrightarrow \left\langle a_{11} x + a_{12} y,\, a_{21} x + a_{22} y\right\rangle can be represented by the corresponding matrix \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}. The mapping of unit vectors under a transformation can help determine the associated matrix. Special transformations like rotation were associated with specific matrices such as \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin\theta & \cos \theta \end{bmatrix} for a rotation of \theta degrees counterclockwise. The determinant of a transformation matrix can indicate the scaling factor for areas under the transformation.

Composition of two linear transformations

Linear transformations can be composed, meaning you can apply one transformation and then another. The composition of two linear transformations is itself a linear transformation.

Suppose we have two linear transformations, T and U. The composition of T and U, denoted by T(U(\overrightarrow{v})), is a new transformation that first applies U to the vector v, and then applies T to the result.

The matrix associated with the composition of two transformations is the product of the matrices associated with each transformation. If T is associated with the matrix A and U is associated with the matrix B, then the composition T(U(\overrightarrow{v})) is associated with the matrix product AB.

Note that matrix multiplication is not commutative, meaning that in general, AB \neq BA. This means the order in which you apply the transformations matters.

Examples

Example 5

Given the linear transformations T and U associated with the matrices A = \begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix} and \\B = \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix} respectively, find the matrix associated with the composition T(U(v)).

Worked Solution
Create a strategy

The composition T(U(v)) is represented by the product of the matrices A \times B.

Apply the idea
\displaystyle \begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix}\displaystyle =\displaystyle \begin{bmatrix} 2 & 2 \\ 1 & -2 \end{bmatrix}Evaluate

Example 6

Given the matrices A = \begin{bmatrix} 3 & 1 \\ 0 & 2 \end{bmatrix} and B = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}, find the matrix associated with the composition of the transformations associated with A and B in the order BA.

Worked Solution
Create a strategy

The composition of transformations is represented by the product of B \times A.

Apply the idea
\displaystyle \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}\begin{bmatrix} 3 & 1 \\ 0 & 2 \end{bmatrix}\displaystyle =\displaystyle \begin{bmatrix} 6 & 2 \\ 3 & 7 \end{bmatrix}Evaluate

Example 7

Is the composition of the transformations associated with the matrices A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} and \begin{bmatrix} 2 & 0 \\ 1 & 2 \end{bmatrix} the same regardless of order (i.e., does AB = BA)?

Worked Solution
Create a strategy

Multiply the matrices in AB order, then multiply in BA order, and compare.

Apply the idea
\displaystyle AB\displaystyle =\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\begin{bmatrix} 2 & 0 \\ 1 & 2 \end{bmatrix}Substitute the matrices A and B
\displaystyle =\displaystyle \begin{bmatrix} 4 & 4 \\ 10 & 8 \end{bmatrix}Evaluate
\displaystyle BA\displaystyle =\displaystyle \begin{bmatrix} 2 & 0 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}Substitute the matrices B and A
\displaystyle =\displaystyle \begin{bmatrix} 2 & 4 \\ 7 & 10 \end{bmatrix}Evaluate

So AB \neq BA. The order of composition matters.

Idea summary

The composition of two linear transformations is itself a linear transformation, and its associated matrix is the product of the matrices for the individual transformations. Remember that the order of transformations matters as matrix multiplication is not commutative.

Inverse of a linear transformation

The inverse of a linear transformation is another transformation that undoes the effect of the original one. That is, if we have a transformation L represented by a matrix A, its inverse transformation, denoted by L^{-1}, is represented by the inverse of the matrix A, denoted by A^{-1}.

If a linear transformation L maps a vector v to a vectorw, then its inverse transformation L^{-1} maps w back to v. Written another way, if L(\overrightarrow{v}) = \overrightarrow{w}, then L^{-1}(\overrightarrow{w}) = \overrightarrow{v}.

Not all matrices have an inverse. Only square matrices (i.e., matrices with an equal number of rows and columns) can potentially have an inverse, and even among square matrices, only those with a nonzero determinant have an inverse.

The inverse of a 2 \times 2 matrix \begin{bmatrix} a & b \\ c & d \end{bmatrix} is given by \dfrac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}, provided ad - bc \neq 0.

Examples

Example 8

Consider the linear transformation L which maps \left\langle x,\,y \right\rangle to \left\langle 2x,\,3y \right\rangle.

a

Determine the transformation matrix associated with L.

Worked Solution
Create a strategy

The transformation matrix is associated with the coefficients of the transformation.

Apply the idea

The transformation can be written as \left\langle 2x,\,3y \right\rangle which can be also written as \left\langle 2x + 0y,\,0x +3y \right\rangle. The associated matrix is \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}.

b

What is the inverse of this transformation? Represent it as a matrix.

Worked Solution
Create a strategy

The inverse of the matrix \begin{bmatrix} a & b \\ c & d \end{bmatrix} is defined as \dfrac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix} when the determinant is not 0.

Apply the idea
\displaystyle \text{Determinant of the matrix}\displaystyle =\displaystyle \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}Write the associated matrix from part (a)
\displaystyle =\displaystyle (2)(3) - (0)(0)Write as ad - bc
\displaystyle =\displaystyle 6Evaluate
\displaystyle \text{Inverse of the transformation}\displaystyle =\displaystyle \dfrac{1}{6}\begin{bmatrix} 3 & 0 \\ 0 & 2 \end{bmatrix}Substitute a=2,\,b=0,\,c=0,\, and d=3
\displaystyle =\displaystyle \begin{bmatrix} 3\cdot \dfrac{1}{6} & 0\cdot \dfrac{1}{6} \\\\ 0\cdot \dfrac{1}{6} & 2\cdot \dfrac{1}{6} \end{bmatrix}Multiply each elements by \dfrac{1}{6}
\displaystyle =\displaystyle \begin{bmatrix} \dfrac{3}{6} & 0 \\ 0 & \dfrac{2}{6} \end{bmatrix}Evaluate the product
\displaystyle =\displaystyle \begin{bmatrix} \dfrac{1}{2} & 0 \\ 0 & \dfrac{1}{3} \end{bmatrix}Simplify

Example 9

Let L be a linear transformation represented by the matrix A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}. Given a vector v = \left\langle 5,\, 6 \right\rangle, find the vector that was transformed into v by L.

Worked Solution
Create a strategy

Find L^{-1}(\overrightarrow{v}). To do so, find A^{-1} and multiply by \overrightarrow{v}.

Apply the idea
\displaystyle A^{-1}\displaystyle =\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}^{-1}Substitute the values of matrix A
\displaystyle =\displaystyle \dfrac{1}{-2}\begin{bmatrix} 4 & -2 \\ -3 & 1 \end{bmatrix}Write as \dfrac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}
\displaystyle =\displaystyle \begin{bmatrix} 4\cdot \dfrac{1}{-2} & -2\cdot \dfrac{1}{-2} \\\\ -3\cdot \dfrac{1}{-2} & 1\cdot \dfrac{1}{-2} \end{bmatrix}Multiply each elements by \dfrac{1}{-2}
\displaystyle =\displaystyle \begin{bmatrix} -2 & 1 \\ \dfrac{3}{2} & -\dfrac{1}{2} \end{bmatrix}Evaluate
\displaystyle \overrightarrow{v}\displaystyle =\displaystyle \begin{bmatrix} -2 & 1 \\ \dfrac{3}{2} & -\dfrac{1}{2} \end{bmatrix} \times \begin{bmatrix} 5 ,\, 6 \end{bmatrix}Multiply A^{-1} by v
\displaystyle =\displaystyle \begin{bmatrix} -2(5) + 1(6) \\ \dfrac{3}{2}(5) + -\dfrac{1}{2}(6) \end{bmatrix} Multiply the matrix by the vector
\displaystyle =\displaystyle \begin{bmatrix} - 4 \\ \dfrac{9}{2} \end{bmatrix}Evaluate

So, the vector \begin{bmatrix} - 4 \\ \dfrac{9}{2} \end{bmatrix} was transformed into v by L.

Idea summary

The inverse of a linear transformation is another transformation that undoes the effect of the original one. It is represented by the inverse of the matrix for the original transformation, which can be calculated if the matrix is square and its determinant is nonzero. Not all transformations have an inverse.

Outcomes

4.13.A

Determine the association between a linear transformation and a matrix.

4.13.B

Determine the composition of two linear transformations.

4.13.C

Determine the inverse of a linear transformation.

What is Mathspace

About Mathspace