Skip to main content

Section 38 The Matrix of a Linear Transformation

Subsection Application: Secret Sharing Algorithms

Suppose we have a secret that we want or need to share with several individuals. For example, a bank manager might want to share pieces of the code for the bank vault with several employees so that if the manager is not available, some subset of these employees could open the vault if they work together. This allows for a significant amount of security while still making the code available if needed. As another example, in order to keep passwords secure (as they can be hard to remember), a person could implement a secret sharing scheme. The person would generate a set of shares for a given password and store them in several different places. If the person forgets the password, it can be reconstructed by collecting some set of these shares. Since the shares can be stored in many different places, the password is relatively secure.

The idea behind secret sharing algorithms is to break a secret into a number (\(n\)) of pieces and give each person one piece. A code is then created in such a way that any \(k\) individuals could combine their information and learn the secret, but no group of fewer than \(k\) individuals could. This is called a \((k,n)\) threshold scheme. One secret sharing algorithm is Shamir's Secret Sharing, which, as we will see later in this section, involves Lagrange polynomials. In order to implement this algorithm, we will use matrices of linear transformations from polynomials spaces to \(\R^n\text{.}\)

Subsection Introduction

A matrix transformation \(T\) from \(\R^n\) to \(\R^m\) is a linear transformation defined by \(T(\vx) = A\vx\) for some \(m \times n\) matrix \(A\text{.}\) We can use the matrix to quickly determine if \(T\) is one-to-one or onto — if every column of \(A\) contains a pivot, then \(T\) is one-to-one, and if every row of \(A\) contains a pivot, then \(T\) is onto. As we will see, we can represent any linear transformation between finite dimensional vector spaces as a matrix transformation, which will allow us to use all of the tools we have developed for matrices to study linear transformations. We will begin with linear transformations from \(\R^n\) to \(\R^m\text{.}\)

Preview Activity 38.1.

Let \(T\) be a linear transformation from \(\R^2\) into \(\R^3\text{.}\) Let's also say that we know the following information about \(T\text{:}\)

\begin{equation*} T\left(\left[ \begin{array}{c} 1 \\ 0 \end{array} \right] \right) = \left[ \begin{array}{r} 0 \\ 2 \\ -1 \end{array} \right] \text{ and } T\left(\left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \right) = \left[ \begin{array}{r} 1 \\ 3 \\ 2 \end{array} \right]\text{.} \end{equation*}
(a)

Find \(T\left(\left[ \begin{array}{c} 2 \\ 0 \end{array} \right] \right)\text{.}\)

Hint.

Use the fact that \(T\) is a linear transformation.

(b)

Find \(T\left(\left[ \begin{array}{c} 1 \\ 1 \end{array} \right] \right)\text{.}\)

(c)

Find \(T\left(\left[ \begin{array}{c} 2 \\ 3 \end{array} \right] \right)\text{.}\)

(d)

Find \(T\left(\left[ \begin{array}{c} a \\ b \end{array} \right] \right)\) for any real numbers \(a\) and \(b\text{.}\)

(e)

Is it possible to find a matrix \(A\) so that \(T\left(\left[ \begin{array}{c} a \\ b \end{array} \right] \right) = A \left[ \begin{array}{c} a \\ b \end{array} \right]\) for any real numbers \(a\) and \(b\text{?}\) If so, what is this matrix? If not, why not?

Subsection Linear Transformations from \(\R^n\) to \(\R^m\)

Preview Activity 38.1 illustrates the method for representing a linear transformation from \(\R^n\) to \(\R^m\) as a matrix transformation. We now consider the general context.

Activity 38.2.

Let \(T\) be a linear transformation from \(\R^n\) to \(\R^m\text{.}\) Let \(\ve_i\) be the \(i\)th column of the \(n \times n\) identity matrix. In other words,

\begin{equation*} \ve_1 = \left[ \begin{array}{c} 1 \\ 0 \\ 0 \\ 0 \\ \vdots \\ 0 \end{array} \right], \ve_2 = \left[ \begin{array}{c} 0 \\ 1 \\ 0 \\ 0 \\ \vdots \\ 0 \end{array} \right], \ve_3 = \left[ \begin{array}{c} 0 \\ 0 \\ 1 \\ 0 \\ \vdots \\ 0 \end{array} \right], \ldots , \ve_n = \left[ \begin{array}{c} 0 \\ 0 \\ 0 \\ \vdots \\ 1 \end{array} \right] \end{equation*}

in \(\R^n\text{.}\) The set \(\{\ve_1, \ve_2, \ldots, \ve_n\}\) is the standard basis for \(\R^n\text{.}\) Let \(\vx = \left[ \begin{array}{c} x_1 \\ x_2 \\ \vdots \ \\x_n \end{array} \right]\) in \(\R^n\text{.}\) Explain why \(T(\vx) = A \vx\) for every \(\vx\) in \(\R^n\text{,}\) where

\begin{equation*} A = [\ T(\ve_1) \; \; T(\ve_2) \; \; \cdots \; \; T(\ve_n) \ ] \end{equation*}

is the matrix with columns \(T(\ve_1)\text{,}\) \(T(\ve_2)\text{,}\) \(\ldots\text{,}\) \(T(\ve_n)\text{.}\)

As we discovered in Activity 38.2, a linear transformation from \(\R^n\) to \(\R^m\) can be expressed as a matrix transformation where the columns of the matrix are given by the images of \(\ve_i\text{,}\) the columns of the \(n\times n\) identity matrix. This matrix is called the standard matrix of the linear transformation.

Definition 38.1.

If \(T\) is a linear transformation from \(\R^n\) to \(\R^m\text{,}\) the standard matrix for \(T\) is the matrix

\begin{equation*} A= [ \ T(\ve_1) \;\; T(\ve_2) \;\; \cdots \;\; T(\ve_n) \ ] \end{equation*}

with columns \(T(\ve_1)\text{,}\) \(T(\ve_2)\text{,}\) \(\ldots\text{,}\) \(T(\ve_n)\text{,}\) where \(\{\ve_1, \ve_2, \ldots, \ve_n\}\) is the standard basis for \(\R^n\text{.}\) More specifically, \(T(\vx)=A\vx\) for every \(\vx\) in \(\R^n\text{.}\)

Subsection The Matrix of a Linear Transformation

We saw in the previous section that any linear transformation \(T\) from \(\R^n\) to \(\R^m\) is in fact a matrix transformation. In this section, we turn to the general question — can any linear transformation \(T: V \to W\) between an \(n\)-dimensional vector space \(V\) and an \(m\)-dimensional vector space \(W\) be represented in some way as a matrix transformation? This will allow us to extend ideas like eigenvalues and eigenvectors to arbitrary linear transformations. We begin by investigating an example.

The general process for representing a linear transformation as a matrix transformation is as described in Activity 38.3.

Activity 38.3.

Let \(V\) be an \(n\) dimensional vector space and \(W\) an \(m\) dimensional vector space and suppose \(T : V \to W\) is a linear transformation. Let \(\CB = \{\vv_1, \vv_2, \ldots, \vv_n\}\) be a basis for \(V\) and \(\CC = \{\vw_1, \vw_2, \ldots, \vw_m\}\) a basis for \(W\text{.}\) Let \(\vv\) be in \(V\) so that

\begin{equation*} \vv = c_1\vv_1 + c_2 \vv_2 + \cdots + c_n \vv_n \end{equation*}

for some scalars \(c_1\text{,}\) \(c_2\text{,}\) \(\ldots\text{,}\) \(c_n\text{.}\)

(a)

What is \([\vv]_\CB\text{?}\)

(b)

Note that for \(\vv\) in \(V\text{,}\) \(T(\vv)\) is an element in \(W\text{,}\) so we can consider the coordinate vector for \(T(\vv)\) with respect to \(\CC\text{.}\) Explain why

\begin{equation} [T(\vv)]_{\CC} = c_1[T(\vv_1)]_{\CC} + c_2 [T(\vv_2)]_{\CC} + \cdots + c_n [T(\vv_n)]_{\CC}\text{.}\tag{38.1} \end{equation}
(c)

Now find a matrix \(A\) so that Equation (38.1) has the form \([T(\vv)]_{\CC} = A [\vv]_{\CB}\text{.}\) We call the matrix \(A\) to be the matrix for \(T\) relative to the bases \(\CB\) and \(\CC\) and denote this matrix as \([T]_{\CB}^{\CC}\) so that

\begin{equation*} [T(\vv)]_{\CC} = [T]_{\CB}^{\CC} [\vv]_{\CB}\text{.} \end{equation*}

Activity 38.3 shows us how to represent a linear transformation as a matrix transformation.

Definition 38.2.

Let \(T\) be a linear transformation from a vector space \(V\) with basis \(\CB = \{\vv_1\text{,}\) \(\vv_2\text{,}\) \(\ldots\text{,}\) \(\vv_n\}\) to a vector space \(W\) with basis \(\CC = \{\vw_1, \vw_2, \ldots, \vw_m\}\text{.}\) The matrix for \(T\) with respect to the bases \(\CB\) and \(\CC\) is the matrix

\begin{equation*} [T]_{\CB}^{\CC} = \left[ [T(\vv_1)]_{\CC} \ [T(\vv_2)]_{\CC} \ [T(\vv_3)]_{\CC} \ \cdots \ [T(\vv_n)]_{\CC} \right]\text{.} \end{equation*}

If \(V=W\) and \(\CC = \CB\text{,}\) then we use the notation \([T]_{\CB}\) as a shorthand for \([T]_{\CB}^{\CC}\text{.}\) The matrix \([T]_{\CB}^{\CC}\) has the property that

\begin{equation*} [T(\vv)]_{\CC} = A [\vv]_{\CB} \end{equation*}

for any \(\vv\) in \(V\text{.}\) Recall that we can find the unique vector in \(W\) whose coordinate vector is \([T(\vv)]_{\CC}\text{,}\) so we have completely realized the transformation \(T\) as a matrix transformation. In essence, we are viewing \(T\) as a composite of linear transformations, first from \(V\) to \(\R^n\text{,}\) then from \(\R^n\) to \(\R^m\text{,}\) then from \(\R^m\) to \(W\) as illustrated in Figure 38.3.

Figure 38.3. Visualizing the matrix of a linear transformation.

Activity 38.4.

Let \(T : \pol_2 \to \pol_1\) be defined by \(T(p(t))= p'(t)\text{.}\) Let \(\CB = \{1+t,1-t,t+t^2\}\) be a basis for \(\pol_2\) and \(\CC = \{1, t\}\) be a basis for \(\pol_1\text{.}\)

(a)

Find the matrix \([T]_{\CB}^{\CC}\text{.}\)

(b)

Find \([1+t+t^2]_{\CB}\text{.}\) Then use the matrix \([T]_{\CB}^{\CC}\) to calculate \([T(1+t+t^2)]_{\CC}\text{.}\) (Hint: Use the fact that \(1+t+t^2 =\frac{1}{2}(1+t) + \frac{1}{2}(1-t) + (t+t^2)\text{.}\))

(c)

Calculate \(T(1+t+t^2)\) directly from the definition of \(T\) and compare to your result from part (b).

(d)

Find the matrix \([T]_{\CB}^{\CC'}\) where \(\CC'=\{1+t, 1-t\}\text{.}\) Use the facts that

\begin{equation*} -1 = -\frac{1}{2}(1+t) - \frac{1}{2}(1-t) \ \text{ and } \ 1+2t = \frac{3}{2}(1+t) - \frac{1}{2}(1-t)\text{.} \end{equation*}

Subsection A Connection between \(\Ker(T)\) and a Matrix Representation of \(T\)

Recall that we defined the kernel of a matrix transformation \(T: \R^n \to \R^m\) to be the set of vectors that \(T\) maps to the zero vector. If \(T\) is the matrix transformation defined by \(T(\vx) = A \vx\text{,}\) we also saw that the kernel of \(T\) is the same as the null space of \(A\text{.}\) We can make a similar connection between a linear transformation and a matrix that defines the transformation.

Activity 38.5.

Let \(T : V \to W\) be a linear transformation from an \(n\)-dimensional vector space \(V\) to an \(m\)-dimensional vector space \(W\) with additive identity \(\vzero_W\text{.}\) Let \(\CB\) be a basis for \(V\) and \(\CC\) a basis for \(W\text{.}\) Let \(A = [T]_{\CB}^{\CC}\text{.}\) Let \(T'\) be the matrix transformation from \(\R^n\) to \(\R^m\) defined by \(T'(\vx) = A\vx\text{.}\)

(a)

Show that if \(\vv\) is in \(\Ker(T)\text{,}\) then \([\vv]_{\CB}\) is in \(\Nul A\text{.}\)

Hint.

Apply an appropriate coordinate transformation.

(b)

Let \(\CB = \{\vv_1, \vv_2, \ldots, \vv_n\}\) and \(\CC = \{\vw_1, \vw_2, \ldots, \vw_m\}\text{.}\) Show that if the vector \(\vx = [x_1 \ x_2 \ \cdots \ x_n]\) is in \(\Nul A\text{,}\) then the vector \(\vv = x_1\vv_1 + x_2 \vv_2 + \cdots x_n \vv_n\) is in \(\Ker(T)\text{.}\)

Hint.

Note that \([\vv]_{\CB} = \vx\text{.}\)

Activity 38.5 shows that if \(T: V \to W\) is a linear transformation from an \(n\)-dimensional vector space \(V\) with basis \(\CB\) to an \(m\)-dimensional vector space \(W\) with basis \(\CC\text{,}\) then there is a one-to-one correspondence between vectors in \(\Ker(T)\) and vectors in \(\Nul [T]_{\CB}^{\CC}\text{.}\) Recall that \(T\) is one-to-one if and only if \(\Ker(T) = \{\vzero_V\}\text{,}\) where \(\vzero_V\) is the additive identity of \(V\text{.}\) So \(T\) will be one-to-one if and only if \(\Nul [T]_{\CB}^{\CC} = \{\vzero\}\text{.}\) In other words, \(T\) is one-to-one if and only if every column of \(\Nul [T]_{\CB}^{\CC}\) is a pivot column. Note that this does not depend on the basis \(\CB\) and \(\CC\text{.}\)

A similar argument shows that \(T\) is onto if and only if every row of \([T]_{\CB}^{\CC}\) contains a pivot. This is left to the exercises (see Exercise 7).

Subsection Examples

What follows are worked examples that use the concepts from this section.

Example 38.4.

Let \(T: \pol_1 \to \pol_2\) be defined by \(T(a+bt) = b+at+2at^2\text{.}\)

(a)

Show that \(T\) is a linear transformation.

Solution.

Let \(p(t)=a+bt\) and \(q(t)=c+dt\) be in \(\pol_1\text{.}\) Then

\begin{align*} T(p(t)+q(t)) \amp = T((a+c)+(b+d)t)\\ \amp = (b+d) + (a+c)t + 2(a+c)t^2\\ \amp = (b+at+2at^2) + (d+ct+2ct^2)\\ \amp = T(p(t)) + T(q(t))\text{.} \end{align*}

Now let \(k\) be a scalar. Then

\begin{align*} T(kp(t)) \amp = T((ka)+(kb)t)\\ \amp = (kb)+(ka)t + (2ka)t^2\\ \amp = k(b+at+2at^2)\\ \amp =kT(p(t))\text{.} \end{align*}

We conclude that \(T\) is a linear transformation.

(b)

Let \(\CS_1 = \{1,t\}\) and \(\CS_2 = \{1,t,t^2\}\) be the standard bases for \(\pol_1\) and \(\pol_2\text{,}\) respectively. Find the matrix \([T]_{\CS_2}^{\CS_1}\) for \(T\) with respect to \(\CS_2\) and \(\CS_1\text{.}\) Use the matrix \([T]_{\CS_2}^{\CS_1}\) to determine if \(T\) is one-to-one and/or onto. Explain your reasoning. Use technology as appropriate.

Solution.

Recall that

\begin{equation*} [T]_{\CS_1}^{\CS_2} = \left[ [T(1)]_{\CS_2} \ [T(t)]_{\CS_2} \right] = \left[ [t+2t^2]_{\CS_2} \ [1]_{\CS_2} \right] = \left[ \begin{array}{cc} 0\amp 1\\1\amp 0\\2\amp 0 \end{array} \right]\text{.} \end{equation*}

The linear transformation \(T\) is one-to-one and/or onto if and only if the matrix transformation defined by \([T]_{\CS_1}^{\CS_2}\) is one-to-one and/or onto. The reduced row echelon form of \([T]_{\CS_1}^{\CS_2}\) is \(\left[ \begin{array}{cc} 1\amp 0\\0\amp 1\\0\amp 0 \end{array} \right]\text{.}\) Since \([T]_{\CS_1}^{\CS_2}\) has a pivot in every column, \(T\) is one-to-one. However, \([T]_{\CS_1}^{\CS_2}\) does not have a pivot in every row, so \(T\) is not onto.

(c)

Use the matrix \([T]_{\CS_2}^{\CS_1}\) to find \(\Ker(T)\) and \(\Range(T)\text{.}\) If possible, find a basis for each.

Solution.

From part (b) we know that \(T\) is one-to-one, so \(\Ker(T) = \{0\}\text{.}\) Let \(q(t)\) be a polynomial in \(\Range(T)\text{.}\) Then there is a polynomial \(p(t)\) in \(\pol_1\) such that \(T(p(t)) = q(t)\text{.}\) It follows that

\begin{equation*} [q(t)]_{\CS_2} = [T(p(t))]_{\CS_2} = [T]_{\CS_1}^{\CS_2}[p(t)]_{\CS_1}\text{.} \end{equation*}

If \(p(t) = a_0+a_1t\text{,}\) then

\begin{align*} _{\CS_2} \amp = \left[ \begin{array}{cc} 0\amp 1\\ 1\amp 0\\ 2\amp 0 \end{array} \right] \left[ \begin{array}{c} a_0\\ a_1 \end{array} \right]\\ \amp = \left[ \begin{array}{c} a_1\\ a_0\\ 2a_0 \end{array} \right]\\ \amp = a_0\left[ \begin{array}{c} 0\\ 1\\ 2 \end{array} \right] + a_1\left[ \begin{array}{c} 1\\ 0\\ 0\end{array} \right]\text{.} \end{align*}

Thus, \(q(t)\) is in the span of \(t+2t^2\) and \(1\text{.}\) So \(\Range(T) = \Span\{1, t+2t^2\}\text{.}\) Since neither \(1\) nor \(t+2t^2\) is a scalar multiple of the other, the vectors \(1\) and \(t+2t^2\) are linearly independent. Thus, \(\{1, t+2t^2\}\) is a basis for \(\Range(T)\text{.}\)

(d)

Let \(\CB = \{1+t,1-t\}\) be a basis for \(\pol_1\) and \(\CC = \{t, 1-t^2, t+t^2\}\) a basis for \(\pol_2\text{.}\) Find the matrix \([T]_{\CB}^{\CC}\) for \(T\) with respect to \(\CC\) and \(\CB\text{.}\)

Solution.

Recall that

\begin{equation*} [T]_{\CB}^{\CC} = \left[ [T(1+t)]_{\CC} \ [T(1-t)]_{\CC} \right] = \left[ [1+2t+t^2]_{\CC} \ [1-t^2]_{\CC} \right] = \left[ \begin{array}{cc} 0\amp 0\\1\amp 1\\2\amp 0 \end{array} \right]\text{.} \end{equation*}
(e)

Find \(T(1-2t)\) using the matrix \([T]_{\CB}^{\CC}\text{.}\)

Solution.

To find \(T(1-2t)\) using the matrix \([T]_{\CB}^{\CC}\text{,}\) recall that \([T(p(t))]_{\CC} = [T]_{\CB}^{\CC}[p(t)]_{\CB}\text{.}\) First note that \([1-2t]_{\CB} = \left[ \begin{array}{r} -\frac{1}{2} \\ \frac{3}{2} \end{array} \right]\text{.}\) So

\begin{equation*} [T(p(t))]_{\CC} = [T]_{\CB}^{\CC}[p(t)]_{\CB} = \left[ \begin{array}{cc} 1\amp 0\\0\amp 1\\0\amp 0 \end{array} \right] \left[ \begin{array}{r} -\frac{1}{2} \\ \frac{3}{2} \end{array} \right] = \left[ \begin{array}{r} 0 \\ 1 \\ -1 \end{array} \right]\text{.} \end{equation*}

This makes

\begin{equation*} T(1-2t) = 0(t) + (1)\left(1-t^2\right) + (-1)\left(t+t^2\right) = 1-t-2t^2\text{.} \end{equation*}

To check, using the definition of \(T\) we have

\begin{equation*} T(1-2t) = t(1-2t) + (1-2t) = 1-t-2t^2\text{.} \end{equation*}

Example 38.5.

Let \(T: V \to W\) be a linear transformation. Let \(\CB = \{\vv_1, \vv_2, \ldots, \vv_n\}\) be a basis for \(V\) and \(\CC = \{\vw_1, \vw_2, \ldots, \vw_m\}\) a basis for \(W\text{.}\) Let \(S: \R^n \to \R^m\) be the matrix transformation defined by \(S(\vx) = [T]_{\CB}^{\CC} \vx\text{.}\)

(a)

Let \(\vw\) be a vector in \(\Range(T)\text{.}\) Show that \([\vw]_{\CC}\) is in \(\Col \ [T]_{\CB}^{\CC}\text{.}\)

Solution.

Let \(\vw\) be a vector in \(\Range(T)\text{.}\) Then there exists a vector \(\vv\) in \(V\) such that \(T(\vv) = \vw\text{.}\) It follows that

\begin{equation*} [\vw]_{\CC} = [T(\vv)]_{\CC} = [T]_{\CB}^{\CC} [\vv]_{\CC}\text{.} \end{equation*}

Recall that the vectors of the form \(A \vz\) all linear combinations of the columns of \(A\) with weights from \(\vz\text{,}\) so \([T]_{\CB}^{\CC} [\vv]_{\CC}\) (or \([\vw]_{\CC}\)) is in \(\Col \ [T]_{\CB}^{\CC}\text{.}\)

(b)

If \(\vw \in \Range(T)\text{,}\) part (a) shows that \([\vw]_{\CC}\) is in \(\Col \ [T]_{\CB}^{\CC}\text{.}\) So the coordinate transformation \([ \ ]_{\CC}\) maps \(\Range(T)\) into \(\Col \ [T]_{\CB}^{\CC}\text{.}\) Define \(R: \Range(T) \to \Col \ [T]_{\CB}^{\CC}\) to be this coordinate transformation. That is, \(R(\vw) = [\vw]_{\CC}\text{.}\) (As a coordinate transformation, \(R\) is a linear transformation.) We know that coordinate transformations are one-to-one. Show that \(R\) is also an onto transformation.

Solution.

Let \(R: \Range(T) \to \Col \ [T]_{\CB}^{\CC}\) be the coordinate transformation \(R(\vw) = [\vw]_{\CC}\) for each \(\vw \in \Range(T)\text{.}\) To show that \(R\) is an onto transformation, let \(\vy\) be in \(\Col [T]_{\CB}^{\CC}\text{.}\) Then there exists \(\vx = [x_1 \ x_2 \ \ldots \ x_n]^{\tr}\) in \(\R^n\) such that \([T]_{\CB}^{\CC}\vx=\vy\text{.}\) Let \(\vv = x_1\vv_1 + x_2 \vv_2 + \cdots + x_n \vv_n\text{.}\) Then \(\vv\) is in \(V\) and \([\vv]_{\CB} = \vx\text{.}\) Also,

\begin{equation*} [T(\vv)]_{\CC} = [T]_{\CB}^{\CC} [\vv]_{\CB} = [T]_{\CB}^{\CC} \vx = \vy\text{.} \end{equation*}

So if we let \(\vw=T(\vv)\) in \(\Range(T)\text{,}\) then \([\vw]_{\CC} = \vy\) and \(\vy\) and \(R\) is onto.

(c)

What can we conclude about the relationship between the vector spaces \(\Range(T)\) and \(\Col \ [T]_{\CB}^{\CC}\text{?}\) What must then be true about \(\dim(\Range(T))\) and \(\dim(\Col \ [T]_{\CB}^{\CC})\text{?}\)

Solution.

Since \(R\) is a one-to-one and onto linear transformation from \(\Range(T)\) to \(\Col \ [T]_{\CB}^{\CC}\text{,}\) it follows that \(\Range(T)\) and \(\Col \ [T]_{\CB}^{\CC}\) are isomorphic vector spaces, and therefore we also have \(\dim(\Range(T)) = \dim(\Col \ [T]_{\CB}^{\CC})\text{.}\)

When we connect the results of this example with the result of Exercise 5 in this section, we obtain a linear transformation analog of the Rank-Nullity Theorem. That is, if \(T\) is a linear transformation from a vector space \(V\) of dimension \(n\) with basis \(\CB\) to a vector space \(W\) of dimension \(m\) with basis \(\CC\text{,}\) then

\begin{equation*} \dim(\Ker(T)) + \dim(\Range(T)) = \dim(\Nul \ [T]_{\CB}^{\CC}) + \dim(\Col \ [T]_{\CB}^{\CC}) = n\text{.} \end{equation*}

Subsection Summary

  • The standard matrix for a linear transformation \(T\) from \(\R^n\) to \(\R^m\) is the matrix

    \begin{equation*} A = [T(\ve_1) \ T(\ve_2) \ \cdots \ T(\ve_n)]\text{,} \end{equation*}

    where \(\{\ve_1, \ve_2, \ldots, \ve_n\}\) is the standard basis for \(\R^n\text{.}\) Then \(T\) is the matrix transformation defined by \(T(\vx) = A\vx\) for all \(\vx\) in \(\R^n\text{.}\)

  • Let \(V\) be an \(n\) dimensional vector space and \(W\) an \(m\) dimensional vector space and suppose \(T : V \to W\) is a linear transformation. Let \(\CB = \{\vv_1, \vv_2, \ldots, \vv_n\}\) be a basis for \(V\) and \(\CC = \{\vw_1, \vw_2, \ldots, \vw_m\}\) a basis for \(W\text{.}\) The matrix for \(T\) with respect to the bases \(\CB\) and \(\CC\) is the matrix

    \begin{equation*} [T]_{\CB}^{\CC} = \left[ [T(\vv_1)]_{\CC} \ [T(\vv_2)]_{\CC} \ [T(\vv_3)]_{\CC} \ \cdots \ [T(\vv_n)]_{\CC} \right]\text{.} \end{equation*}

    If \(V=W\) and \(\CC = \CB\text{,}\) then we use the notation \([T]_{\CB}\) as a shorthand for \([T]_{\CB}^{\CC}\text{.}\) The matrix \([T]_{\CB}^{\CC}\) has the property that

    \begin{equation*} [T(\vv)]_{\CC} = [T]_{\CB}^{\CC} [\vv]_{\CB} \end{equation*}

    for any \(\vv\) in \(V\text{.}\)

  • The matrix for a linear transformation allows us to represent any linear transformation between finite dimensional vectors spaces as a matrix transformation. When we view a linear transformation \(T\) as a matrix transformation, we are able to use the matrix tools we have developed to understand \(T\text{.}\)

Exercises Exercises

1.

Let \(T : \pol_2 \to \pol_3\) be defined by \(T(a_0+a_1t+a_2t^2) = (a_0+a_1) + (a_1+a_2)t + a_0t^2 + a_2t^3\text{.}\) You may assume that \(T\) is a linear transformation. Let \(\CB = \{p_0(t), p_1(t), p_2(t)\}\text{,}\) where \(p_0(t)=1\text{,}\) \(p_1(t)=t\text{,}\) and \(p_2(t) = t^2\text{,}\) be the standard basis for \(\pol_2\) and \(\CC=\{q_0(t), q_1(t), q_2(t), q_3(t)\}\text{,}\) where \(q_0(t) = 1\text{,}\) \(q_1(t) = t\text{,}\) \(q_2(t)=t^2\text{,}\) and \(q_3(t)=t^3\text{,}\) the standard basis for \(\pol_3\text{.}\)

(a)

Write the polynomial \(r(t) = r_0+r_1t+r_2t^2\) as a linear combination \(c_0p_0(t)+c_1p_1(t)+c_2p_2(t)\) of the basis vectors in \(\CB\text{.}\) Identify the weights \(c_0\text{,}\) \(c_1\text{,}\) and \(c_2\text{.}\) What is \([r(t)]_{\CB}\text{?}\)

(b)

Without doing any calculations, explain why

\begin{equation*} T(r(t)) = c_0T(p_0(t)) + c_1 T(p_1(t)) + c_2 T(p_2(t))\text{.} \end{equation*}
(c)

Without doing any calculations, explain why

\begin{equation*} [T(r(t))]_{\CC} = c_0[T(p_0(t))]_{\CC} + c_1 [T(p_1(t))]_{\CC} + c_2 [T(p_2(t))]_{\CC}\text{.} \end{equation*}
(d)

Explicitly determine \([T(p_0(t))]_{\CC}\text{,}\) \([T(p_1(t))]_{\CC}\text{,}\) \([T(p_2(t))]_{\CC}\text{.}\)

(e)

Combine the results of parts (c) and (d) to find a matrix \(A\) so that

\begin{equation*} [T(r(t))]_{\CC} = A [r(t)]_{\CB}\text{.} \end{equation*}
(f)

Use the matrix \(A\) to find \([T(1+t-t^2)]_{\CC}\text{.}\) Then use this vector to calculate \(T(1+t-t^2)\text{.}\)

(g)

Calculate \(T(1+t-t^2)\) directly from the rule for \(T\) and compare to the previous result.

2.

Let \(V\) and \(W\) be finite dimensional vector spaces, and let \(S\) and \(T\) be linear transformations from \(V\) to \(W\text{.}\)

(a)

The sum \(S+T\) is defined as

\begin{equation*} (S+T)(\vx) = S(\vx) + T(\vx) \end{equation*}

for all \(\vx\) in \(V\text{.}\) Let \(\CB\) be a basis for \(V\) and \(\CC\) a basis for \(W\text{.}\) Is the statement

\begin{equation*} [S+T]_{\CB}^{\CC} = [S]_{\CB}^{\CC} + [T]_{\CB}^{\CC} \end{equation*}

true or false? If true, prove the statement. If false, provide a counterexample.

(b)

The scalar multiple \(cT\text{,}\) for a scalar \(c\text{,}\) is defined as

\begin{equation*} (cT)(\vx) = cT(\vx) \end{equation*}

for all \(\vx\) in \(V\text{.}\) Let \(\CB\) be a basis for \(V\) and \(\CC\) a basis for \(W\text{.}\) Is the statement

\begin{equation*} [cT]_{\CB}^{\CC} = c[T]_{\CB}^{\CC} \end{equation*}

true or false? If true, prove the statement. If false, provide a counterexample.

3.

If \(V\text{,}\) \(W\text{,}\) and \(U\) are finite dimensional vector spaces and \(S:V \to W\) and \(T:W \to U\) are linear transformations, the composite \(T \circ S\) is defined as

\begin{equation*} (T \circ S)(\vx) = T(S(\vx)) \end{equation*}

for all \(\vx\) in \(V\text{.}\)

(a)

Prove that \(T \circ S:V\to U\) is a linear transformation.

Hint.

Use the linearity of both \(S\) and \(T\text{.}\)

(b)

Let \(\CB\) be a basis for \(V\text{,}\) \(\CC\) a basis for \(W\text{,}\) and \(\CD\) a basis for \(U\text{.}\) Is the statement

\begin{equation*} [T \circ S]_{\CB}^{\CD} = [T]_{\CC}^{\CD} [S]_{\CB}^{\CC} \end{equation*}

true or false? If true, prove the statement. If false, provide a counterexample.

4.

Let \(V\) be a finite dimensional vector space with basis \(\CB\text{,}\) and let \(T\) be a one-to-one linear transformation from \(V\) to \(V\text{.}\)

(a)

Use the matrix \([T]_{\CB}\) to explain why \(T\) is also onto. (Recall that we use the shorthand notation \([T]_{\CB}\) for \([T]_{\CB}^{\CB}\text{.}\))

(b)

Since \(T\) is one-to-one and onto, as a function \(T\) has an inverse defined by

\begin{equation*} T^{-1}(\vy) = \vx \end{equation*}

whenever \(T(\vx) = \vy\text{.}\) Show that \(T^{-1}\) is a linear transformation from \(V\) to \(V\text{.}\)

(c)

Is the statement

\begin{equation*} [T^{-1}]_{\CB} = \left([T]_{\CB}\right)^{-1} \end{equation*}

true or false? If true, prove the statement. If false, provide a counterexample.

5.

Let \(V\) and \(W\) be vector spaces with \(\dim(V) = n\) and \(\dim(W) = m\text{,}\) and let \(T : V \to W\text{.}\) Let \(\CB\) be a basis for \(V\) and \(\CC\) a basis for \(W\text{.}\) There is a connection between \(\Ker(T)\) and \(\Nul [T]_{\CB}^{\CC}\text{.}\) Find the connection and verify it.

6.

Let \(V\) and \(W\) be vector spaces and define \(L(V,W)\) to be the set of all linear transformations from \(V\) to \(W\) as in Exercise 14 of Section 37. The set \(L(V,W)\) is a vector space with the operations as as follows for \(S\) and \(T\) are in \(L(V,W)\) and \(c\) a scalar:

\begin{equation*} (S+T)(\vv) = S(\vv) + T(\vv) \ \ \text{ and } \ \ (cT)(\vv) = cT(\vv) \end{equation*}

for all \(\vv\) in \(V\text{.}\) If \(\dim(V) = n\) and \(\dim(W) = m\text{,}\) find the dimension of \(L(V,W)\text{.}\) (Hint: Let \(\CB\) be a basis for \(V\) and \(\CC\) a basis for \(W\text{.}\) What can be said about the mapping that sends \(T\) in \(L(V,W)\) to \([T]_{\CB}^{\CC}\text{?}\) Then use Exercise 7 in Section 37.)

7.

Let \(T : V \to W\) be a linear transformation from an \(n\)-dimensional vector space \(V\) to an \(m\)-dimensional vector space \(W\text{.}\) Let \(\CB\) be a basis for \(V\) and \(\CC\) a basis for \(W\text{.}\) Let \(A = [T]_{\CB}^{\CC}\text{.}\) Let \(T'\) be the matrix transformation from \(\R^n\) to \(\R^m\) defined by \(T'(\vx) = A\vx\text{.}\)

(a)

Show that if \(\vw\) is in \(\Range(T)\text{,}\) then \([\vw]_{\CC}\) is in the range of \(T'\text{.}\)

(b)

Let \(\CB = \{\vv_1, \vv_2, \ldots, \vv_n\}\) and \(\CC = \{\vw_1, \vw_2, \ldots, \vw_m\}\text{.}\) Show that if the vector \(\vy = [y_1 \ y_2 \ \cdots \ y_m]\) is in the range of \(T'\text{,}\) then the vector \(\vw = y_1\vw_1 + y_2 \vw_2 + \cdots y_m \vw_m\) is in the range of \(T\text{.}\)

(c)

Explain why the results of (a) and (b) show that \(T\) is onto if and only if every row of \(A = [T]_{\CB}^{\CC}\) contains a pivot.

Hint.

How do we tell if \(T'\) is onto?

8.

Our entire world is always in a state of motion. Much of this motion is vibration. When the vibrations of one object some into contact with the vibrations of another, the vibrations can be amplified. This is called resonance. Resonance appears in our lives every day, e.g., resonance is how food cooks in a microwave oven. A great example of resonance is the collapse of the Tacoma Narrows Bridge (just Google Tacoma Narrows Bridge to find some fascinating videos of this event). Resonance can be seen in mathematical models of vibrations. One such model is the second order differential equation

\begin{equation*} y'' + y = \cos(t)\text{,} \end{equation*}

where \(y\) is some unknown function of \(t\) and \(y''\) is its second derivative. You can think of this system as modeling the oscillatory motion of a spring with mass attached to it. The cosine function in this example exerts an external force on the mass-spring system. (You don't need to know how this model is derived for this project.) Our goal is to find the solutions to this differential equation within the subspace \(Y = \Span \ \CB\text{,}\) where \(\CB = \{\cos(t), \sin(t), t\cos(t), t\sin(t)\}\) of \(\D^2\text{,}\) the subspace of \(\F\) of functions with second derivatives (you may assume that \(\D^2\) is a subspace of \(\F\)). Let \(T: \D^2 \to \D^2\) be defined by \(T(f) = f'' + f\text{.}\)

(a)

Show that \(T\) is a linear transformation.

(b)

Show that \(\CB\) is a basis for \(Y\text{.}\)

Hint.

You might consider using the Wronskian.

(c)

Find the matrix of \(T\) with respect to the basis \(\CB\text{.}\) That is, find \([T]_{\CB}\text{.}\) (Recall that we use the shorthand notation \([T]_{\CB}\) for \([T]_{\CB}^{\CB}\text{.}\))

(d)

Use the matrix to find all solutions to the equation \(T(f) = \cos(t)\) in \(Y\text{.}\)

Hint.

If \(T(f) = \cos(t)\text{,}\) what does that say about the relationship between \([T]_{\CB}^{\CB}\text{,}\) \([\cos(t)]_{\CB}\text{,}\) and \([f]_{\CB}\text{?}\)

(e)

Sketch a few graphs of solutions to \(T(f) = \cos(t)\) and explain what they look like and how they are related to resonance.

9.

Label each of the following statements as True or False. Provide justification for your response.

(a) True/False.

If \(T\) is a linear transformation from a vector space \(V\) to a vector space \(W\text{,}\) and \([T]_{\CB}^{\CC}\) is a \(3 \times 2\) matrix for some bases \(\CB\) of \(V\) and \(\CC\) of \(W\text{,}\) then \(T\) cannot be one-to-one.

(b) True/False.

If \(T\) is a linear transformation from a vector space \(V\) to a vector space \(W\text{,}\) and \([T]_{\CB}^{\CC}\) is a \(2 \times 3\) matrix for some bases \(\CB\) of \(V\) and \(\CC\) of \(W\text{,}\) then \(T\) cannot be onto.

(c) True/False.

If \(T\) is a linear transformation from a vector space \(V\) to a vector space \(W\text{,}\) and \([T]_{\CB}^{\CC}\) is a \(2 \times 3\) matrix for some bases \(\CB\) of \(V\) and \(\CC\) of \(W\text{,}\) then \(T\) cannot be one-to-one.

(d) True/False.

If \(T\) is a linear transformation from a vector space \(V\) to a vector space \(W\text{,}\) and \([T]_{\CB}^{\CC}\) is a \(3 \times 2\) matrix for some bases \(\CB\) of \(V\) and \(\CC\) of \(W\text{,}\) then \(T\) cannot be onto.

(e) True/False.

Let \(S\) be a linear transformation from a vector space \(Y\) to a vector space \(V\) and let \(T\) be a linear transformation from a vector space \(V\) to a vector space \(W\text{.}\) Suppose that \([S]_{\CS}^{\CB}\) is a \(3 \times 4\) matrix and \([T]_{\CB}^{\CC}\) is a \(4 \times 2\) matrix for some bases \(\CS\) of \(Y\text{,}\) \(\CB\) of \(V\) and \(\CC\) of \(W\text{.}\) Then \([T \circ S]_{\CS}^{\CC}\) is a \(3 \times 2\) matrix.

(f) True/False.

Let \(V\) be a finite dimensional vector space of dimension \(n\) with basis \(\CB\) and \(W\) a finite dimensional vector space of dimension \(m\) with basis \(\CC\text{.}\) Let \(T\) be a linear transformation from \(V\) to \(W\text{.}\) If the columns of the matrix \([T]_{\CB}^{\CC}\) are linearly independent, then the transformation \(T\) is onto.

(g) True/False.

Let \(V\) be a finite dimensional vector space of dimension \(n\) with basis \(\CB\) and \(W\) a finite dimensional vector space of dimension \(m\) with basis \(\CC\text{.}\) Let \(T\) be a linear transformation from \(V\) to \(W\text{.}\) If the columns of the matrix \([T]_{\CB}^{\CC}\) are linearly independent, then the transformation \(T\) is one-to-one.

(h) True/False.

Let \(V\) be a finite dimensional vector space of dimension \(n\) with basis \(\CB\) and \(W\) a finite dimensional vector space of dimension \(m\) with basis \(\CC\text{.}\) Let \(T\) be a linear transformation from \(V\) to \(W\text{.}\) If the matrix \([T]_{\CB}^{\CC}\) has \(n\) pivots, then the transformation \(T\) is onto.

(i) True/False.

Let \(V\) be a finite dimensional vector space of dimension \(n\) with basis \(\CB\) and \(W\) a finite dimensional vector space of dimension \(m\) with basis \(\CC\text{.}\) Let \(T\) be a linear transformation from \(V\) to \(W\text{.}\) If the matrix \([T]_{\CB}^{\CC}\) has \(n\) pivots, then the transformation \(T\) is one-to-one.

Subsection Project: Shamir's Secret Sharing and Lagrange Polynomials

Shamir's Secret Sharing is a secret sharing algorithm developed by the Israeli cryptographer Adi Shamir, who also contributed to the invention of RSA algorithm. The idea is to develop shares related to a secret code that can be distributed in such a way that the secret code can only be discovered if a fixed number of shareholders combine their information.

The general algorithm for Shamir's Secret Sharing works by creating a polynomial with the secret code as one coefficient and random remaining coefficients. More specifically, to create a \((k,n)\) threshold scheme, let \(a_0\) be the secret code. Then choose at random \(k-1\) positive integers \(a_1\text{,}\) \(a_2\text{,}\) \(\ldots\text{,}\) \(a_{k-1}\) and create the polynomial

\begin{equation*} p(t) = a_0 + a_1t + a_2 t^2 + \cdots + a_{k-1}t^{k-1}\text{,} \end{equation*}

where \(a_0\) is the secret. Evaluate \(p(t)\) at \(n\) different inputs \(t_1\text{,}\) \(t_2\text{,}\) \(\ldots\text{,}\) \(t_n\) to create \(n\) points \(P_1 = (t_1,p(t_1))\text{,}\) \(P_2 = (t_2,p(t_2))\text{,}\) \(\ldots\text{,}\) \(P_n = (t_n, p(t_n))\text{.}\) Each participant is given one of these points. Since any collection of \(k\) distinct points on the graph of \(p(t)\) uniquely determines \(p(t)\text{,}\) any combination of \(k\) of the participants could reconstruct \(p(t)\text{.}\) The secret is then \(p(0)\text{.}\) (Note that, except under very restrictive circumstances, there is no polynomial of degree less than \(k\) that passes through the given \(k\) points, so it would be impossible for fewer than \(k\) participants to reconstruct the message.)

As an example, let our secret code be \(a_0=1234\text{.}\) Let \(n = 6\) and \(k = 3\text{.}\) Choose two positive integers at random, say \(a_1 = 100\) and \(a_2 = 38\text{.}\) Then

\begin{equation} p(t) = 1234 + 100t + 38t^2\text{.}\tag{38.2} \end{equation}

Now we construct \(6\) points by selecting \(6\) positive integers, say \(t_1 = 1\text{,}\) \(t_2 = 2\text{,}\) \(t_3 = 3\text{,}\) \(t_4 = 4\text{,}\) \(t_5 = 5\text{,}\) and \(t_6 = 6\text{.}\) Evaluating \(p(t)\) at \(t=1\) through \(t=6\) gives us the points \(P_1 = (1,1372)\text{,}\) \(P_2 = (2,1586)\text{,}\) \(P_3 = (3,1876)\text{,}\) \(P_4 = (4,2242)\text{,}\) \(P_5 = (5,2684)\text{,}\) and \(P_6 = (6,3202)\text{.}\) Our goal is to find the polynomial that passes through any three of these points. The next activity will show us how to find this polynomial.

Project Activity 38.6.

It will be instructive to work in the most general setting. We restrict ourselves to the degree \(2\) case for now. Given three scalars \(t_1\text{,}\) \(t_2\text{,}\) and \(t_3\text{,}\) define \(L: \pol_2 \to \R^3\) by

\begin{equation*} L(q(t)) = \left[ \begin{array}{c} q(t_1) \\ q(t_2) \\ q(t_3) \end{array} \right]\text{.} \end{equation*}
(a)

Show that \(L\) is a linear transformation.

(b)

Find the matrix for \(L\) with respect to the standard bases \(\CB = \{\ve_1, \ve_2, \ve_3\}\) for \(\R^3\) and \(\CS = \{1,t,t^2\}\) for \(\pol_2\text{.}\)

(c)

Recall that the matrix \([L]_{\CS}^{\CB}\) has the property that \([L(q(t))]_{\CB} = [L]_{\CS}^{\CB}[q(t)]_{\CS}\) for any \(q(t)\) in \(\pol_2\text{.}\) So \(L\) is one-to-one if and only if the matrix transformation defined by \([L]_{\CS}^{\CB}\) is one-to-one. Use this idea to show that \(L\) is one-to-one if and only if \(t_1\text{,}\) \(t_2\text{,}\) and \(t_3\) are all different. Use appropriate technology where needed.

(d)

Given three points \((t_1,y_1)\text{,}\) \((t_2,y_2)\text{,}\) and \((t_3,y_3)\) with distinct \(t_1\text{,}\) \(t_2\text{,}\) and \(t_3\text{,}\) our objective is to find a polynomial \(p(t)\) such that \(p(t_i) = y_i\) for \(i\) from \(1\) to \(3\text{.}\) We proceed by finding quadratic polynomials \(\ell_1(t)\text{,}\) \(\ell_2(t)\text{,}\) and \(\ell_3(t)\) so that \(L(\ell_1(t)) = \ve_1\text{,}\) \(L(\ell_2(t)) = \ve_2\text{,}\) and \(L(\ell_3(t)) = \ve_3\text{.}\) Explain why, if \(\ell_1(t)\text{,}\) \(\ell_2(t)\text{,}\) and \(\ell_3(t)\) are quadratic polynomials so that \(L(\ell_1(1)) = \ve_1\text{,}\) \(L(\ell_2(t)) = \ve_2\text{,}\) and \(L(\ell_3(t)) = \ve_3\text{,}\) and \(t_1\text{,}\) \(t_2\text{,}\) and \(t_3\) are all different, then the polynomial \(p(t)\) will satisfy

\begin{equation} p(t) = y_1 \ell_1(t) + y_2 \ell_2(t) + y_3 \ell_3(t)\text{.}\tag{38.3} \end{equation}

The polynomials \(\ell_1(t)\text{,}\) \(\ell_2(t)\text{,}\) and \(\ell_3(t)\) in Project Activity 38.6 are examples of Lagrange polynomials. Project Activity 38.6 shows that fitting polynomials to given points can be accomplished easily using linear combinations of Lagrange polynomials. Now we want to better understand the general formulas for the Lagrange polynomials \(\ell_i(t)\text{.}\)

Project Activity 38.7.

In this activity we see how to find the quadratic polynomials \(\ell_1(t)\text{,}\) \(\ell_2(t)\text{,}\) and \(\ell_3(t)\) so that \(L(\ell_1(t)) = \ve_1\text{,}\) \(L(\ell_2(t)) = \ve_2\text{,}\) and \(L(\ell_3(t)) = \ve_3\text{.}\) Let \(\CB = \{\ve_1, \ve_2, \ve_3\}\) and \(\CS = \{1,t,t^2\}\) be the standard bases for \(\R^3\) and \(\pol_2\text{,}\) respectively.

(a)

Explain why the problem of solving the equations \(L(\ell_1(t)) = \ve_1\text{,}\) \(L(\ell_2(t)) = \ve_2\text{,}\) and \(L(\ell_3(t)) = \ve_3\) is equivalent to solving the equations

\begin{equation*} [L]_{\CS}^{\CB}[\ell_1(t)]_{\CS} = \ve_1, \ [L]_{\CS}^{\CB}[\ell_2(t)]_{\CS} =\ve_2, \ \text{ and } \ [L]_{\CS}^{\CB}[\ell_3(t)]_{\CS} =\ve_3\text{.} \end{equation*}
(b)

Explain why we can solve the equations

\begin{equation*} [L]_{\CS}^{\CB}[\ell_1(t)]_{\CS} = \ve_1, \ [L]_{\CS}^{\CB}[\ell_2(t)]_{\CS} = \ve_2, \ \text{ and } \ [L]_{\CS}^{\CB}[\ell_3(t)]_{\CS}= \ve_3 \end{equation*}

all at once by solving the matrix equation

\begin{equation*} [L]_{\CS}^{\CB} \left[[\ell_1(t)]_{\CS} \ [\ell_2(t)]_{\CS} \ [\ell_3(t)]_{\CS} \right] = I_3\text{.} \end{equation*}

What does this tell us about the relationship between the matrix \(\left[[\ell_1(t)]_{\CS} \ [\ell_2(t)]_{\CS} \ [\ell_3(t)]_{\CS} \right]\) and \([L]_{\CS}^{\CB}\text{?}\)

(c)

Technology shows that

\begin{equation*} \left([L]_{\CS}^{\CB}\right)^{-1} = \left[ \begin{array}{ccc} \frac{t_2t_3}{(t_1-t_2)(t_1-t_3)} \amp \frac{t_1t_3}{(t_2-t_1)(t_2-t_3)} \amp \frac{t_1t_2}{(t_3-t_1)(t_3-t_2)} \\ -\frac{t_2+t_3}{(t_1-t_2)(t_1-t_3)} \amp -\frac{t_1+t_3}{(t_2-t_1)(t_2-t_3)} \amp -\frac{t_1+t_2}{(t_3-t_1)(t_3-t_2)} \\ \frac{1}{(t_1-t_2)(t_1-t_3)} \amp \frac{1}{(t_2-t_1)(t_2-t_3)} \amp \frac{1}{(t_3-t_1)(t_3-t_2)} \end{array} \right]\text{.} \end{equation*}

Use \(\left([L]_{\CS}^{\CB}\right)^{-1}\) to determine the coefficients of \(\ell_1(t)\text{.}\) Then apply some algebra to show that

\begin{equation*} \ell_1(t) = \frac{(t-t_2)(t-t_3)}{(t_1-t_2)(t_1-t_3)}\text{.} \end{equation*}
(d)

Find similar expressions for \(\ell_2(t)\) and \(\ell_3(t)\text{.}\) Explain why these three polynomials satisfy the required conditions that \(L(\ell_1(t)) = \ve_1\text{,}\) \(L(\ell_2(t)) = \ve_2\text{,}\) and \(L(\ell_3(t)) = \ve_3\text{.}\)

Now we return to our secret code with \(a_0 = 1234\text{.}\)

Project Activity 38.8.

Pick any three of the points \(P_1 = (1,1372)\text{,}\) \(P_2 = (2,1586)\text{,}\) \(P_3 = (3,1876)\text{,}\) \(P_4 = (4,2242)\text{,}\) \(P_5 = (5,2684)\text{,}\) and \(P_6 = (6,3202)\text{.}\) Use the Lagrange polynomials \(\ell_1(t)\text{,}\) \(\ell_2(t)\text{,}\) and \(\ell_3(t)\) and (38.3) to find the polynomial whose graph contains the three chosen points. How does your polynomial compare to the polynomial \(p(t)\) in (38.2)?

The Shamir Secret Sharing algorithm depends on being able to find a unique polynomial \(p(t)\) that passes through the created points. We can understand this result with Lagrange polynomials.

Project Activity 38.9.

The process described in Project Activity 38.7 for finding the Lagrange polynomials can be applied to any number of points. Let \((t_1,y_1)\text{,}\) \((t_2,y_2)\text{,}\) \((t_3,y_3)\text{,}\) \(\ldots\text{,}\) \((t_n,y_n)\text{,}\) and \((t_{n+1},y_{n+1})\) be \(n+1\) points with distinct \(t_i\text{.}\) Generalizing the results of Project Activity 38.7, define \(\ell_i(t)\) for \(i\) from \(1\) to \(n+1\) as follows:

\begin{align*} \ell_i(t) \amp = \frac{(t-t_1)(t-t_2) \cdots (t-t_{i-1})(t-t_{i+1}) \cdots (t-t_n)(t-t_{n+1})}{(t_i-t_1)(t_i-t_2) \cdots (t_i-t_{i-1})(t_i-t_{i+1}) \cdots (t_i-t_n)(t_i-t_{n+1})}\\ \amp =\prod_{j \neq i} \frac{t-t_j}{t_i-t_j}\text{.} \end{align*}
(a)

Explain why \(\ell_i(t)\) is in \(\pol_n\) for each \(i\text{.}\)

(b)

Explain why the polynomial \(\ell_i(t)\) satisfies \(\ell_i(t_i) = 1\) and \(\ell_i(t_j) = 0\) if \(i \neq j\text{.}\)

(c)

Let \(p(t) = \sum_{i=1}^{n+1} y_i \ell_i(t)\text{.}\) That is, \(p(t)\) is the polynomial

\begin{equation*} \sum_{i=1}^{n+1} y_i \frac{(t-t_1)(t-t_2) \dots (t-t_{i-1})(t-t_{i+1}) \dots (t-t_n)(t-t_{n+1})}{(t_i-t_1)(t_i-t_2) \dots (t_i-t_{i-1})(t_i-t_{i+1}) \dots (t_i-t_n)(t_i-t_{n+1})}\text{.} \end{equation*}

Explain why \(p(t)\) is a polynomial in \(\pol_n\) whose graph contains the points \((t_i,y_i)\) for \(i\) from \(1\) to \(n+1\text{.}\)

(d)

The previous part demonstrates that there is always a polynomial in \(\pol_n\) whose graph contains the points \((t_1,y_1)\text{,}\) \((t_2,y_2)\text{,}\) \((t_3,y_3)\text{,}\) \(\ldots\text{,}\) \((t_n,y_n)\text{,}\) and \((t_{n+1},y_{n+1})\) with distinct \(t_i\text{.}\) The last piece we need is to know that this polynomial is unique. Use the fact that a polynomial of degree \(n\) can have at most \(n\) roots to show that if \(f(t)\) and \(g(t)\) are two polynomials in \(\pol_n\) whose graphs contain the points \((t_1,y_1)\text{,}\) \((t_2,y_2)\text{,}\) \(\ldots\text{,}\) \((t_n,y_n)\text{,}\) \((t_{n+1},y_{n+1})\) with distinct values of \(t_i\text{,}\) then \(f(t) = g(t)\text{.}\) This completes Shamir's Secret Sharing algorithm.