Exercise MR.C21
Find a matrix representation of the linear transformation T relative to the bases B and C.
\(T:{ P }_{ 2 }\rightarrow { C }^{ 2 },\quad T(p(x))=\left[ \begin{matrix} p(1) \\ p(3) \end{matrix} \right]\)
\(B=\left\{ 2-5x+{ x }^{ 2 },\quad 1+x-{ x }^{ 2 }\quad ,\quad { x }^{ 2 } \right\}\)
\(C=\left\{ \left[ \begin{matrix} 3 \\ 4 \end{matrix} \right] ,\left[ \begin{matrix} 2 \\ 3 \end{matrix} \right] \right\}\)
We will first plug in the numbers from our linear transformation “T(p(x))” (1) and (3) into our base B equations, and then find how the solutions span base C and solve for scalars \(w_{ 1 }\) and \(w_{ 2 }\)
Thus, when we plug in (1) and (3) in our equations we get:
\(\rho c(T(2-5x+{ x }^{ 2 }))=\rho c\left( \left[ \begin{matrix} -2 \\ -4 \end{matrix} \right] \right)\)
\(\rho c(T(1+x-{ x }^{ 2 }))=\rho c\left( \left[ \begin{matrix} 1 \\ -5 \end{matrix} \right] \right)\)
\(\rho c(T({ x }^{ 2 }))=\rho c\left( \left[ \begin{matrix} 1 \\ 9 \end{matrix} \right] \right)\)
Now we will use each of the solutions from the previous step to construct a separate matrix that spans base “C” to solve for \(w_{ 1 }\) and \(w_{ 2 }\). We will use R to help us reduce the matrix to echelon form:
\(A=\left[ \begin{matrix} 3 & 2 & -2 \\ 4 & 3 & -4 \end{matrix} \right]\)
# constructing matrix
A <- matrix(c(3,4,2,3,-2,-4), nrow=2)
# matrix A
A
## [,1] [,2] [,3]
## [1,] 3 2 -2
## [2,] 4 3 -4
# we use r to get reduced echelon form of matrix A
library(pracma)
## Warning: package 'pracma' was built under R version 3.6.2
rref(A)
## [,1] [,2] [,3]
## [1,] 1 0 2
## [2,] 0 1 -4
For our first equation \({ w }_{ 1 }=2\) and \({ w }_{ 2 }=-4\)
\(D=\left[ \begin{matrix} 3 & 2 & 1 \\ 4 & 3 & -5 \end{matrix} \right]\)
# constructing matrix
D <- matrix(c(3,4,2,3,1,-5), nrow=2)
# matrix D
D
## [,1] [,2] [,3]
## [1,] 3 2 1
## [2,] 4 3 -5
# we use r to get reduced echelon form of matrix D
library(pracma)
rref(D)
## [,1] [,2] [,3]
## [1,] 1 0 13
## [2,] 0 1 -19
For our second equation \({ w }_{ 1 }=13\) and \({ w }_{ 2 }=-19\)
\(E=\left[ \begin{matrix} 3 & 2 & 1 \\ 4 & 3 & 9 \end{matrix} \right]\)
# constructing matrix
E <- matrix(c(3,4,2,3,1,9), nrow=2)
# matrix E
E
## [,1] [,2] [,3]
## [1,] 3 2 1
## [2,] 4 3 9
# we use r to get reduced echelon form of matrix E
library(pracma)
rref(E)
## [,1] [,2] [,3]
## [1,] 1 0 -15
## [2,] 0 1 23
Finally, in our third equation \({ w }_{ 1 }=-15\) and \({ w }_{ 2 }=23\)
Ultimately:
\(\rho c(T(2-5x+{ x }^{ 2 }))=\rho c\left( \left[ \begin{matrix} -2 \\ -4 \end{matrix} \right] \right) =\rho c\left( 2\left[ \begin{matrix} 3 \\ 4 \end{matrix} \right] +(-4)\left[ \begin{matrix} 2 \\ 3 \end{matrix} \right] \right) =\left[ \begin{matrix} 2 \\ -4 \end{matrix} \right]\)
\(\rho c(T(1+x-{ x }^{ 2 }))=\rho c\left( \left[ \begin{matrix} 1 \\ -5 \end{matrix} \right] \right) =\rho c\left( 13\left[ \begin{matrix} 3 \\ 4 \end{matrix} \right] +(-19)\left[ \begin{matrix} 2 \\ 3 \end{matrix} \right] \right) =\left[ \begin{matrix} 13 \\ -19 \end{matrix} \right]\)
\(\rho c(T({ x }^{ 2 }))=\rho c\left( \left[ \begin{matrix} 1 \\ 9 \end{matrix} \right] \right) =\rho c\left( (-15)\left[ \begin{matrix} 3 \\ 4 \end{matrix} \right] +23\left[ \begin{matrix} 2 \\ 3 \end{matrix} \right] \right) =\left[ \begin{matrix} -15 \\ 23 \end{matrix} \right]\)
And,
\({ M }_{ B,C }^{ T }=\left[ \begin{matrix} 2 & 13 & -15 \\ -4 & -19 & 23 \end{matrix} \right]\)