C17

Working within the vector space C, determine if

\[\mathbf{b} = \left[\begin{array} {rrr} 2 \\ 1 \\ 2 \\ 1 \\ \end{array}\right] \]

is in the subspace W,

\[\mathbf{W} = \left[\begin{array} {rrr} 1 & 1 & 0 & 1\\ 2 & 0 & 1 & 1 \\ 0 & 3 & 0 & 2 \\ 2 & 1 & 2 & 0\\ \end{array}\right] \]

Given a set of vectors S = {u1, u2, u3, …, up}, their span, ⟨S⟩, is the set of all possible linear combinations of u1, u2, u3, . . . , up

x ∈ Cn is a solution to the linear system of equations LS(A, b) if and only if b equals the linear combination of the columns of A formed with the entries of x,

[x]1A1 +[x]2A2 +[x]3A3 +···+[x]nAn = b

library(pracma)
W = matrix(c(1, 2, 0, 2, 1, 0, 3, 1, 0, 1, 0, 2, 1, 1, 2, 0), nrow=4, ncol=4)
b = matrix(c(2, 1, 2, 1), nrow=4, ncol=1)

C17 = cbind(W, b)

rref(C17)
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    0    0    0  1.5
## [2,]    0    1    0    0  1.0
## [3,]    0    0    1    0 -1.5
## [4,]    0    0    0    1 -0.5

Suppose A is the augmented matrix of a system of linear equations with n variables. Suppose also that B is a row-equivalent matrix in reduced row-echelon form with r nonzero rows. Then the system of equations is inconsistent if and only if column n+1 of B is a pivot column.

In our example, b is in the subspace of W because there are no non-zero values on the left hand side of the reduced row-echelon form’s matrix.

On the other hand, C15 is an example where a vector is not within a subspace and the left hand side of the reduced row-echelon form’s matrix are populated by non-zero values.

C15

Working within the vector space C, determine if

\[\mathbf{b} = \left[\begin{array} {rrr} 4 \\ 3 \\ 1 \\ \end{array}\right] \]

is in the subspace W,

\[\mathbf{W} = \left[\begin{array} {rrr} 3 & 1 & 1 & 2\\ 2 & 0 & 1 & 1 \\ 3 & 3 & 0 & 3 \\ \end{array}\right] \]

W = matrix(c(3, 2, 3, 1, 0, 3, 1, 1, 0, 2, 1, 3), nrow=3, ncol=4)
b = matrix(c(4, 3, 1), nrow=3, ncol=1)

C15 = cbind(W, b)

rref(C15)
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    0  0.5  0.5    0
## [2,]    0    1 -0.5  0.5    0
## [3,]    0    0  0.0  0.0    1