C10 In the vector space \(\mathbb{C}^3\), compute the vector representation \(\rho_B(v)\) for the basis \(B\) and vector \(v\) below.
\[{B=\left\{ \left[ \begin{matrix} 2 \\ -2 \\ 2 \end{matrix} \right] , \left[ \begin{matrix} 1 \\ 3 \\ 1 \end{matrix} \right] , \left[ \begin{matrix} 3 \\ 5 \\ 2 \end{matrix} \right] \right\} \quad ; \quad v=\left[ \begin{matrix} 11 \\ 5 \\ 8 \end{matrix} \right] }\]
To find \(\rho_B(v)\), we need to find scalars \(a_1; a_2; a_3\) such that \[v=\left[ \begin{matrix} 11 \\ 5 \\ 8 \end{matrix} \right] = a_1\left[ \begin{matrix} 2 \\ -2 \\ 2 \end{matrix} \right] + a_2\left[ \begin{matrix} 1 \\ 3 \\ 1 \end{matrix} \right] + a_3\left[ \begin{matrix} 3 \\ 5 \\ 2 \end{matrix} \right] \]
In matrix form,
\[\left[ \begin{matrix} 2 & 1 & 3 \\ -2 & 3 & 5 \\ 2 & 1 & 2 \end{matrix} \right] \left[ \begin{matrix} a_1 \\ a_2 \\ a_3 \end{matrix} \right] = \left[ \begin{matrix} 11 \\ 5 \\ 8 \end{matrix} \right]\]
# B
B=c(2,1,3,
-2,3,5,
2,1,2)
B=matrix(B,3,3,T)
B
## [,1] [,2] [,3]
## [1,] 2 1 3
## [2,] -2 3 5
## [3,] 2 1 2
# v
v=c(11,5,8)
v=matrix(v,3,1)
v
## [,1]
## [1,] 11
## [2,] 5
## [3,] 8
# Expanded matrix for RREF
Bv=cbind(B,v)
Bv
## [,1] [,2] [,3] [,4]
## [1,] 2 1 3 11
## [2,] -2 3 5 5
## [3,] 2 1 2 8
# compute RREF
library(pracma)
result = rref(Bv)
result
## [,1] [,2] [,3] [,4]
## [1,] 1 0 0 2
## [2,] 0 1 0 -2
## [3,] 0 0 1 3
# solution
rhoBv = result[,4]
rhoBv
## [1] 2 -2 3
# check
B %*% rhoBv
## [,1]
## [1,] 11
## [2,] 5
## [3,] 8
B %*% rhoBv == v
## [,1]
## [1,] TRUE
## [2,] TRUE
## [3,] TRUE
The solution is \({a_1=2}\) , \({a_2=-2}\) , \({a_3=3}\) .
Therefore, \[\rho_B(v) = \rho_B \left( \left[ \begin{matrix} 11 \\ 5 \\ 8 \end{matrix} \right] \right) = \rho_B \left( 2 \left[ \begin{matrix} 2 \\ -2 \\ 2 \end{matrix} \right] + -2 \left[ \begin{matrix} 1 \\ 3 \\ 1 \end{matrix} \right] + 3 \left[ \begin{matrix} 3 \\ 5 \\ 2 \end{matrix} \right] \right) = \left[ \begin{matrix} 2 \\ -2 \\ 3 \end{matrix} \right]\]