Skip to main content

Section 5.2 The matrix of a linear operator

Recall that a linear transformation \(T:V\to V\) is referred to as a linear operator. Recall also that two matrices \(A\) and \(B\) are similar if there exists an invertible matrix \(P\) such that \(B = PAP^{-1}\text{,}\) and that similar matrices have a lot of properties in common. In particular, if \(A\) is similar to \(B\text{,}\) then \(A\) and \(B\) have the same trace, determinant, and eigenvalues. One way to understand this is the realization that two matrices are similar if they are representations of the same operator, with respect to different bases.
Since the domain and codomain of a linear operator are the same, we can consider the matrix \(M_{DB}(T)\) where \(B\) and \(D\) are the same ordered basis. This leads to the next definition.

Definition 5.2.1.

Let \(T:V\to V\) be a linear operator, and let \(B=\basis{b}{n}\) be an ordered basis of \(V\text{.}\) The matrix \(M_B(T)=M_{BB}(T)\) is called the \(B\)-matrix of \(T\text{.}\)
The following result collects several useful properties of the \(B\)-matrix of an operator. Most of these were already encountered for the matrix \(M_{DB}(T)\) of a transformation, although not all were stated formally.

Example 5.2.3.

Find the \(B\)-matrix of the operator \(T:P_2(\R)\to P_2(\R)\) given by \(T(p(x))=p(0)(1+x^2)+p(1)x\text{,}\) with respect to the ordered basis
\begin{equation*} B = \{1-x, x+3x^2, 2-x^2\}\text{.} \end{equation*}
Solution.
We compute
\begin{align*} T(1-x) \amp = 1(1+x^2)+0(x) = 1+x^2\\ T(x+3x^2) \amp = 0(1+x^2)+4x=4x\\ T(2-x^2) \amp = 2(1+x^2)+1(x) = 2+x+2x^2\text{.} \end{align*}
We now need to write each of these in terms of the basis \(B\text{.}\) We can do this by working out how to write each polynomial above in terms of \(B\text{.}\) Or we can be systematic.
Let \(P = \bbm 1\amp 0\amp 2\\-1\amp 1\amp 0\\0\amp 3\amp -1\ebm\) be the matrix whose columns are given by the coefficient representations of the polynomials in \(B\) with respect to the standard basis \(B_0=\{1,x,x^2\}\text{.}\) For \(T(1-x)=1+x^2\) we need to solve the equation
\begin{equation*} a(1-x)+b(x+3x^2)+c(2-x^2)=1+x^2 \end{equation*}
for scalars \(a,b,c\text{.}\) But this is equivalent to the system
\begin{align*} a+2c \amp =1\\ -a+b \amp =0\\ 3b-c \amp =1\text{,} \end{align*}
which, in turn, is equivalent to the matrix equation
\begin{equation*} \bbm 1\amp 0\amp 2\\-1\amp 1\amp 0\\0\amp 3\amp -1\ebm\bbm a\\b\\c\ebm = \bbm 1\\0\\1\ebm\text{;} \end{equation*}
that is, \(PC_B(1+x^2) = C_{B_0}(1+x^2)\text{.}\) Thus,
\begin{equation*} C_B(1+x^2) = \bbm a\\b\\c\ebm = P^{-1}C_{B_0}(1+x^2) = P^{-1}\bbm 1\\0\\1\ebm\text{.} \end{equation*}
Similarly, \(C_B(4x)=P^{-1}\bbm 0\\4\\0\ebm = P^{-1}C_{B_0}(4x)\text{,}\) and \(C_B(2+x+2x^2)=P^{-1}\bbm 2\\1\\2\ebm = P^{-1}C_{B_0}(2+x+2x^2)\text{.}\) Using the computer, we find:
That is,
\begin{align*} M_B(T) \amp =\bbm C_B(T(1-x)) \amp C_B(T(x+3x^2)) \amp C_B(T(2-x^2))\ebm\\ \amp =\bbm P^{-1}C_{B_0}T(1-x) \amp P^{-1} C_{B_0}T(x+3x^2) \amp P^{-1}C_{B_0}(T(2-x^2))\ebm\\ \amp =P^{-1}\bbm C_{B_0}(1+x^2) \amp C_{B_0}(4x)\amp C_{B_0}(2+x+2x^2)\ebm\\ \amp =\bbm 1/7\amp -6/7\amp 3/7\\1/7\amp 1/7\amp 2/7\\3/7\amp 3/7\amp -1/7\ebm \bbm 1\amp 0\amp 2\\0\amp 4\amp 1\\1\amp 0\amp 2\ebm\\ \amp = \bbm 3/7\amp -24/7\amp 0\\3/7\amp 4/7\amp 1\\2/7\amp 12/7\amp 1\ebm\text{.} \end{align*}
Let’s confirm that this works. Suppose we have
\begin{align*} p(x) \amp = C_B^{-1}\bbm a\\b\\c\ebm = a(1-x)+b(x+3x^2)+c(2-x^2)\\ \amp = (a+2c)+(-a+b)x+(3b-c)x^2\text{.} \end{align*}
Then \(T(p(x))=(a+2c)(1+x^2)+(4b+c)x\text{,}\) and we find
\begin{equation*} C_B(T(p(x))) = P^{-1}\bbm a+2c\\4b+c\\a+2c\ebm = \bbm \frac37 a-\frac{24}{7}b\\\frac37 a+\frac47 b+c\\\frac27 a+\frac{12}{7}b+c\ebm\text{.} \end{equation*}
On the other hand,
\begin{equation*} M_B(T) = \bbm 3/7\amp -24/7\amp 0\\3/7\amp 4/7\amp 1\\2/7\amp 12/7\amp 1\ebm\bbm a\\b\\c\ebm = \bbm \frac37 a-\frac{24}{7}b\\\frac37 a+\frac47 b+c\\\frac27 a+\frac{12}{7}b+c\ebm\text{.} \end{equation*}
The results agree, but possibly leave us a little confused.
In general, given an ordered basis \(B=\basis{b}{n}\) for a vector space \(V\) with standard basis \(B_0 = \basis{e}{n}\text{,}\) if we let
\begin{equation*} P = \bbm C_{B_0}(\mathbf{b}_1) \amp \cdots \amp C_{B_0}(\mathbf{b}_n)\ebm\text{,} \end{equation*}
then
\begin{align*} M_B(T) \amp = \bbm C_B(T(\mathbf{b}_1)) \amp \cdots \amp C_B(T(\mathbf{b_n})\ebm\\ \amp = P^{-1}\bbm C_{B_0}(T(\mathbf{b}_1)) \amp \cdots \amp C_{B_0}(T(\mathbf{b_n})\ebm\text{,} \end{align*}
since multiplying by \(P^{-1}\) converts vectors written in terms of \(B_0\) to vectors written in terms of \(B\text{.}\)
As we saw above, this gives us the result, but doesn’t shed much light on the problem, unless we have an easy way to write vectors in terms of the basis \(B\text{.}\) Let’s revisit the problem. Instead of using the given basis \(B\text{,}\) let’s use the standard basis \(B_0 = \{1,x,x^2\}\text{.}\) We quickly find
\begin{equation*} T(1)=1+x+x^2, T(x) = x, \text{ and } T(x^2)=x\text{,} \end{equation*}
so with respect to the standard basis, \(M_{B_0}(T) = \bbm 1\amp 0\amp 0\\1\amp 1\amp 1\\1\amp 0\amp 0\ebm\text{.}\) Now, recall that
\begin{equation*} M_{B}(T)=P^{-1}\bbm C_{B_0}T(1-x)\amp C_{B_0}(T(x+3x^2)\amp C_{B_0}(T(2-x^2))\ebm \end{equation*}
and note that for any polynomial \(p(x)\text{,}\) \(C_{B_0}(T(p(x))) = M_{B_0}(T)C_{B_0}(p(x))\text{.}\) But
\begin{equation*} \bbm C_{B_0}(1-x) \amp C_{B_0}(x+3x^2)\amp C_{B_0}(2-x^2)\ebm = P\text{,} \end{equation*}
so we get
\begin{align*} M_B(T) \amp = P^{-1}\bbm C_{B_0}T(1-x)\amp C_{B_0}(T(x+3x^2)\amp C_{B_0}(T(2-x^2))\ebm\\ \amp = P^{-1}\bbm M_{B_0}(T)C_{B_0}(1-x)\amp M_{B_0}(T)C_{B_0}(x+3x^2)\amp M_{B_0}(T)C_{B_0}(2-x^2)\ebm \\ \amp = P^{-1}M_{B_0}(T)\bbm C_{B_0}(1-x) \amp C_{B_0}(x+3x^2)\amp C_{B_0}(2-x^2)\ebm\\ \amp = P^{-1}M_{B_0}(T)P\text{.} \end{align*}
Now we have a much more efficient method for arriving at the matrix \(M_B(T)\text{.}\) The matrix \(M_{B_0}(T)\) is easy to determine, the matrix \(P\) is easy to determine, and with the help of the computer, it’s easy to compute \(P^{-1}M_{B_0}P = M_B(T)\text{.}\)

Exercise 5.2.4.

Determine the matrix of the operator \(T:\R^3\to \R^3\) given by
\begin{equation*} T(x,y,z) = (3x-2y+4z,x-5y,2y-7z) \end{equation*}
with respect to the ordered basis
\begin{equation*} B = \{(1,2,0),(0,-1,2),(1,2,1)\}\text{.} \end{equation*}
(You may want to use the Sage cell below for computational assistance.)
The matrix \(P\) used in the above examples is known as a change matrix. If the columns of \(P\) are the coefficient vectors of \(B=\basis{b}{n}\) with respect to another basis \(D\text{,}\) then we have
\begin{align*} P \amp= \bbm C_D(\mathbf{b}_1)\amp\cdots \amp C_D(\mathbf{b}_n)\ebm\\ \amp = \bbm C_D(1_V(\mathbf{b}_1))\amp \cdots \amp C_D(1_V(\mathbf{b}_n))\ebm\\ \amp = M_{DB}(1_V)\text{.} \end{align*}
In other words, \(P\) is the matrix of the identity transformation \(1_V:V\to V\text{,}\) where we use the basis \(B\) for the domain, and the basis \(D\) for the codomain.

Definition 5.2.5.

The change matrix with respect to ordered bases \(B,D\) of \(V\) is denoted \(P_{D\leftarrow B}\text{,}\) and defined by
\begin{equation*} P_{D\leftarrow B} = M_{DB}(1_V)\text{.} \end{equation*}

Exercise 5.2.7.

Hint.
The identity operator does nothing. Convince yourself \(M_{DB}(1_V)\) amounts to taking the vectors in \(B\) and writing them in terms of the vectors in \(D\text{.}\)

Example 5.2.8.

Let \(B = \{1,x,x^2\}\) and let \(D = \{1+x,x+x^2,2-3x+x^2\}\) be ordered bases of \(P_2(\R)\text{.}\) Find the change matrix \(P_{D\leftarrow B}\text{.}\)
Solution.
Finding this matrix requires us to first write the vectors in \(B\) in terms of the vectors in \(D\text{.}\) However, it’s much easier to do this the other way around. We easily find
\begin{equation*} P_{B\leftarrow D} = \bbm 1\amp 0\amp 2\\1\amp 1\amp -3\\0\amp 1\amp 1\ebm\text{,} \end{equation*}
and by Theorem 5.2.6, we have
\begin{equation*} P_{D\leftarrow B} = (P_{B\leftarrow D})^{-1} = \frac16\bbm 4\amp 2\amp -2\\-1\amp 1\amp 5\\1\amp -1\amp 1\ebm\text{.} \end{equation*}
Note that the change matrix notation is useful for linear transformations between different vector spaces as well. Recall Theorem 5.1.6, which gave the result
\begin{equation*} M_{D_0B_0}(T) = QM_{D_1B_1}P^{-1}\text{,} \end{equation*}
where (using our new notation) \(P=P_{B_0\leftarrow B_1}\) and \(Q=P_{D_0\leftarrow D_1}\text{.}\) In this notation, we have
\begin{equation*} M_{D_0B_0}(T) = P_{D_0\leftarrow D_1}M_{D_1B_1}(T)P_{B_1\leftarrow B_0}\text{,} \end{equation*}
which seems more intiutive.
The above results give a straightforward procedure for determining the matrix of any operator, with respect to any basis, if we let \(D\) be the standard basis. The importance of these results is not just their computational simplicity, however. The most important outcome of the above is that if \(M_B(T)\) and \(M_D(T)\) give the matrix of \(T\) with respect to two different bases, then
\begin{equation*} M_B(T) = (P_{D\leftarrow B})^{-1}M_D(T)P_{D\leftarrow B}\text{,} \end{equation*}
so that the two matrices are similar.
Recall from Theorem 4.1.10 that similar matrices have the same determinant, trace, and eigenvalues. This means that we can unambiguously define the determinant and trace of an operator, and that we can compute eigenvalues of an operator using any matrix representation of that operator.

Exercises Exercises

1.

Let \(\vec{b}_1 = {\left[\begin{array}{c} 1\cr 1 \end{array}\right]}\) and \(\vec{b}_2= {\left[\begin{array}{c} -1\cr -2 \end{array}\right]}.\) The set \(B= \left\lbrace \vec{b}_1, \vec{b}_2 \right\rbrace\) is a basis for \({\mathbb R}^2.\)
Let \(T: {\mathbb R}^2 \rightarrow {\mathbb R}^2\) be a linear operator such that \(T(\vec{b}_1) = 8 \vec{b}_1 + 3 \vec{b}_2\) and \(T(\vec{b}_2) = 7 \vec{b}_1 + 3 \vec{b}_2.\)
  1. Find the matrix \(M_B(T)\) of \(T\) relative to the basis \(B\text{.}\)
  2. Find the matrix \(M_E(T)\) of \(T\) relative to the standard basis \(E\) for \({\mathbb R}^2\text{.}\)

2.

Let \(f : \mathbb{R}^{2} \to \mathbb{R}^{2}\) be the linear operator defined by
\begin{equation*} f(\vec{x}) = {\left[\begin{array}{cc} -5 \amp 0\cr 2 \amp 5 \end{array}\right]} \vec{x}. \end{equation*}
Let
\begin{equation*} \begin{array}{lcl} \mathcal{B} \amp = \amp \lbrace {\left\lt 1,-2\right>}, {\left\lt -3,5\right>} \rbrace, \\ \mathcal{C} \amp = \amp \lbrace {\left\lt -1,-2\right>}, {\left\lt -1,-1\right>} \rbrace, \end{array} \end{equation*}
be two different bases for \(\mathbb{R}^{2}\text{.}\)
(a)
Find the matrix \(M_{\mathcal{B}}(f)\) for \(f\) relative to the basis \(\mathcal{B}\text{.}\)
(b)
Find the matrix \(M_{\mathcal{C}}(f)\) for \(f\) relative to the basis \(\mathcal{C}\text{.}\)
(c)
Find the transition matrix \(P_{\mathcal{B}\leftarrow\mathcal{C}}\) such that \(C_{\mathcal{B}}(v) = P_{\mathcal{B}\leftarrow\mathcal{C}}C_{\mathcal{C}}(v)\text{.}\)
(d)
Find the transition matrix \(P_{\mathcal{C}\leftarrow\mathcal{B}}\) such that \(C_{\mathcal{C}}(v) = P_{\mathcal{C}\leftarrow\mathcal{B}}C_{\mathcal{B}}(v)\text{.}\)
Reminder: \(P_{\mathcal{C}\leftarrow\mathcal{B}} = P_{\mathcal{B}\leftarrow\mathcal{C}}^{-1}\)
On paper, confirm that \(P_{\mathcal{C}\leftarrow\mathcal{B}}M_{\mathcal{B}}(f)P_{\mathcal{B}\leftarrow\mathcal{C}} = M_{\mathcal{C}}(f)\text{.}\)