\(~\)

# Load library
#install.packages("pracma")
library(pracma)

\(~\)

Linear Algebra: Exercise C17

\(~\)

\(~\)

Handwritten:

\(~\)

Using R:

# Create the matrices

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

b <- matrix(c(2, 1, 2, 1), nrow = 4, ncol = 1)

\(~\)

# Bind the matrices together to create an argumented matrix
data <- cbind(W, b)
data
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    2    0    2    2
## [2,]    1    0    3    1    1
## [3,]    0    1    0    2    2
## [4,]    1    1    2    0    1

\(~\)

# Using reduced row echelon form using Gauss-Jordan elimination
rref(data)
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    0    0    0 -1.0
## [2,]    0    1    0    0  1.0
## [3,]    0    0    1    0  0.5
## [4,]    0    0    0    1  0.5

\(~\)

Conclusion:

Solving it by hand I wasn’t able to get very far and still confused about what to do next. I was able to find an R library called pracma was able to solve the problem. Based on this, b is not a subspace of W.

\(~\)