Again, I am going to use R to solve this problem. N.B., that in grad school for physics we had to solve a lot of problems like this by hand, on pencil and paper. Effectively what I hope to get from this class is to learn new ways of letting the software do the heavy lifting, which is something old-school Physics Profs (Manhattan Project era) found to be “trivial.” They still had shoe boxes full of punch cards on thier book shelves.

I have chosen c.17, in the Vector spaces chapter.

Working within the vector space C4, determine if b = [1,1,0,1] is in the subspace W,

W = < { [1,2,-1,1], [1,0,3,1], [2,1,1,2] } >

At the heart of this problem is makeing an Augmented matrix [W|b] then finding the reduced row echalon form of the Augmented matrix. Someone has written a function to do that in the package “pracma” (http://www4.ncsu.edu/~slrace/LAprimer/LAWorksheets/Row_Reduction_in_R.pdf)

Note that rref has a dependency on package “quadprog”, so you have to install that first.

#install.packages("quadprog", dependencies = TRUE)
#install.packages("pracma", dependencies = TRUE)
library("pracma")
## Warning: package 'pracma' was built under R version 3.4.1

Now to make the Augmented Matrix

c17 <- matrix(c(1,2,-1,1,1,0,3,1,2,1,1,2,1,1,0,1), nrow = 4, ncol= 4)
c17
##      [,1] [,2] [,3] [,4]
## [1,]    1    1    2    1
## [2,]    2    0    1    1
## [3,]   -1    3    1    0
## [4,]    1    1    2    1

We now have to find the reduced row echalon form, for this we will use the rref function in pracma.

rref(c17)
##      [,1] [,2] [,3]      [,4]
## [1,]    1    0    0 0.3333333
## [2,]    0    1    0 0.0000000
## [3,]    0    0    1 0.3333333
## [4,]    0    0    0 0.0000000

Note that the final column is not a pivot column, so the system is consistant and b in the subspace W.