Skip to main content

Applied Mathematics

Section 3.4 Linear Transformations

This section discusses linear transformations. In short, such a transformation will map vectors to vectors in a linear way. The definition of a linear transformation (or linear map) is the following:

Definition 3.4.1. Linear Transformation.

Let \(V\) and \(W\) be vector spaces. A linear transformation or linear map \(T\) from \(V\) to \(W\) is a function that assigns to each vector \(\vec{v} \in V\) a unique vector \(T\vec{v} \in W\) and that satisfies for each \(\vec{u}\) and \(\vec{v}\) in \(V\) and each scalar \(\alpha\text{,}\)
\begin{align} (\vec{u} + \vec{v}) \amp = T(\vec{u}) + T (\vec{v}), \tag{3.4.1}\\ T(\alpha \vec{v}) \amp = \alpha T (\vec{v}), \tag{3.4.2} \end{align}
These are also called homomorphisms and the notation explaining that a map \(T\) goes from \(V\) to \(W\) is \(T: V \rightarrow W\text{.}\)

Example 3.4.2. Reflection Map.

The reflection of any vector in \(\mathbb{R}^2\) across the horizontal axis is a linear map. Specifically this is given as
\begin{equation*} T(\begin{bmatrix} x_1 \\ x_2 \end{bmatrix})= \begin{bmatrix} x_1 \\ -x_2 \end{bmatrix} \end{equation*}
and geometrically you can see this as:
Figure 3.4.3. Mapping a vector over the \(x\)-axis
Show that this is a linear transformation.
Solution.
Specifically, we need to show that \(T\) defined above satisfies (3.4.1) and (3.4.2). Let
\begin{align*} \vec{x} \amp = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}, \amp \vec{y} \amp = \begin{bmatrix} y_1 \\ y_2 \end{bmatrix} \end{align*}
\(\alpha \in \mathbb{R}\text{,}\) then
\begin{align*} T(\vec{x}+\vec{y}) \amp = T \biggl( \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}+ \begin{bmatrix} y_1 \\ y_2 \end{bmatrix} \biggr) = T \biggl( \begin{bmatrix} x_1 + y_1 \\ x_2 + y_2 \end{bmatrix} \biggr) \\ \amp = \begin{bmatrix} x_1 + y_1 \\ -(x_2+y_2) \end{bmatrix} = \begin{bmatrix} x_1 + y_1 \\ -x_2 -y_2 \end{bmatrix} \\ \amp = \begin{bmatrix} x_1 \\ -x_2 \end{bmatrix} + \begin{bmatrix} y_1 \\ -y_2 \end{bmatrix} = T(\vec{x}) + T(\vec{y}). \end{align*}
so (3.4.1) is satisfied. Next,
\begin{align*} T(\alpha \vec{x}) \amp = T \biggl( \alpha \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \biggr) = T \biggl( \begin{bmatrix} \alpha x_1 \\ \alpha x_2 \end{bmatrix} \biggr) \\ \amp = \begin{bmatrix} \alpha x_1 \\ -\alpha x_2 \end{bmatrix} = \alpha \begin{bmatrix} x_1 \\ -x_2 \end{bmatrix} = \alpha T(\vec{x}). \end{align*}
so (3.4.2) is satisfied.
A very important linear map in \(\mathbb{R}^2\) is the rotational map that takes any vector in the plane and rotates it a given angle. The next example, derives this map.

Example 3.4.4. Rotational Map in \(\mathbb{R}^2\).

Let
\begin{equation*} \vec{x} = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \end{equation*}
be a vector in \(\mathbb{R}^2\text{.}\) Let the function \(T\) take the vector \(\vec{x}\) and rotate it by \(\theta\) radians in the counterclockwise direction. Call the new vector
\begin{equation*} \vec{y} =\begin{bmatrix} y_1 \\ y_2 \end{bmatrix} \end{equation*}
Figure 3.4.5. Diagram of the rotational map
Derive the formula for the rotational map.
Solution.
Let \(r = ||\vec{x}||\) and since \(\vec{y}\) is the rotated version of \(\vec{x}\) it has the same length, therefore \(r=||\vec{y}||\text{.}\) The values \(x_1, x_2, y_1,y_2\) can be written in terms of \(\alpha\text{,}\) the angle that the vector \(\vec{x}\) makes with the positive horizontal axis, and \(\theta\) the angle between the vectors as follows.
\begin{align*} x_1 \amp = r \cos \alpha, \amp x_2 \amp = r \sin \alpha, \\ y_1 \amp = r \cos (\alpha+\theta), \amp y_2 \amp= r \sin (\alpha + \theta) \\ \amp = r \cos \alpha \cos \theta - r \sin \theta \sin \alpha, \amp y_2 \amp = r \sin \theta \cos \alpha + r \sin \alpha \cos \theta \\ \amp = x_1 \cos \theta - x_2 \sin \theta, \amp \amp = x_1 \sin \theta + x_2 \cos \theta \end{align*}
and note that these can be written:
\begin{align*} \begin{bmatrix} y_1 \\ y_2 \end{bmatrix} \amp = \begin{bmatrix} \cos \theta \amp - \sin \theta \\ \sin \theta \amp \cos \theta \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \end{align*}
This is a linear transformation (as we will explain later) and is called a rotational transformation.

Example 3.4.6. Linear Scale Map.

Consider the map \(S: \mathbb{R}^2 \rightarrow \mathbb{R}^2\) that scales any vector in the plane by a factor of \(k\) given by
\begin{equation*} S(\vec{x}) = k \vec{x} \end{equation*}
which can be visualized in the following diagram where \(k=2\text{:}\)
Figure 3.4.7. Scaling Map
where every vector under the map results in a new vector that is twice as long as the original. In general, the scale \(k\) will scale the vector by a factor of \(k\) and recall that if \(k \lt 0\text{,}\) then the direction changes. Show that this is a linear map.
Solution.
Again, we show that (3.4.1) and (3.4.2) are satisfied. Let \(\vec{x}\) and \(\vec{y}\) be elements of \(\mathbb{R}^2\text{.}\)
\begin{equation*} S(\vec{x}+\vec{y}) = k(\vec{x}+\vec{y}) = k\vec{x} + k \vec{y} = S(\vec{x}) + S(\vec{y}) \end{equation*}
so (3.4.1) is satisfied and
\begin{equation*} S(\alpha \vec{x}) = k (\alpha \vec{x} ) = \alpha (k \vec{x}) = \alpha S(\vec{x}) \end{equation*}
so (3.4.1) is satisfied so \(S\) is a linear map.

Proof.

This is a consequence of matrix operations.
\begin{align*} T(\vec{x}+\vec{y}) &= A(\vec{x}+\vec{y}) = A\vec{x} + A \vec{y} = T(\vec{x}) + T(\vec{y}) \\ T(\alpha \vec{x}) & = A (\alpha \vec{x}) = \alpha A\vec{x} = \alpha T(\vec{x}). \end{align*}
Note that the rotational transformation that was defined in ExampleΒ 3.4.4 is easily shown to be a linear transformation because from TheoremΒ 3.4.8, any transformation shown as a matrix, is a linear transformation. The next theorem shows the counter direction to TheoremΒ 3.4.8, that is that any linear transformation can be written as a matrix.
We won’t prove this here, but instead will motivate this below. In short, if \(T\) is a linear transformation, then the matrix \(A_T\) corresponding to the linear transformation is called the transformation matrix.

Subsection 3.4.1 Finding the Matrix Form of a Linear Transformation

The theorem above shows that any linear transformation, \(T: V \rightarrow W\) can be written in matrix form. This section explains how to find it. Let \(B_V=(\vec{v}_1,\vec{v}_2, \ldots, \vec{v}_m)\) be a basis of \(V\) and \(B_W=(\vec{w}_1,\vec{w}_2, \ldots, \vec{w}_n)\) be a basis of \(W\text{.}\) Any vector \(\vec{x}\) in \(V\) can be written
\begin{equation*} \vec{x} = c_1 \vec{v}_1 + c_2 \vec{v}_2 + \cdots + c_m \vec{v}_m = \sum_{j=1}^m c_j \vec{v}_j \end{equation*}
or in other words \(\text{Rep}_{B_V}(\vec{x}) = \vec{c}\text{.}\) Applying the map to \(\vec{x}\) is
\begin{equation*} T(\vec{x}) = T\biggl(\sum_{j=1}^m c_j \vec{v}_j \biggr) \notag \end{equation*}
and since it is a linear map
\begin{equation} T(\vec{x})= \sum_{j=1}^m c_j T(\vec{v}_j)\tag{3.4.3} \end{equation}
Next, we write the transformation in terms of the basis vectors of \(W\) or
\begin{equation} T(\vec{v}_j) = a_{1,j} \vec{w}_1 + a_{2,j} \vec{w}_2 + \cdots + a_{n,j} \vec{w}_n = \sum_{i=1}^n a_{i,j} \vec{w}_i\tag{3.4.4} \end{equation}
Substituting (3.4.4) into (3.4.3) results in
\begin{equation*} T(\vec{x}) = \sum_{j=1}^m c_j \sum_{i=1}^n a_{i,j} \vec{w}_i = \sum_{i=1}^n \sum_{j=1}^m a_{i,j} c_j \vec{w}_i \end{equation*}
and letting \(A_T\) be the \(m \times n\) matrix with entries \(a_{i,j}\) then
\begin{equation*} \text{Rep}_{B_W} (T(\vec{x})) = A_T\vec{c} \end{equation*}
or in other words, the matrix performs the map on the coefficients. Equation (3.4.4) also shows how the matrix \(A_T\) can be created from the linear map. That equation can also be thought of as a representation of the basis vectors or
\begin{equation*} \text{Rep}_{B_W} ( T(\vec{v}_j)) = \vec{a}_j \end{equation*}
where \(a_j\) is the \(j\)th column of \(A\text{.}\) The following summarizes how to find the matrix.

Remark 3.4.10.

If \(A_T\) is the matrix representation of the map \(T\text{,}\) then the \(j\)th column of \(A_T\) is the vector \(\text{Rep}_{B_W}(T(\vec{v}_j))\text{,}\) the map applied to the \(j\)th basis vector of \(V\) written in terms of the basis of \(W\text{.}\)
We now show many examples on how to apply this.

Example 3.4.11.

The matrix representation of the reflection map from ExampleΒ 3.4.2 given by
\begin{equation*} T\biggl(\begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \biggr) = \begin{bmatrix} x_1 \\ -x_2 \end{bmatrix} \end{equation*}
where the representation will be in terms of the standard basis vectors.
Solution.
In this case, we need to determine how the standard basis vectors map under the reflection. Thus
\begin{align*} \vec{v}_1 \amp = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \amp \vec{v}_2 = \begin{bmatrix} 0 \\ 1 \end{bmatrix} \end{align*}
\begin{align*} T(\vec{v}_1) \amp = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \amp T(\vec{v}_2) \amp = \begin{bmatrix} 0 \\ -1 \end{bmatrix} \end{align*}
Because we are using the standard basis vectors, the representations of these vectors are themselves therefore,
\begin{equation*} A_T = \begin{bmatrix} 1 \amp 0 \\ 0 \amp -1 \end{bmatrix} \end{equation*}
and just to verify,
\begin{align*} T\biggl(\begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \biggr) \amp = \begin{bmatrix} 1 \amp 0 \\ 0 \amp -1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \begin{bmatrix} x_1 \\ - x_2 \end{bmatrix} \end{align*}
This next example shows how to contruct the transformation matrix for the scale map.

Example 3.4.12.

Find the matrix representation of the scale map in ExampleΒ 3.4.6.
Solution.
We need to map the basis vectors \([1\;\;0]^{\intercal}\) and \([0\;\;1]^{\intercal}\) to determine the columns of the matrix representation.
\begin{align*} S \biggl(\begin{bmatrix} 1 \\ 0 \end{bmatrix} \biggr) \amp = \begin{bmatrix} k \\ 0 \end{bmatrix} \amp S\biggl( \begin{bmatrix} 0 \\ 1 \end{bmatrix} \biggr) \amp = \begin{bmatrix} 0 \\ k \end{bmatrix} \end{align*}
so the matrix representation is
\begin{equation*} A_S = \begin{bmatrix} k \amp 0 \\ 0 \amp k \end{bmatrix} \end{equation*}
And the next example shows that a common matrix operation, the trace is a linear map.

Example 3.4.13.

Let \(T: \mathcal{M}_{2 \times 2} \rightarrow \mathbb{R}\)
\begin{equation*} \begin{bmatrix} a \amp b \\ c\amp d \end{bmatrix} \rightarrow a + d \end{equation*}
which is the trace of a 2 by 2 matrix. Show that the trace is a linear map and find the matrix representation of the trace.
Solution.
First, to prove that the trace is a linear map, we need to show that it satisfies (3.4.1) and (3.4.2). Let
\begin{align*} A_1 \amp = \begin{bmatrix} a_1 \amp b_1 \\ c_1\amp d_1 \end{bmatrix} \amp A_2 \amp = \begin{bmatrix} a_2 \amp b_2 \\ c_2\amp d_2 \end{bmatrix} \end{align*}
\begin{align*} T(A_1+A_2) \amp = T \left( \begin{bmatrix} a_1 \amp b_1 \\ c_1\amp d_1 \end{bmatrix} + \begin{bmatrix} a_2 \amp b_2 \\ c_2\amp d_2 \end{bmatrix} \right) = T \left( \begin{bmatrix} a_1 + a_2 \amp b_1 + b_2 \\ c_1 + c_2 \amp d_1 + d_2 \end{bmatrix} \right) \\ \amp = (a_1 + a_2) + (d_1 + d_2) \\ \amp = (a_1 + d_1) + (a_2 + d_2) = T(A_1) + T(A_2) \end{align*}
Similarly,
\begin{align*} T(\alpha A_1) \amp = T \biggl( \alpha \begin{bmatrix} a_1 \amp b_1 \\ c_1\amp d_1 \end{bmatrix}\biggr) = T\biggl(\begin{bmatrix} \alpha a_1 \amp \alpha b_1 \\ \alpha c_1\amp \alpha d_1 \end{bmatrix} \biggr) \\ \amp = \alpha a_1 + \alpha d_1 = \alpha (a_1 + d_1) = \alpha T(A_1) \end{align*}
Next, we want to find the matrix representation of the trace. To do this, we need to determine how the map affects the basis of the vector space \(\mathcal{M}_{2 \times 2}\text{,}\) which is
\begin{equation*} \left( \begin{bmatrix} 1 \amp 0 \\ 0 \amp 0 \end{bmatrix}, \begin{bmatrix} 0 \amp 1 \\ 0 \amp 0 \end{bmatrix}, \begin{bmatrix} 0 \amp 0 \\ 1 \amp 0 \end{bmatrix}, \begin{bmatrix} 0 \amp 0 \\ 0 \amp 1 \end{bmatrix} \right) \end{equation*}
and since
\begin{align*} \begin{bmatrix} 1 \amp 0 \\ 0 \amp 0 \end{bmatrix} \amp\mapsto 1, \amp \begin{bmatrix} 0 \amp 1 \\ 0 \amp 0 \end{bmatrix} \amp\mapsto 0, \\ \begin{bmatrix} 0 \amp 0 \\ 1 \amp 0 \end{bmatrix} \amp\mapsto 0, \amp \begin{bmatrix} 0 \amp 0 \\ 0 \amp 1 \end{bmatrix} \amp \mapsto 1, \end{align*}
The matrix representation is
\begin{equation*} A_T = \begin{bmatrix} 1 \amp 0 \amp 0 \amp 1 \end{bmatrix} \end{equation*}
Note that it may be surprising that the matrix representation is just a row vector, however, recall that the trace maps from a \(2 \times 2\) matrix that can be represented as a column vector of length 4 to the reals, so the matrix representation should be a \(1 \times 4\) matrix.
To verify the above results, recall that from ExampleΒ 3.2.24 that the representation of a matrix is the unfolded matrix or in the \(2 \times 2\) case, that
\begin{equation*} \text{Rep}_B \biggl( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}\biggr) = \begin{bmatrix} a \\ b \\ c \\ d \end{bmatrix} \end{equation*}
where \(B\) is the natural basis of \(\mathcal{M}_{2 \times 2}\text{.}\) So the matrix trace can be written as
\begin{equation*} \begin{bmatrix} 1 \amp 0 \amp 0 \amp 1 \end{bmatrix}\text{Rep}_B (A) = \begin{bmatrix} 1 \amp 0 \amp 0 \amp 1 \end{bmatrix}\begin{bmatrix} a \\ b \\ c \\ d \end{bmatrix} = a + d \end{equation*}