Skip to main content

Section 42.4 Examples

Subsection 42.4.1 Verifying the axioms

Example 42.4.1. Linear formulas create linear transformations.

Define \(\funcdef{T}{\matrixring_{2 \times 2}(\R)}{\poly_2(\R)}\) by

\begin{equation*} T\left( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \right) = (a + b) + (c - 2d) x + (3b - c + d) x^2\text{.} \end{equation*}

To verify that \(T\) is linear, check the linearity properties.

Additivity.

We have

\begin{align*} \amp T\left( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} + \begin{bmatrix} e \amp f \\ g \amp h \end{bmatrix} \right)\\ \amp \phantom{T} = T\left( \begin{bmatrix} a + e \amp b + f \\ c + g \amp d + h \end{bmatrix} \right)\\ \amp \phantom{T} = \bigl( (a + e) + (b + f) \bigr) + \bigl( (c + g) - 2(d + h) \bigr) x + \bigl( 3(b + f) - (c + g) + (d + h) \bigr) x^2 \text{,}\\ \\ \amp T\left( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \right) + T\left( \begin{bmatrix} e \amp f \\ g \amp h \end{bmatrix} \right)\\ \amp \phantom{T} = (a + b) + (c - 2d) x + (3b - c + d) x^2 + (e + f) + (g - 2h) x + (3f - g + h) x^2\\ \amp \phantom{T} = \bigl( (a + b) + (e + f) \bigr) + \bigl( (c - 2d) + (g - 2h) \bigr) x + \bigl( (3b - c + d) + (3f - g + h) \bigr) x^2\text{.} \end{align*}

Comparing the results of the two calculations, we see they are the same.

Homogeneity.

We have

\begin{align*} T\left( k \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \right) \amp = T\left( \begin{bmatrix} k a \amp k b \\ k c \amp k d \end{bmatrix} \right)\\ \amp = (k a + k b) + \bigl(k c - 2 (k d)\bigr) x + \bigl(3(k b) - k c + k d\bigr) x^2 \text{,}\\ \\ k \; T\left( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \right) \amp = k \bigl( (a + b) + (c - 2d) x + (3b - c + d) x^2 \bigr)\\ \amp = k (a + b) + k (c - 2d) x + k (3b - c + d) x^2\text{.} \end{align*}

By distributing the scalar \(k\) a second time into each set of brackets in the last line above, we can make the two results identical.

Example 42.4.2. Nonhomogeneous linear formulas do not create linear transformations.

Let's modify Example 42.4.1 slightly: define \(\funcdef{S}{\matrixring_{2 \times 2}(\R)}{\poly_2(\R)}\) by

\begin{equation*} S\left( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \right) = (a + b + 4) + (c - 2d) x + (3b - c + d - 2) x^2\text{.} \end{equation*}

The definition of \(S\) still involves using linear formulas in the entries of the input matrix to specify coefficients of the output polynomial, except that the constant and quadratic terms have extra constant parts to the coefficient formulas. Comparing with the linear transformation \(T\) from Example 42.4.1, we could write

\begin{equation*} S(A) = T(A) + (4 - 2 x^2) \text{.} \end{equation*}

We saw in Discovery 42.3.c that the process of translation by a fixed vector is not a linear transformation, so we expect that combining the linear transformation \(T\) with a translation will not be linear.

Instead of working directly with the formula-based definition of \(S\text{,}\) we can instead relate it to \(T\) to check the linearity properties.

Additivity.

We have

\begin{align*} S(A_1 + A_2) \amp = T(A_1 + A_2) + (4 - 2 x^2) \\ \amp = T(A_1) + T(A_2) + (4 - 2 x^2) \text{,} \\ \\ S(A_1) + S(A_2) \amp = \bigl(T(A_1) + (4 - 2 x^2)\bigr) + \bigl(T(A_2) + (4 - 2 x^2)\bigr) \\ \amp = T(A_1) + T(A_2) + 2 (4 - 2 x^2) \text{,} \end{align*}

where in the calculation on the left we use the linearity of \(T\) that was verified in Example 42.4.1. We can see that these results will not be equal in general, so \(S\) is not a linear transformation.

As we've already seen in Subsection 42.3.5, many of our familiar processes will be linear, but others will not.

Example 42.4.3. Transpose is linear.

Consider \(\funcdef{T}{\matrixring_{m \times n}(\R)}{\matrixring_{n \times m}(\R)}\) defined by

\begin{equation*} T(A) = \utrans{A} \text{.} \end{equation*}

To verify that \(T\) is a linear transformation, we want to verify the formulas

\begin{align*} \utrans{(A_1 + A_2)} \amp = \utrans{A}_1 + \utrans{A}_2 \text{,} \amp \utrans{(k A)} \amp = k \utrans{A}\text{.} \end{align*}

But there is no need to get down to the level of the individual entries of matrices here, we already know that these formulas are valid from Rule 5.b and Rule 5.c of Proposition 4.5.1.

Example 42.4.4. Complex adjoint is not linear.

Consider \(\funcdef{T}{\matrixring_{m \times n}(\C)}{\matrixring_{n \times m}(\C)}\) defined by

\begin{equation*} T(A) = \adjoint{A} \text{.} \end{equation*}

To verify that \(T\) is a linear transformation, we want to verify the formulas

\begin{align*} \adjoint{(A_1 + A_2)} \amp = \adjoint{A}_1 + \adjoint{A}_2 \text{,} \amp \adjoint{(k A)} \amp = k \adjoint{A}\text{.} \end{align*}

However, this time only the first formula is valid (Rule 2.d of Proposition 11.4.1). The correct version of the second formula would require a conjugate on the scalar \(k\) (Rule 2.e of Proposition 11.4.1). So the adjoint process does not create a linear transformation.

Subsection 42.4.2 The standard matrix of a transformation \(\R^n \to \R^m\)

Example 42.4.5. From linear formulas.

Consider the system of linear input-output formulas in Discovery 42.1.b:

\begin{equation*} \left\{\begin{array}{rcrcr} w_1 \amp = \amp 3 x_1 \amp - \amp x_2 \\ w_2 \amp = \amp 5 x_1 \amp + \amp 5 x_2 \\ w_3 \amp = \amp \amp + \amp 7 x_2 \\ w_4 \amp = \amp - x_1 \amp + \amp x_2 \end{array}\right.\text{.} \end{equation*}

These formulas define a linear transformation \(\funcdef{T}{\R^2}{\R^4}\text{.}\) If we set

\begin{equation*} A = \left[\begin{array}{rr} 3 \amp -1 \\ 5 \amp 5 \\ 0 \amp 7 \\ -1 \amp 1 \end{array}\right]\text{,} \end{equation*}

then we will have

\begin{equation*} T(\uvec{x}) = A \uvec{x} \end{equation*}

for all \(\uvec{x}\) in \(\R^2\text{,}\) so that \(T = T_A\text{.}\)

Following the notation introduced in Section 42.2, we write \(\stdmatrixOf{T}\) instead of just \(A\) for the matrix above, so that

\begin{equation*} T(\uvec{x}) = \stdmatrixOf{T} \uvec{x} \end{equation*}

for all \(\uvec{x}\) in \(\R^2\text{.}\)

Example 42.4.6. From images of standard basis vectors.

Consider the vectors

\begin{align*} \uvec{a}_1 \amp = \begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix}, \amp \uvec{a}_2 \amp = \left[\begin{array}{r} 0 \\ -1 \\ 5 \end{array}\right] \end{align*}

in \(\R^3\text{.}\) Define \(\funcdef{T}{\R^3}{\R^2}\) by

\begin{equation*} T(\uvec{x}) = \begin{bmatrix} \dotprod{\uvec{x}}{\uvec{a}_1} \\ \dotprod{\uvec{x}}{\uvec{a}_2} \end{bmatrix} \text{.} \end{equation*}

Since dot product is linear, this creates a linear transformation. (Check!) We could fairly easily determine linear formulas for each component of the output vector expression for \(T\text{,}\) but let's use the pattern of (\(\dagger\)) in Subsection 42.3.4.

Compute

\begin{align*} T(\uvec{e}_1) \amp = \begin{bmatrix} \dotprod{\uvec{e}_1}{\uvec{a}_1} \\ \dotprod{\uvec{e}_1}{\uvec{a}_2} \end{bmatrix} \amp T(\uvec{e}_2) \amp = \begin{bmatrix} \dotprod{\uvec{e}_2}{\uvec{a}_1} \\ \dotprod{\uvec{e}_2}{\uvec{a}_2} \end{bmatrix} \amp T(\uvec{e}_3) \amp = \begin{bmatrix} \dotprod{\uvec{e}_3}{\uvec{a}_1} \\ \dotprod{\uvec{e}_3}{\uvec{a}_2} \end{bmatrix}\\ \amp = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \text{,} \amp \amp = \left[\begin{array}{r} 1 \\ -1 \end{array}\right] \text{,} \amp \amp = \begin{bmatrix} 2 \\ 5 \end{bmatrix}\text{.} \end{align*}

Each of these results corresponds to a column of the standard matrix \(\stdmatrixOf{T}\text{:}\)

\begin{equation*} \stdmatrixOf{T} = \left[\begin{array}{crc} 1 \amp 1 \amp 2 \\ 0 \amp -1 \amp 5 \end{array}\right]\text{.} \end{equation*}

Notice how the vectors \(\uvec{a}_1,\uvec{a}_2\) ended up as rows in \(\stdmatrixOf{T}\text{,}\) so that multiplying a vector in \(\R^3\) by this matrix effectively computes the two dot products against \(\uvec{a}_1,\uvec{a}_2\text{,}\) as in the definition of \(T\text{.}\) For example,

\begin{equation*} T\left( \left[\begin{array}{r} 7 \\ -3 \\ 5 \end{array}\right] \right) = \left[\begin{array}{crc} 1 \amp 1 \amp 2 \\ 0 \amp -1 \amp 5 \end{array}\right] \left[\begin{array}{r} 7 \\ -3 \\ 5 \end{array}\right] = \begin{bmatrix} 14 \\ 28 \end{bmatrix}\text{.} \end{equation*}

Subsection 42.4.3 Linear transformations via spanning image vectors

In Discovery 42.4 and Subsection 42.3.3, we found that a linear transformation can be completely determined by how it transforms a spanning set for the domain space. Here is an example of using this fact.

Example 42.4.7.

Suppose \(\funcdef{T}{\poly_2(\R)}{\R^2}\) is a linear transformation, and it's known that

\begin{align*} T(x^2 - x) \amp = (1,1) \text{,} \amp T(x - 1) \amp = (0,-1) \text{,} \amp T(1) \amp = (3,6)\text{.} \end{align*}

Then, for example, we can use an expansion like

\begin{equation*} 4 x^2 + 2 x - 1 = 4 (x^2 - x) + 6 (x - 1) + 5 \cdot 1 \text{,} \end{equation*}

along with the linearity properties of \(T\text{,}\) to compute

\begin{align*} T(4 x^2 + 2 x - 1) \amp = T \bigl( 4 (x^2 - x) + 6 (x - 1) + 5 \cdot 1 \bigr) \\ \amp = 4 T(x^2 - x) + 6 T(x - 1) + 5 T(1) \\ \amp = 4 (1,1) + 6 (0,-1) + 5 (3,6) \\ \amp = (19,28) \text{.} \end{align*}

More generally,

\begin{equation*} \poly_2(\R) = \Span \{ x^2 - x, x - 1, 1 \} \text{,} \end{equation*}

as every polynomial can be decomposed as a linear combination of these spanning vectors: for

\begin{equation*} p(x) = a x^2 + b x + c \text{,} \end{equation*}

we have

\begin{equation*} p(x) = a (x^ - x) + (a + b) (x - 1) + (a + b + c) \cdot 1 \text{.} \end{equation*}

Then, similar to the example calculation above, we have

\begin{align*} T(a x^2 + b x + c) \amp = T \bigl( a (x^2 - x) + (a + b) (x - 1) + (a + b + c) \cdot 1 \bigr) \\ \amp = a T(x^2 - x) + (a + b) T(x - 1) + (a + b + c) T(1) \\ \amp = a (1,1) + (a + b) (0,-1) + (a + b + c) (3,6) \\ \amp = (4 a + 3 b + 3 c, 6 a + 5 b + 6 c) \text{.} \end{align*}

So, from knowledge of the image vectors on a spanning set of the domain space, along with the pattern of how vectors in the domain space decompose into linear combinations, we can recover a description of the linear transformation as a set of linear input-output formulas.

As per Procedure 42.3.1, we can also define a linear transformation in this way. In Example 42.4.7, the spanning set

\begin{equation*} \{ x^2 - x, x - 1, 1 \} \end{equation*}

is actually a basis for \(\poly_2(\R)\text{.}\) So we could start with the image vectors

\begin{align*} T(x^2 - x) \amp = (1,1) \text{,} \amp T(x - 1) \amp = (0,-1) \text{,} \amp T(1) \amp = (3,6) \end{align*}

and then use the linearity properties of \(T\) to extend \(T\) to all linear combinations of these domain space basis vectors. The fact that only explicitly specifying \(T\) on these basis vectors fully defines \(T\) on the whole domain is backed up by the fact that were able to recover general input-output linear formulas for \(T\) from these three image vectors.

But as noted in Remark 42.3.2, it's important to use a basis in this method of defining a linear transformation. Here is an example illustrating this fact.

Example 42.4.8. Defining a transformation via dependent spanning vectors could fail.

Suppose we attempt to define \(\funcdef{T}{\R^2}{\R^2}\) by setting

\begin{align*} T\left(\begin{bmatrix} 1 \\ 0 \end{bmatrix}\right) \amp = \begin{bmatrix} 1 \\ 2 \end{bmatrix} \text{,} \amp T\left(\begin{bmatrix} 0 \\ 1 \end{bmatrix}\right) \amp = \begin{bmatrix} 2 \\ 3 \end{bmatrix} \text{,} \amp T\left(\begin{bmatrix} 1 \\ 1 \end{bmatrix}\right) \amp = \begin{bmatrix} 3 \\ 4 \end{bmatrix}\text{.} \end{align*}

If \(T\) is linear, we can determine its standard matrix from the first two image vectors above:

\begin{equation*} \stdmatrixOf{T} = \begin{bmatrix} 1 \amp 2 \\ 2 \amp 3 \end{bmatrix} \text{.} \end{equation*}

But then we should have

\begin{equation*} T\left(\begin{bmatrix} 1 \\ 1 \end{bmatrix}\right) = \begin{bmatrix} 1 \amp 2 \\ 2 \amp 3 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 3 \\ 5 \end{bmatrix}\text{,} \end{equation*}

which does not agree with our specified image vector for input \((1,1)\text{.}\)

What went wrong? Our collection of three input vectors is a spanning set, but it is a dependent one:

\begin{equation*} \begin{bmatrix} 1 \\ 0 \end{bmatrix} + \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}\text{.} \end{equation*}

The only way to make a definition of a linear transformation \(T\) on these three spanning vectors is to also have

\begin{equation*} T\left(\begin{bmatrix} 1 \\ 0 \end{bmatrix}\right) + T\left(\begin{bmatrix} 0 \\ 1 \end{bmatrix}\right) = T\left(\begin{bmatrix} 1 \\ 1 \end{bmatrix}\right)\text{,} \end{equation*}

which our initial definition did not.