Skip to main content

Section 1.9 More on Linear Transformations

Handout 1.9 More on Linear Transformation

Comic showing a humorous matrix transformation.

Definition 1.56 The Standard Vectors.

The standard vectors in \(\mathbb{R}^n\) are the vectors \(\vec e_1, \vec e_2, \ldots, \vec e_n\text{.}\)
They are:
\begin{equation*} \vec e_1 = \begin{bmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{bmatrix}, \qquad \vec e_2 = \begin{bmatrix} 0 \\ 1 \\ \vdots \\ 0 \end{bmatrix}, \qquad \ldots, \qquad \vec e_n = \begin{bmatrix} 0 \\ 0 \\ \vdots \\ 1 \end{bmatrix}. \end{equation*}
For example, in \(\mathbb{R}^3\text{:}\)
\begin{equation*} \vec e_1=\begin{bmatrix}1\\0\\0\end{bmatrix}, \qquad \vec e_2=\begin{bmatrix}0\\1\\0\end{bmatrix}, \qquad \vec e_3=\begin{bmatrix}0\\0\\1\end{bmatrix}. \end{equation*}
Note: If \(A\) is an \(m\times n\) matrix with columns \(\vec v_1,\vec v_2,\ldots,\vec v_n\text{,}\) then
\begin{equation*} A\vec e_i = \vec v_i, \text{ for } i=1,2,\ldots,n. \end{equation*}
So multiplying a matrix by \(\vec e_i\) gives column \(i\) of \(A\text{.}\)

Example 1.57 Example.

Compute:
\begin{equation*} \begin{bmatrix} 1 \amp 2 \amp 3\\ 4 \amp 5 \amp 6\\ 7 \amp 8 \amp 9 \end{bmatrix}\vec e_2. \end{equation*}
Solution.
Note that
\begin{equation*} \begin{bmatrix}1 \amp 2 \amp 3 \\ 4 \amp 5 \amp 6 \\ 7 \amp 8 \amp 9 \end{bmatrix}\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} = 0\begin{bmatrix} 1 \\ 4 \\ 7 \end{bmatrix} + 1\begin{bmatrix} 2 \\ 5 \\ 8 \end{bmatrix} + 0\begin{bmatrix} 3 \\ 6 \\ 9 \end{bmatrix} = \begin{bmatrix} 2 \\ 5 \\ 8 \end{bmatrix} \end{equation*}
which is the second column of \(A\text{.}\)
The matrix \(A\) is the standard matrix for the linear transformation \(T\text{.}\)

Example 1.59.

What is the linear transformation \(T:\mathbb{R}^2 \to \mathbb{R}^2\) defined by β€œrotates vectors counterclockwise by angle \(\theta\)”?
Solution.
Let us determine \(A\) such that \(T(\vec x) = A\vec x \) is rotation by \(\theta\) degrees counterclockwise. By TheoremΒ 1.58, we need to determine \(T\left(\begin{bmatrix} 1 \\ 0 \end{bmatrix}\right)\) and \(T\left(\begin{bmatrix} 0 \\ 1 \end{bmatrix}\right)\text{.}\)
First, note that \(T\left(\begin{bmatrix} 1 \\ 0 \end{bmatrix}\right)\) is the vector in \(\mathbb{R}^2\) obtained by rotating the vector \(\begin{bmatrix} 1 \\ 0 \end{bmatrix}\text{,}\) which points in the direction of \(0^\circ\text{,}\) by \(\theta\) degrees counterclockwise. The resulting vector would have terminal end at the point on the unit circle whose angle is \(\theta\text{.}\) Using trigonometry, this point is \((\cos(\theta), \sin(\theta))\text{.}\) Therefore, we have that
\begin{equation*} T\left(\begin{bmatrix}1 \\ 0 \end{bmatrix}\right) = \begin{bmatrix} \cos(\theta) \\ \sin(\theta) \end{bmatrix}\text{.} \end{equation*}
Next, note that \(T\left(\begin{bmatrix} 0 \\ 1 \end{bmatrix}\right)\) is the vector in \(\mathbb{R}^2\) obtained by rotating the vector \(\begin{bmatrix} 0 \\ 1 \end{bmatrix}\text{,}\) which points in the direction of \(90^\circ\text{,}\) by \(\theta\) degrees counterclockwise. The resulting vector would have terminal end at the point on the unit circle whose angle is \(90^\circ + \theta\text{.}\) It follows that this terminal point is \((\cos(90^\circ + \theta), \sin(90^\circ + \theta))\text{.}\) Using the sum rule for sine and cosine, we see that this terminal point can be expressed as \((-\sin(\theta), \cos(\theta))\text{.}\) Therefore, we have that
\begin{equation*} T\left(\begin{bmatrix} 0 \\ 1 \end{bmatrix}\right) = \begin{bmatrix} -\sin(\theta) \\ \cos(\theta) \end{bmatrix}\text{.} \end{equation*}
Thus, we have that the matrix \(A \) so that \(T(\vec x) = A\vec x \) results in rotating the vector \(\vec x\) by \(\theta\) degrees counterclockwise is
\begin{equation*} A = \begin{bmatrix} \cos(\theta) \amp -\sin(\theta) \\ \sin(\theta) \amp \cos(\theta) \end{bmatrix}\text{.} \end{equation*}
Let’s choose "nice" values of \(\theta\) to test out our matrix \(A\text{.}\)
  • If \(\theta = 0^\circ\text{,}\) then
    \begin{equation*} A = \begin{bmatrix} \cos(0^\circ) \amp -\sin(0^\circ) \\ \sin(0^\circ) \amp \cos(0^\circ) \end{bmatrix} = \begin{bmatrix} 1 \amp 0 \\ 0 \amp 1 \end{bmatrix}\text{.} \end{equation*}
    Note that \(T(\vec x) = A\vec x = \vec x\) for all \(\vec x \in \mathbb{R}^2\text{,}\) so \(T\) does not change any input vector \(\vec x\text{.}\) This makes sense since rotating a vector by \(0^\circ\) doesn’t change the vector.
  • If \(\theta = 180^\circ\text{,}\) then
    \begin{equation*} A = \begin{bmatrix} \cos(180^\circ) \amp -\sin(180^\circ) \\ \sin(180^\circ) \amp \cos(180^\circ) \end{bmatrix} = \begin{bmatrix} -1 \amp 0 \\ 0 \amp -1 \end{bmatrix}\text{.} \end{equation*}
    Note that \(T(\vec x) = A\vec x = -\vec x\) for all \(\vec x \in \mathbb{R}^2\text{,}\) so \(T\) makes each vector \(\vec x\) point in the opposite direction. This makes sense since rotating a vector by \(180^\circ\) also makes vectors point in the opposite direction.
  • If \(\theta = 90^\circ\text{,}\) then
    \begin{equation*} A = \begin{bmatrix} \cos(90^\circ) \amp -\sin(90^\circ) \\ \sin(90^\circ) \amp \cos(90^\circ) \end{bmatrix} = \begin{bmatrix} 0 \amp -1 \\ 1 \amp 0 \end{bmatrix}\text{.} \end{equation*}
    To see if \(T(\vec x) = A\vec x\) actually does rotate vectors counterclockwise by \(90^\circ\text{,}\) let’s calculate \(T(\vec x)\) for some special \(\vec x \in \mathbb{R}^2\text{.}\)
    • \(\vec x\) pointing in the direction of \(0^\circ\text{:}\)
      \begin{equation*} T\left(\begin{bmatrix} 1 \\ 0 \end{bmatrix}\right) = \begin{bmatrix} 0 \amp -1 \\ 1 \amp 0 \end{bmatrix}\begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \end{bmatrix} \end{equation*}
      which points in the direction of \(90^\circ\)
    • \(\vec x\) pointing in the direction of \(90^\circ\text{:}\)
      \begin{equation*} T\left(\begin{bmatrix} 0 \\ 1 \end{bmatrix}\right) = \begin{bmatrix} 0 \amp -1 \\ 1 \amp 0 \end{bmatrix}\begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} -1 \\ 0 \end{bmatrix} \end{equation*}
      which points in the direction of \(180^\circ\)
    • \(\vec x\) pointing in the direction of \(30^\circ\text{:}\)
      \begin{equation*} T\left(\begin{bmatrix} \frac{\sqrt{3}}{2} \\ \frac{1}{2} \end{bmatrix}\right) = \begin{bmatrix} 0 \amp -1 \\ 1 \amp 0 \end{bmatrix}\begin{bmatrix} \frac{\sqrt{3}}{2} \\ \frac{1}{2} \end{bmatrix} = \begin{bmatrix} -\frac{1}{2} \\ \frac{\sqrt{3}}{2} \end{bmatrix} \end{equation*}
      which points in the direction of \(120^\circ\)
    • \(\vec x\) pointing in the direction of \(45^\circ\text{:}\)
      \begin{equation*} T\left(\begin{bmatrix} \frac{\sqrt{2}}{2} \\ \frac{\sqrt{2}}{2} \end{bmatrix}\right) = \begin{bmatrix} 0 \amp -1 \\ 1 \amp 0 \end{bmatrix}\begin{bmatrix} \frac{\sqrt{2}}{2} \\ \frac{\sqrt{2}}{2} \end{bmatrix} = \begin{bmatrix} -\frac{\sqrt{2}}{2} \\ \frac{\sqrt{2}}{2} \end{bmatrix} \end{equation*}
      which points in the direction of \(135^\circ\)
    These four examples provide evidence supporting that \(T(\vec x) = A\vec x\) is rotating vectors counterclockwise by \(90^\circ\text{.}\)
There is a long list of geometric transformations of \(\mathbb{R}^2\) in many linear algebra texts (reflections, rotations, contractions and expansions, shears, projections, and more). Several are included at the end of this section.

Definition 1.60 Onto.

A linear transformation \(T:\mathbb{R}^n \to \mathbb{R}^m\) is onto if for every \(\vec b\in \mathbb{R}^m\) there exists \(\vec x\in \mathbb{R}^n\) such that \(T(\vec x)=\vec b\text{.}\) In otherwords, a linear transformation is onto if the range of \(T\) equals the codomain of \(T\text{.}\)
Onto is an existence property: for any \(\vec b\in\mathbb{R}^m\text{,}\) the system \(A\vec x=\vec b\) has a solution (where \(A\) is the standard matrix of \(T\)).
Examples
  • A rotation on the plane is onto.
  • A projection in the plane is not onto.

Definition 1.62 One-to-One.

A linear transformation \(T:\mathbb{R}^n \to \mathbb{R}^m\) is one-to-one if for every \(\vec b\in\mathbb{R}^m\) there is at most one (possibly none) \(\vec x\in\mathbb{R}^n\) such that \(T(\vec x)=\vec b\text{.}\)
One-to-one is a uniqueness property; it does not assert existence for all \(\vec b\text{.}\)
Examples
  • A rotation on the plane is one-to-one.
  • A projection in the plane is not one-to-one.

Example 1.64.

Complete the matrices below by entering numbers into the missing entries so that the stated properties are satisfied. If it isn’t possible, state why.

(a)

\(A\) is a \(2\times 3\) standard matrix for a one-to-one linear transformation.
\begin{equation*} A= \begin{bmatrix} 1 \amp 0 \amp \\ 0 \amp \amp 1 \end{bmatrix}. \end{equation*}
Solution.
It is not possible to make \(A\) the standard matrix for a one-to-one linear transformation since doing so would require \(A\) to have a pivot in every column which cannot happen since the number of pivots is at most 2 (restricted by the number of rows). In fact, it is never possible for a \(2 \times 3\) matrix to represent a one-to-one linear transformation. Geometrically, this means that no linear transformation from \(\mathbb{R}^3\) to \(\mathbb{R}^2\) can bo one-to-one. This should make sense to be impossible since there are more input vectors (3 dimensions worth) than output vectors (2 dimensions worth) so many input vectors will correspond to the same output vector.
In this example, no matter how you fill in the blanks, you will always have a pivot in each row of \(A\text{.}\) Therefore, \(A\) will definitely represent an onto linear transformation.

(b)

\(B\) is a \(3\times 2\) standard matrix for an onto linear transformation.
\begin{equation*} B= \begin{bmatrix} 1 \amp \\ \amp \\ \amp \end{bmatrix}. \end{equation*}
Solution.
It is not possible for \(B\) to represent an onto linear transformation since doing so would require \(B\) to have a pivot in every row, which is not possible since \(B\) can have at most 2 pivots (restricted by the number of columns). In fact, no \(3 \times 2\) matrix can ever represent an onto linear transformation since the most pivots such a matrix could have is 2, which means at least one of the rows will be missing a pivot. Geometrically, this is saying that no linear transformation from \(\mathbb{R}^2\) to \(\mathbb{R}^3\) can bo onto. This should make sense to be impossible since there are fewer input vectors (2 dimensions worth) than output vectors (3 dimensions worth) so how could you cover all the codomain.
In this example, there is a way to fill in the blanks to make \(B\) represent a one-to-one linear transformation, but also a way to fill in the blanks so that \(B\) represents a non one-to-one linear transformation.

(c)

\(C\) is a \(3\times 3\) standard matrix of a linear transformation that is one-to-one and onto.
\begin{equation*} C= \begin{bmatrix} 1 \amp 1 \amp 1\\ \amp \amp \\ \amp \amp \end{bmatrix}. \end{equation*}
Solution.
Note that in order for \(C\) to represent a one-to-one linear transformation, we need \(C\) to have a pivot in every column. The matrix
\begin{equation*} C = \begin{bmatrix} 1 \amp 1 \amp 1 \\ 0 \amp 1 \amp 1 \\ 0 \amp 0 \amp 1 \end{bmatrix} \end{equation*}
has a pivot in every columns. Note that \(C\) also has a pivot in every row, so it also represents an onto linear transformation. In fact, every square matrix that has a pivot in every column must also have a pivot in every row. Therefore, for square matrices, the matrix will either represent a linaer transformation which is both one-to-one and onto OR will represent a linear transformation that is neither one-to-one nor onto.

Example 1.65.

Define a linear transformation by
\begin{equation*} T(x_1,x_2)=(3x_1+x_2,\; 5x_1+7x_2,\; x_1+3x_2). \end{equation*}
Is \(T\) one-to-one? Is \(T\) onto?
Solution.
Note that
\begin{equation*} T\left(\begin{bmatrix}x_1 \\ x_2 \end{bmatrix}\right) = \begin{bmatrix} 3x_1 + x_2 \\ 5x_1 + 7x_2 \\ x_1 + 3x_2 \end{bmatrix} = \begin{bmatrix} 3 \amp 1 \\ 5 \amp 7 \\ 1 \amp 3 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}\text{.} \end{equation*}
Thus, the matrix that represent \(T\) is
\begin{equation*} A = \begin{bmatrix} 3 \amp 1 \\ 5 \amp 7 \\ 1 \amp 3 \end{bmatrix}\text{.} \end{equation*}
Note that
\begin{equation*} \begin{bmatrix} 3 \amp 1 \\ 5 \amp 7 \\ 1 \amp 3 \end{bmatrix} \sim \begin{bmatrix} 1 \amp 3 \\ 5 \amp 7 \\ 3 \amp 1 \end{bmatrix} \sim \begin{bmatrix} 1 \amp 3 \\ 0 \amp -8 \\ 0 \amp -8 \end{bmatrix} \sim \begin{bmatrix} 1 \amp 3 \\ 0 \amp 1 \\ 0 \amp 0 \end{bmatrix} \end{equation*}
has a pivot in each column, but not a pivot in each row. Therefore, \(T\) is a linear transformation which is one-to-one, but not onto.
Below are many examples of linear transformations from \(\mathbb{R}^2\) to \(\mathbb{R}^2\text{.}\)
transformation image of unit square standard matrix
reflection through \(x_1\)-axis
Unit square reflected across the horizontal axis.
Relection across \(x_2 = 0\)
\(\begin{bmatrix}1\amp 0\\0\amp -1\end{bmatrix}\)
reflection through \(x_2\)-axis
Unit square reflected across the vertical axis.
Relection across \(x_1 = 0\)
\(\begin{bmatrix}-1\amp 0\\0\amp 1\end{bmatrix}\)
reflection through \(x_2=x_1\)
Unit square reflected across diagonal line passing through (0,0) and (1,1).
Reflection across \(x_2=x_1\text{.}\)
\(\begin{bmatrix}0\amp 1\\1\amp 0\end{bmatrix}\)
reflection through \(x_2=-x_1\)
Unit square reflected across the diagonal line passing through (0,0) and (1,-1).
Reflection across \(x_2=-x_1\text{.}\)
\(\begin{bmatrix}0\amp -1\\-1\amp 0\end{bmatrix}\)
transformation image of unit square standard matrix
Horizontal contraction
Unit square compressed horizontally toward the vertical axis.
Horizontal contraction by factor \(k\) with \(|k|<1\text{.}\)
\(\begin{bmatrix}k\amp 0\\0\amp 1\end{bmatrix}\text{,}\) \(|k|<1\)
Horizontal expansion
Unit square stretched horizontally away from the vertical axis.
Horizontal expansion by factor \(k\) with \(k>1\text{.}\)
\(\begin{bmatrix}k\amp 0\\0\amp 1\end{bmatrix}\text{,}\) \(k>1\)
Vertical contraction
Unit square compressed vertically toward the horizontal axis.
Vertical contraction by factor \(k\) with \(|k|<1\text{.}\)
\(\begin{bmatrix}1\amp 0\\0\amp k\end{bmatrix}\text{,}\) \(|k|<1\)
Vertical expansion
Unit square stretched vertically away from the horizontal axis.
Vertical expansion by factor \(k\) with \(k>1\text{.}\)
\(\begin{bmatrix}1\amp 0\\0\amp k\end{bmatrix}\text{,}\) \(k>1\)
transformation image of unit square standard matrix
Horizontal shear (left)
Unit square sheared left by a horizontal shift.
Horizontal shear with parameter \(k<0\text{.}\)
\(\begin{bmatrix}1\amp k\\0\amp 1\end{bmatrix}\text{,}\) \(k<0\)
Horizontal shear (right)
Unit square sheared right by a horizontal shift.
Horizontal shear with parameter \(k>0\text{.}\)
\(\begin{bmatrix}1\amp k\\0\amp 1\end{bmatrix}\text{,}\) \(k>0\)
Vertical shear (down)
Unit square sheared downward by a vertical shift.
Vertical shear with parameter \(k<0\text{.}\)
\(\begin{bmatrix}1\amp 0\\k\amp 1\end{bmatrix}\text{,}\) \(k<0\)
Vertical shear (up)
Unit square sheared upward by a vertical shift.
Vertical shear with parameter \(k>0\text{.}\)
\(\begin{bmatrix}1\amp 0\\k\amp 1\end{bmatrix}\text{,}\) \(k>0\)
transformation image of unit square standard matrix
Projection onto the \(x_1\)-axis
Unit square flattened onto the horizontal axis.
Projection onto \(x_1\)-axis.
\(\begin{bmatrix}1\amp 0\\0\amp 0\end{bmatrix}\)
Projection onto the \(x_2\)-axis
Unit square flattened onto the vertical axis.
Projection onto \(x_2\)-axis.
\(\begin{bmatrix}0\amp 0\\0\amp 1\end{bmatrix}\)