Skip to main content

Section 45.4 Examples

Subsection 45.4.1 Computing the matrix of a linear transformation

Here we will carry out the computations of Discovery 45.2. In that discovery activity, the instruction to use the isomorphisms from Discovery 45.1 amounts to choosing standard bases for each space (and choosing the provided basis for \(V\) in Discovery 45.2.c). We will work each example in two different ways — using Procedure 45.3.1, but also by just considering input-output formulas.

Example 45.4.1. From Discovery 45.2.
  1. In Discovery 45.2.a, we considered \(\funcdef{T}{\matrixring_2(\R)}{\poly_2(\R)}\) defined by

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

    Choosing the standard basis \(\basisfont{S}\) for domain space \(\matrixring_2(\R)\) and the choice \(\basisfont{S}' = \{ x^2, x, 1 \}\) of a standard basis for \(\poly_2(\R)\text{,}\) we create a chain of transformations

    \begin{equation*} \R^4 \xrightarrow{\invcoordmap{S}} \matrixring_2(\R) \xrightarrow{T} \poly_2(\R) \xrightarrow{\coordmap{S'}} \R^3 \end{equation*}

    where a typical vector \((a,b,c,d)\) in \(\R^4\) shuttles through the pipe by

    \begin{equation*} \begin{bmatrix} a \\ b \\ c \\ d \end{bmatrix} \mapsto \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \mapsto (a + b) x^2 + (a + b + c) x - d \mapsto \begin{bmatrix} a + b \\ a + b + c \\ -d \end{bmatrix}\text{.} \end{equation*}

    So the composite transformation \(\R^4 \to \R^3\) has input-output formulas

    \begin{equation*} \left\{\begin{array}{cclclclcl} y_1 \amp = \amp x_1 \amp + \amp x_2 \text{,} \\ y_2 \amp = \amp x_1 \amp + \amp x_2 \amp + \amp x_3 \text{,} \\ y_3 \amp = \amp \amp \amp \amp \amp \amp - \amp x_4 \text{.} \\ \end{array}\right. \end{equation*}

    Using these formulas as rows, we obtain matrix

    \begin{equation*} \matrixOf{T}{S'S} = \left[\begin{array}{rrrr} 1 \amp 1 \amp 0 \amp 0 \\ 1 \amp 1 \amp 1 \amp 0 \\ 0 \amp 0 \amp 0 \amp -1 \end{array}\right]\text{.} \end{equation*}

    We should get the same result if we using Procedure 45.3.1. First, compute the images of the four basis vectors in \(\basisfont{S}\text{:}\)

    \begin{align*} T\left(\begin{bmatrix} 1 \amp 0 \\ 0 \amp 0 \end{bmatrix}\right) \amp = x^2 + x \text{,} \amp T\left(\begin{bmatrix} 0 \amp 1 \\ 0 \amp 0 \end{bmatrix}\right) \amp = x^2 + x \text{,}\\ T\left(\begin{bmatrix} 0 \amp 0 \\ 1 \amp 0 \end{bmatrix}\right) \amp = x \text{,} \amp T\left(\begin{bmatrix} 0 \amp 0 \\ 0 \amp 1 \end{bmatrix}\right) \amp = -1 \text{.} \end{align*}

    Relative to the chosen basis \(\basisfont{S}'\) of the codomain space \(\poly_2(\R)\text{,}\) we have coordinate vectors

    \begin{align*} \matrixOf{T(E_{11})}{S'} \amp = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} \text{,} \amp \matrixOf{T(E_{12})}{S'} \amp = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} \text{,}\\ \\ \matrixOf{T(E_{21})}{S'} \amp = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \text{,} \amp \matrixOf{T(E_{22})}{S'} \amp = \left[\begin{array}{r} 0 \\ 0 \\ -1 \end{array}\right]\text{.} \end{align*}

    Using these coordinate vectors as columns in a matrix, we obtain the same result for \(\matrixOf{T}{S'S}\) as before.

  2. In Discovery 45.2.b, we considered \(\funcdef{T}{\poly_2(\R)}{\uppermatring_2(\R)}\text{,}\) for \(\uppermatring_2(\R)\) the space of \(2 \times 2\) upper triangular matrices, defined by

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

    Again, we take \(\basisfont{S} = \{ x^2, x, 1 \}\) as a choice of standard basis for \(\poly_2(\R)\text{,}\) and choose \(\basisfont{S}' = \{ E_{11}, E_{12}, E_{22} \}\) as a basis for \(\uppermatring_2(\R)\text{.}\) With these choices, we create a chain of transformations

    \begin{equation*} \R^3 \xrightarrow{\invcoordmap{S}} \poly_2(\R) \xrightarrow{T} \uppermatring_2(\R) \xrightarrow{\coordmap{S'}} \R^3 \end{equation*}

    where a typical vector \((a,b,c)\) in \(\R^3\) shuttles through the pipe by

    \begin{equation*} \begin{bmatrix} a \\ b \\ c \end{bmatrix} \mapsto a x^2 + b x + c \mapsto \begin{bmatrix} a - b \amp b + c \\ 0 \amp c - a \end{bmatrix} \mapsto \begin{bmatrix} a - b \\ b + c \\ c - a \end{bmatrix}\text{.} \end{equation*}

    So the composite transformation \(\R^3 \to \R^3\) has input-output formulas

    \begin{equation*} \left\{\begin{array}{ccrcccl} y_1 \amp = \amp x_1 \amp - \amp x_2 \text{,} \\ y_2 \amp = \amp \amp \amp x_2 \amp + \amp x_3 \text{,} \\ y_3 \amp = \amp - x_1 \amp \amp \amp + \amp x_3 \text{.} \\ \end{array}\right. \end{equation*}

    Using these formulas as rows, we obtain matrix

    \begin{equation*} \matrixOf{T}{S'S} = \left[\begin{array}{rrrr} 1 \amp -1 \amp 0 \\ 0 \amp 1 \amp 1 \\ -1 \amp 0 \amp 1 \end{array}\right]\text{.} \end{equation*}

    We should get the same result if we using Procedure 45.3.1. First, compute the images of the three basis vectors in \(\basisfont{S}\text{:}\)

    \begin{align*} T(x^2) \amp = \left[\begin{array}{rr} 1 \amp 0 \\ 0 \amp -1 \end{array}\right] \text{,} \amp T(x) \amp = \left[\begin{array}{rr} -1 \amp 1 \\ 0 \amp 0 \end{array}\right] \text{,} \amp T(1) \amp = \begin{bmatrix} 0 \amp 1 \\ 0 \amp 1 \end{bmatrix} \text{.} \end{align*}

    Relative to the chosen basis \(\basisfont{S}'\) of the codomain space \(\uppermatring_2(\R)\text{,}\) we have coordinate vectors

    \begin{align*} \matrixOf{T(x^2)}{S'} \amp = \left[\begin{array}{r} 1 \\ 0 \\ -1 \end{array}\right] \text{,} \amp \matrixOf{T(x)}{S'} \amp = \left[\begin{array}{r} -1 \\ 1 \\ 0 \end{array}\right] \text{,} \amp \matrixOf{T(1)}{S'} \amp = \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}\text{.} \end{align*}

    Using these coordinate vectors as columns in a matrix, we obtain the same result for \(\matrixOf{T}{S'S}\) as before.

  3. In Discovery 45.2.c, we considered the differentiation operator \(\funcdef{D}{V}{V}\) on the space \(V = \Span \{ e^x \sin x, e^x \cos x \}\text{.}\) The provided spanning set for \(V\) is linearly independent (check!). Using this basis on both the “input” and “output” ends, we create a chain of transformations

    \begin{equation*} \R^2 \xrightarrow{\invcoordmap{B}} V \xrightarrow{D} V \xrightarrow{\coordmap{B}} \R^2 \end{equation*}

    where a typical vector \((a,b)\) in \(\R^2\) shuttles through the pipe by

    \begin{equation*} \begin{bmatrix} a \\ b \end{bmatrix} \mapsto a e^x \sin x + b e^x \cos x \mapsto (a - b) e^x \sin x + (a + b) \cos x \mapsto \begin{bmatrix} a - b \\ a + b \end{bmatrix}\text{.} \end{equation*}

    So the composite transformation \(\R^2 \to \R^2\) has input-output formulas

    \begin{equation*} \left\{\begin{array}{cclcl} y_1 \amp = \amp x_1 \amp - \amp x_2 \text{,} \\ y_2 \amp = \amp x_1 \amp + \amp x_2 \text{.} \end{array}\right. \end{equation*}

    Using these formulas as rows, we obtain matrix

    \begin{equation*} \matrixOf{T}{B} = \left[\begin{array}{rr} 1 \amp -1 \\ 1 \amp 1 \end{array}\right]\text{.} \end{equation*}

    We should get the same result if we using Procedure 45.3.1. First, compute the images of the two basis vectors in \(\basisfont{S}\text{:}\)

    \begin{align*} D(e^x \sin x) \amp = e^x \sin x + e^x \cos x \text{,} \\ D(e^x \cos x) \amp = - e^x \sin x + e^x \cos x \text{.} \end{align*}

    Relative to the basis \(\basisfont{B}\) of \(V\text{,}\) we have coordinate vectors

    \begin{align*} \matrixOf{D(e^x \sin x)}{B} \amp = \begin{bmatrix} 1 \\ 1 \end{bmatrix} \text{,} \amp \matrixOf{D(e^x \cos x)}{B} \amp = \left[\begin{array}{r} -1 \\ 1 \end{array}\right]\text{.} \end{align*}

    Using these coordinate vectors as columns in a matrix, we obtain the same result for \(\matrixOf{D}{B}\) as before.

Subsection 45.4.2 Using the matrix of a linear transformation

We can use the matrix of a linear transformation to compute image vectors.

In each of the following examples, we consider the differentiation operator \(\funcdef{D}{V}{V}\) on the space \(V = \Span \{ e^x \sin x, e^x \cos x \}\text{.}\) In Part 3 of Example 45.4.1 above, we have already computed

\begin{equation*} \matrixOf{D}{B} = \left[\begin{array}{rr} 1 \amp -1 \\ 1 \amp 1 \end{array}\right]\text{,} \end{equation*}

where \(\basisfont{B}\) is the provided basis for \(V\text{,}\) by simply computing the derivatives of the basis vectors. This information should be enough to allow us to compute the derivative of every linear combination of the basis vectors by simple matrix multiplication, and in fact will also allow us to compute antiderivatives, since \(\matrixOf{D}{B}\) is invertible.

Example 45.4.2. Computing an image vector.

Consider \(f(x) = 3 e^x \sin x - e^x \cos x\text{,}\) with

\begin{equation*} \matrixOf{f}{B} = \left[\begin{array}{r} 3 \\ -1 \end{array}\right] \text{.} \end{equation*}

Then we can compute

\begin{equation*} \matrixOf{D(f)}{B} = \matrixOf{D}{B} \matrixOf{f}{B} = \left[\begin{array}{rr} 1 \amp -1 \\ 1 \amp 1 \end{array}\right] \left[\begin{array}{r} 3 \\ -1 \end{array}\right] = \begin{bmatrix} 4 \\ 2 \end{bmatrix}\text{.} \end{equation*}

Converting this coordinate vector back into a linear combination, we find

\begin{equation*} D\bigl(f(x)\bigr) = 4 e^x \sin x + 2 e^x \cos x \text{.} \end{equation*}
Example 45.4.3. Computing the image vector of a composition.

Again consider \(f(x) = 3 e^x \sin x - e^x \cos x\text{.}\) What if we would like to compute the second derivative of \(f(x) = 3 e^x \sin x - e^x \cos x\text{?}\) We could of course just multiply the resulting coordinate vector from Example 45.4.2 by \(\matrixOf{D}{B}\) again. But let's proceed as if we had not already calculated \(D(f)\text{.}\)

Since the second derivative of \(f\) is

\begin{equation*} D\bigl(D(f)\bigr) = D^2(f)\text{,} \end{equation*}

we can compute

\begin{equation*} \matrixOf{D^2}{B} = (\matrixOf{D}{B})^2 = \left[\begin{array}{rr} 1 \amp -1 \\ 1 \amp 1 \end{array}\right]^2 = \left[\begin{array}{rr} 0 \amp -2 \\ 2 \amp 0 \end{array}\right]\text{.} \end{equation*}

Then from this we can compute

\begin{equation*} \matrixOf{D^2(f)}{B} = \matrixOf{D^2}{B} \matrixOf{f}{B} = \left[\begin{array}{rr} 0 \amp -2 \\ 2 \amp 0 \end{array}\right] \left[\begin{array}{r} 3 \\ -1 \end{array}\right] = \begin{bmatrix} 2 \\ 6 \end{bmatrix}\text{.} \end{equation*}

Converting this coordinate vector back into a linear combination, we find

\begin{equation*} D^2\bigl(f(x)\bigr) = 2 e^x \sin x + 6 e^x \cos x \text{.} \end{equation*}
Example 45.4.4. Computing the image vector of the inverse of an operator.

Once again consider \(f(x) = 3 e^x \sin x - e^x \cos x\text{.}\) Since \(\matrixOf{D}{B}\) is invertible, so must be operator \(D\text{.}\) And if \(D\) represents differentiation, then \(\inv{D}\) must represent antidifferentiation, so computing \(\inv{D}(f)\) will be the antiderivative of \(f(x)\text{.}\)

First compute

\begin{equation*} \matrixOf{\inv{D}}{B} = \invmatrixOf{D}{B} = \inv{\left[\begin{array}{rr} 1 \amp -1 \\ 1 \amp 1 \end{array}\right]} = \frac{1}{2} \, \left[\begin{array}{rr} 1 \amp 1 \\ -1 \amp 1 \end{array}\right]\text{.} \end{equation*}

With this, we can compute

\begin{equation*} \matrixOf{\inv{D}(f)}{B} = \matrixOf{\inv{D}}{B} \matrixOf{f}{B} = \frac{1}{2} \, \left[\begin{array}{rr} 1 \amp 1 \\ -1 \amp 1 \end{array}\right] \left[\begin{array}{r} 3 \\ -1 \end{array}\right] = \left[\begin{array}{r} 1 \\ -2 \end{array}\right]\text{.} \end{equation*}

Converting this coordinate vector back into a linear combination, we find that the antiderivative of \(f\) is

\begin{equation*} \inv{D}\bigl(f(x)\bigr) = e^x \sin x - 2 e^x \cos x \text{.} \end{equation*}