Chapter LT, Exercise LT.C20

Let $w = \begin{bmatrix} -3 \\ 1 \\ 4 \end{bmatrix}$

compute
S(w) two different ways. First use the definition of S, then compute the matrix-vector product $C_w$

Suppose $S:C_3→C_4$ is defined by

$S(\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix}) = \begin{bmatrix} 3x_1-2x_2+5x_3 \\ x_1 + x_2 + x_3 \\ 9x_1-2x_2+5x_3 \\ 0x_1 + 4x_2 + 0x_3\end{bmatrix}$

Solution

Method1

W <- matrix(c(-3,1,4), nrow = 3)
W
##      [,1]
## [1,]   -3
## [2,]    1
## [3,]    4
S <- matrix(c(3,1,9,0,-2,1,-2,4,5,1,5,0), nrow = 4)
S
##      [,1] [,2] [,3]
## [1,]    3   -2    5
## [2,]    1    1    1
## [3,]    9   -2    5
## [4,]    0    4    0
S%*%W # Multiply both Matrices
##      [,1]
## [1,]    9
## [2,]    2
## [3,]   -9
## [4,]    4

Method2

$S = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} -3 \\ 1 \\ 4 \end{bmatrix}$

$S(e_1)=3x_1−2x_2+5x_3$ $= 3∗−3−2∗1+5∗4$

$= -9 -2 +20$ $9$

$S(e_2)=x_1+x_2+x_3$

$=-3+1+4$

$=2$

$S(e_3)=9x_1−2x_2+5x_3$

$=9∗−3−2∗1+5∗4$

$=-27-2+20$

$=-9$

$S(e_4)=0x_1+4x_2+0x_3$ $=4∗1$ $=4$ Hence, With both Methods we get

$S(w)= \begin{bmatrix} 9 \\ 2 \\ -9 \\4 \end{bmatrix}$