6.8: The Matrix of a Linear Transformation II
-
- Last updated
- Save as PDF
Outcomes
- Find the matrix of a linear transformation with respect to general bases.
We begin this section with an important lemma.
Lemma \(\PageIndex{1}\): Mapping of a Basis
Let \(T: \mathbb{R}^n \mapsto \mathbb{R}^n\) be an isomorphism. Then \(T\) maps any basis of \(\mathbb{R}^n\) to another basis for \(\mathbb{R}^n\).
Conversely, if \(T: \mathbb{R}^n \mapsto \mathbb{R}^n\) is a linear transformation which maps a basis of \(\mathbb{R}^n\) to another basis of \(\mathbb{R}^n\), then it is an isomorphism.
- Proof
-
First, suppose \(T:\mathbb{R}^n \mapsto \mathbb{R}^n\) is a linear transformation which is one to one and onto. Let \(\left\{ \vec{v}_{1},\cdots ,\vec{v}_{n}\right\}\) be a basis for \(\mathbb{R}^n\). We wish to show that \(\left\{ T(\vec{v}_{1}),\cdots , T(\vec{v}_{n})\right\}\) is also a basis for \(\mathbb{R}^n\).
First consider why it is linearly independent. Suppose \(\sum_{k=1}^{n}a_{k}T(\vec{v}_{k})=\vec{0}\). Then by linearity we have \(T\left( \sum_{k=1}^{n}a_{k}\vec{v}_{k}\right) =\vec{0}\) and since \(T\) is one to one, it follows that \(\sum_{k=1}^{n}a_{k}\vec{v}_{k}=\vec{0}\). This requires that each \(a_{k}=0\) because \(\left\{ \vec{v}_{1},\cdots, \vec{v}_{n}\right\}\) is independent, and it follows that \(\left\{ T(\vec{v}_{1}),\cdots , T(\vec{v}_{n})\right\}\) is linearly independent.
Next take \(\vec{w}\in \mathbb{R}^n.\) Since \(T\) is onto, there exists \(\vec{v}\in \mathbb{R}^n\) such that \(T(\vec{v})=\vec{w}\). Since \(\left\{ \vec{v}_{1},\cdots ,\vec{v}_{n}\right\}\) is a basis, in particular it is a spanning set and there are scalars \(b_{k}\) such that \(T\left( \sum_{k=1}^{n}b_{k}\vec{v} _{k}\right) =T\left( \vec{v}\right) =\vec{w}\). Therefore \(\vec{w} =\sum_{k=1}^{n}b_{k}T(\vec{v}_{k})\) which is in the \(\mathrm{span}\left\{ T(\vec{v}_{1}),\cdots , T(\vec{v}_{n})\right\} .\) Therefore, \(\left\{ T(\vec{v}_{1}),\cdots ,T(\vec{v}_{n}) \right\}\) is a basis as claimed.
Suppose now that \(T: \mathbb{R}^n \mapsto \mathbb{R}^n\) is a linear transformation such that \(T(\vec{v}_{i})=\vec{w}_{i}\) where \(\left\{\vec{v} _{1},\cdots ,\vec{v}_{n}\right\}\) and \(\left\{ \vec{w}_{1},\cdots , \vec{w}_{n}\right\}\) are two bases for \(\mathbb{R}^n\).
To show that \(T\) is one to one, let \(T\left( \sum_{k=1}^{n}c_{k}\vec{v}_{k}\right) =\vec{0}\). Then \(\sum_{k=1}^{n}c_{k}T(\vec{v}_{k})=\sum_{k=1}^{n}c_{k}\vec{w}_{k}=\vec{ 0}\). It follows that each \(c_{k} = 0\) because it is given that \(\left\{ \vec{w} _{1},\cdots ,\vec{w}_{n}\right\}\) is linearly independent. Hence \(T\left( \sum_{k=1}^{n}c_{k}\vec{v}_{k}\right) =\vec{0}\) implies that \(\sum_{k=1}^{n}c_{k}\vec{v}_{k}=\vec{0}\) and so \(T\) is one to one.
To show that \(T\) is onto, let \(\vec{w}\) be an arbitrary vector in \(\mathbb{R}^n\). This vector can be written as \(\vec{w} = \sum_{k=1}^{n}d_k\vec{w}_k = \sum_{k=1}^{n}d_{k}T(\vec{v}_{k})=T\left( \sum_{k=1}^{n}d_{k} \vec{v}_{k}\right) .\) Therefore, \(T\) is also onto.
Consider now an important definition.
Definition \(\PageIndex{1}\) : Coordinate Vector
Let \(B = \left\{ \vec{v}_1, \vec{v}_2, \cdots, \vec{v}_n \right\}\) be a basis for \(\mathbb{R}^n\) and let \(\vec{x}\) be an arbitrary vector in \(\mathbb{R}^n\). Then \(\vec{x}\) is uniquely represented as \(\vec{x} = a_1\vec{v}_1 + a_2\vec{v}_2 + \cdots + a_n\vec{v}_n\) for scalars \(a_1, \cdots, a_n\).
The coordinate vector of \(\vec{x}\) with respect to the basis \(B\), written \(C_B(\vec{x})\) or \([\vec{x}]_B\), is given by \[C_B(\vec{x}) = C_B \left( a_1\vec{v}_1 + a_2\vec{v}_2 + \cdots + a_n\vec{v}_n \right) = \left [ \begin{array}{c} a_1 \\ a_2 \\ \vdots \\ a_n \end{array} \right ]\nonumber \]
Consider the following example.
Example \(\PageIndex{1}\): Coordinate Vector
Let \(B = \left\{ \left [ \begin{array}{r} 1 \\ 0 \end{array} \right ], \left [ \begin{array}{r} -1 \\ 1 \end{array} \right ] \right\}\) be a basis of \(\mathbb{R}^2\) and let \(\vec{x} = \left [ \begin{array}{r} 3 \\ -1 \end{array} \right ]\) be a vector in \(\mathbb{R}^2\). Find \(C_B(\vec{x})\).
Solution
First, note the order of the basis is important so label the vectors in the basis \(B\) as \[B = \left\{ \left [ \begin{array}{r} 1 \\ 0 \end{array} \right ], \left [ \begin{array}{r} -1 \\ 1 \end{array} \right ] \right\} = \left\{ \vec{v}_1, \vec{v}_2 \right\}\nonumber \] Now we need to find \(a_1, a_2\) such that \(\vec{x} = a_1 \vec{v}_1 + a_2 \vec{v}_2\), that is: \[\left [ \begin{array}{r} 3 \\ -1 \end{array} \right ] = a_1 \left [ \begin{array}{r} 1 \\ 0 \end{array} \right ] + a_2 \left [ \begin{array}{r} -1 \\ 1 \end{array} \right ]\nonumber \] Solving this system gives \(a_1 = 2, a_2 = -1\). Therefore the coordinate vector of \(\vec{x}\) with respect to the basis \(B\) is \[C_B(\vec{x}) = \left [ \begin{array}{r} a_1 \\ a_2 \end{array}\right ] = \left [ \begin{array}{r} 2 \\ -1 \end{array} \right ]\nonumber \]
Given any basis \(B\), one can easily verify that the coordinate function is actually an isomorphism.
We now discuss the main result of this section, that is how to represent a linear transformation with respect to different bases.
Theorem \(\PageIndex{2}\): The Matrix of a Linear
Let \(T: \mathbb{R}^n \mapsto \mathbb{R}^m\) be a linear transformation, and let \(B_1\) and \(B_2\) be bases of \(\mathbb{R}^{n}\) and \(\mathbb{R}^{m}\) respectively.
Then the following holds \[C_{B_2} T = M_{B_{2} B_{1}} C_{B_1} \label{matrixequation}\] where \(M_{B_{2} B_{1}}\) is a unique \(m \times n\) matrix.
If the basis \(B_1\) is given by \(B_1=\{ \vec{v}_1, \cdots, \vec{v}_n \}\) in this order, then \[M_{B_{2} B_{1}} = \left [ C_{B_2}(T(\vec{v}_1)) \; C_{B_2}(T(\vec{v}_2)) \; \cdots C_{B_2}(T(\vec{v}_n)) \right ]\nonumber \]
- Proof
-
The above equation \(\eqref{matrixequation}\) can be represented by the following diagram. \[\begin{array}{rrcll} & & T & & \\ & \mathbb{R}^n & \rightarrow & \mathbb{R}^m & \\ & C_{B_{1} }\downarrow & \circ & \downarrow C_{B_{2} } & \\ & \mathbb{R}^{n} & \rightarrow & \mathbb{R}^{m} & \\ & & M_{B_{2} B_{1} } & & \end{array}\nonumber \]
Since \(C_{B_1}\) is an isomorphism, then the matrix we are looking for is the matrix of the linear transformation \[C_{B_2} T C^{-1}_{B_1} : \mathbb{R}^n \mapsto \mathbb{R}^m.\nonumber \] By Theorem 5.2.2 , the columns are given by the image of the standard basis \(\left\{ \vec{e}_1, \vec{e}_2, \cdots, \vec{e}_n \right\}\). But since \(C^{-1}_{B_1}( \vec{e}_i) = \vec{v}_i\), we readily obtain that \[\begin{array}{ll} M_{B_{2} B_{1}} & = \left [ C_{B_2}T C^{-1}_{B_1} (\vec{e}_1) \;\; C_{B_2}T C^{-1}_{B_1} (\vec{2}_2) \;\; \cdots \;\; C_{B_2}T C^{-1}_{B_1} (\vec{e}_n) \right ] \\ & = \left [ C_{B_2}(T(\vec{v}_1)) \;\; C_{B_2}(T(\vec{v}_2)) \;\; \cdots \;\; C_{B_2}(T(\vec{v}_n)) \right ] \end{array}\nonumber \] and this completes the proof.
Consider the following example.
Example \(\PageIndex{2}\): Matrix of a Linear
Let \(T: \mathbb{R}^2 \mapsto \mathbb{R}^2\) be a linear transformation defined by \(T \left( \left [ \begin{array}{r} a \\ b \end{array} \right ] \right) = \left [ \begin{array}{r} b \\ a \end{array} \right ]\).
Consider the two bases \[B_1 = \left\{ \vec{v}_{1}, \vec{v}_{2} \right\} = \left\{ \left [ \begin{array}{r} 1 \\ 0 \end{array}\right ], \left [ \begin{array}{r} -1 \\ 1 \end{array} \right ] \right\}\nonumber \] and \[B_2 = \left\{ \left [ \begin{array}{r} 1 \\ 1 \end{array} \right ], \left [ \begin{array}{r} 1 \\ -1 \end{array} \right ] \right\}\nonumber \]
Find the matrix \(M_{B_2,B_1}\) of \(T\) with respect to the bases \(B_1\) and \(B_2\).
Solution
By Theorem \(\PageIndex{2}\) , the columns of \(M_{B_{2} B_{1}}\) are the coordinate vectors of \(T(\vec{v}_{1}), T(\vec{v}_{2})\) with respect to \(B_2\).
Since \[T \left( \left [ \begin{array}{r} 1 \\ 0 \end{array}\right ] \right) = \left [ \begin{array}{r} 0 \\ 1 \end{array}\right ] ,\nonumber \] a standard calculation yields \[\left [ \begin{array}{r} 0 \\ 1 \end{array}\right ] = \left(\frac{1}{2} \right)\left [ \begin{array}{r} 1 \\ 1 \end{array} \right ] + \left(-\frac{1}{2} \right) \left [ \begin{array}{r} 1 \\ -1 \end{array} \right ],\nonumber \] the first column of \(M_{B_{2} B_{1}}\) is \(\left [ \begin{array}{r} \frac{1}{2}\\ -\frac{1}{2} \end{array}\right ]\).
The second column is found in a similar way. We have \[T \left( \left [ \begin{array}{r} -1 \\ 1 \end{array} \right ] \right) = \left [ \begin{array}{r} 1 \\ -1 \end{array}\right ] ,\nonumber \] and with respect to \(B_2\) calculate: \[\left [ \begin{array}{r} 1 \\ -1 \end{array}\right ] = 0 \left [ \begin{array}{r} 1 \\ 1 \end{array} \right ] + 1 \left [ \begin{array}{r} 1 \\ -1 \end{array} \right ]\nonumber \] Hence the second column of \(M_{B_{2} B_{1}}\) is given by \(\left [ \begin{array}{r} 0 \\ 1 \end{array} \right ]\). We thus obtain \[M_{B_{2} B_{1}} = \left [ \begin{array}{rr} \frac{1}{2} & 0 \\ -\frac{1}{2} & 1 \end{array} \right ]\nonumber \]
We can verify that this is the correct matrix \(M_{B_{2} B_{1}}\) on the specific example \[\vec{v} = \left [ \begin{array}{r} 3 \\ -1 \end{array} \right ]\nonumber \] First applying \(T\) gives \[T( \vec{v} ) = T \left( \left [ \begin{array}{r} 3 \\ -1 \end{array} \right ] \right) = \left [ \begin{array}{r} -1\\ 3 \end{array} \right ]\nonumber \] and one can compute that \[C_{B_2} \left( \left [ \begin{array}{r} -1 \\ 3 \end{array} \right ] \right) = \left [ \begin{array}{r} 1\\ -2 \end{array} \right ] .\nonumber \]
On the other hand, one compute \(C_{B_1}( \vec{v})\) as \[C_{B_1} \left( \left [ \begin{array}{r} 3 \\ -1 \end{array} \right ] \right) = \left [ \begin{array}{r} 2\\ -1 \end{array} \right ] ,\nonumber \] and finally applying \(M_{B_1 B_2}\) gives \[\left [ \begin{array}{rr} \frac{1}{2} & 0 \\ -\frac{1}{2} & 1 \end{array} \right ] \left [ \begin{array}{r} 2 \\ -1 \end{array}\right ] = \left [ \begin{array}{r} 1 \\ -2 \end{array} \right ]\nonumber \] as above.
We see that the same vector results from either method, as suggested by Theorem \(\PageIndex{2}\) .
If the bases \(B_1\) and \(B_2\) are equal, say \(B\), then we write \(M_{B}\) instead of \(M_{B B}\). The following example illustrates how to compute such a matrix. Note that this is what we did earlier when we considered only \(B_1=B_2\) to be the standard basis.
Example \(\PageIndex{3}\): Matrix of a Linear Transformation with respect to an Arbitrary
Consider the basis \(B\) of \(\mathbb{R}^3\) given by \[B = \{\vec{v}_1 , \vec{v}_2, \vec{v}_3 \} = \left\{ \left [ \begin{array}{r} 1 \\ 0 \\ 1 \end{array} \right ] ,\left [ \begin{array}{r} 1 \\ 1 \\ 1 \end{array} \right ] ,\left [ \begin{array}{r} -1 \\ 1 \\ 0 \end{array} \right ] \right\}\nonumber \] And let \(T :\mathbb{R}^{3}\mapsto \mathbb{R}^{3}\) be the linear transformation defined on \(B\) as: \[T\left [ \begin{array}{r} 1 \\ 0 \\ 1 \end{array} \right ] =\left [ \begin{array}{r} 1 \\ -1 \\ 1 \end{array} \right ] ,T \left [ \begin{array}{c} 1 \\ 1 \\ 1 \end{array} \right ] =\left [ \begin{array}{r} 1 \\ 2 \\ -1 \end{array} \right ] ,T\left [ \begin{array}{r} -1 \\ 1 \\ 0 \end{array} \right ] =\left [ \begin{array}{r} 0 \\ 1 \\ 1 \end{array} \right ]\nonumber \]
- Find the matrix \(M_{B}\) of \(T\) relative to the basis \(B\).
- Then find the usual matrix of \(T\) with respect to the standard basis of \(\mathbb{R}^{3}\).
Solution
Equation \(\eqref{matrixequation}\) gives \(C_BT=M_{B}C_B\), and thus \(M_{B} = C_BTC^{-1}_B\).
Now \(C_B(\vec{v}_i) = \vec{e}_i\), so the matrix of \(C_B^{-1}\) (with respect to the standard basis) is given by \[\left [ C_B^{-1}(\vec{e}_1) \;\; C_B^{-1}(\vec{e}_2) \;\; C_B^{-1}(\vec{e}_2) \right ] = \left [ \begin{array}{rrr} 1 & 1 & -1 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \end{array} \right ]\nonumber \] Moreover the matrix of \(T C_B^{-1}\) is given by \[\left [ TC_B^{-1}(\vec{e}_1) \;\; TC_B^{-1}(\vec{e}_2) \;\; TC_B^{-1}(\vec{e}_2) \right ] = \left [ \begin{array}{rrr} 1 & 1 & 0 \\ -1 & 2 & 1 \\ 1 & -1 & 1 \end{array} \right ]\nonumber \] Thus \[\begin{array}{ll} M_{B} & = C_BTC^{-1}_B = [C^{-1}_B]^{-1} [TC^{-1}_B] \\ & = \left [ \begin{array}{rrr} 1 & 1 & -1 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \end{array} \right ] ^{-1}\left [ \begin{array}{rrr} 1 & 1 & 0 \\ -1 & 2 & 1 \\ 1 & -1 & 1 \end{array} \right ] \\ &=\left [ \begin{array}{rrr} 2 & -5 & 1 \\ -1 & 4 & 0 \\ 0 & -2 & 1 \end{array} \right ] \end{array}\nonumber \]
Consider how this works. Let \(\vec{b} = \left [ \begin{array}{r} b_1 \\ b_2 \\ b_3 \end{array} \right ]\) be an arbitrary vector in \(\mathbb{R}^3\).
Apply \(C^{-1}_{B}\) to \(\vec{b}\) to get \[b_1\left [ \begin{array}{r} 1 \\ 0 \\ 1 \end{array} \right ] + b_2\left [ \begin{array}{r} 1 \\ 1 \\ 1 \end{array} \right ] + b_3\left [ \begin{array}{r} -1 \\ 1 \\ 0 \end{array} \right ]\nonumber \] Apply \(T\) to this linear combination to obtain \[b_1\left [ \begin{array}{r} 1 \\ -1 \\ 1 \end{array} \right ] + b_2\left [ \begin{array}{r} 1 \\ 2 \\ -1 \end{array} \right ] + b_3\left [ \begin{array}{r} 0 \\ 1 \\ 1 \end{array} \right ] =\left [ \begin{array}{c} b_1+b_2 \\ -b_1 + 2b_2+ b_3 \\ b_1-b_2+b_3 \end{array} \right ]\nonumber \] Now take the matrix \(M_{B}\) of the transformation (as found above) and multiply it by \(\vec{b}\). \[\left [ \begin{array}{rrr} 2 & -5 & 1 \\ -1 & 4 & 0 \\ 0 & -2 & 1 \end{array} \right ] \left [ \begin{array}{c} b_1 \\ b_2 \\ b_3 \end{array} \right ] =\left [ \begin{array}{c} 2b_1-5b_2+b_3 \\ -b_1 + 4b_2 \\ -2b_2 + b_3 \end{array} \right ]\nonumber \] Is this the coordinate vector of the above relative to the given basis? We check as follows. \[\left( 2b_1-5b_2+b_3\right) \left [ \begin{array}{c} 1 \\ 0 \\ 1 \end{array} \right ] +\left( -b_1 + 4b_2\right) \left [ \begin{array}{c} 1 \\ 1 \\ 1 \end{array} \right ] +\left( -2b_2+b_3\right) \left [ \begin{array}{c} -1 \\ 1 \\ 0 \end{array} \right ]\nonumber \] \[= \left [ \begin{array}{c} b_1+b_2 \\ -b_1 + 2b_2+b_3 \\ b_1-b_2+b_3 \end{array} \right ]\nonumber \] You see it is the same thing.
Now lets find the matrix of \(T\) with respect to the standard basis. Let \(A\) be this matrix. That is, multiplication by \(A\) is the same as doing \(T\). Thus \[A\left [ \begin{array}{rrr} 1 & 1 & -1 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \end{array} \right ] =\left [ \begin{array}{rrr} 1 & 1 & 0 \\ -1 & 2 & 1 \\ 1 & -1 & 1 \end{array} \right ]\nonumber \] Hence \[A=\left [ \begin{array}{rrr} 1 & 1 & 0 \\ -1 & 2 & 1 \\ 1 & -1 & 1 \end{array} \right ] \left [ \begin{array}{rrr} 1 & 1 & -1 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \end{array} \right ] ^{-1}=\left [ \begin{array}{rrr} 0 & 0 & 1 \\ 2 & 3 & -3 \\ -3 & -2 & 4 \end{array} \right ]\nonumber \] Of course this is a very different matrix than the matrix of the linear transformation with respect to the non standard basis.