\[\begin{equation} \begin{aligned} B = \begin{bmatrix} 2 & 1 & 3\\ -2 & 3 & 5\\ 2 & 1 & 2 \end{bmatrix} v = \begin{bmatrix} 11 \\ 5 \\ 8 \\ \end{bmatrix} \end{aligned} \end{equation}\] \[\begin{equation} \begin{aligned} a1 = \begin{bmatrix} 2\\ -2\\ 2\\ \end{bmatrix} + a2 = \begin{bmatrix} 1 \\ 3 \\ 1 \\ \end{bmatrix} + a3= \begin{bmatrix} 3 \\ 5 \\ 3 \\ \end{bmatrix} = \begin{bmatrix} 11 \\ 5 \\ 8 \\ \end{bmatrix} \end{aligned} \end{equation}\] \[\begin{equation} augmented = \begin{bmatrix} 2 & 1 & 3 & 11\\ -2 & 3 & 5 & 5\\ 2 & 1 & 2 & 8\\ \end{bmatrix} \end{equation}\] \[\begin{equation} \rho\beta = \rho\beta \left( \begin{bmatrix} 11 \\ 5 \\ 8 \\ \end{bmatrix} \right) = \rho\beta \left( 2 \begin{bmatrix} 2\\ -2\\ 2\\ \end{bmatrix} + -2 \begin{bmatrix} 1\\ 3\\ 1\\ \end{bmatrix} + 3 \begin{bmatrix} 3\\ 5\\ 2\\ \end{bmatrix}\right) = \begin{bmatrix} 2\\ -2\\ 3\\ \end{bmatrix} \end{equation}\]
B <- matrix(c(2,1,3,-2,3,5,2,1,2),nrow=3,ncol=3,byrow=T)
v <- matrix(c(11,5,8),nrow=3)
answer <- solve(B,v)
t(answer)
## [,1] [,2] [,3]
## [1,] 2 -2 3