#install.packages('pracma')
library('pracma')
C26 pg. 255
D = cbind(c(-7,6,3,-1), c(-11,10,5,-2), c(-19,18,9,-4), c(-15,14,7,-3))
I = diag(4)
EEF = cbind(D,I)
EEF
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
## [1,] -7 -11 -19 -15 1 0 0 0
## [2,] 6 10 18 14 0 1 0 0
## [3,] 3 5 9 7 0 0 1 0
## [4,] -1 -2 -4 -3 0 0 0 1
RREEF = rref(EEF)
RREEF
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
## [1,] 1 0 -2 -1 0 0 2 5
## [2,] 0 1 3 2 0 0 -1 -3
## [3,] 0 0 0 0 1 0 3 2
## [4,] 0 0 0 0 0 1 -2 0
L = RREEF[3:4,5:8]
L
## [,1] [,2] [,3] [,4]
## [1,] 1 0 3 2
## [2,] 0 1 -2 0
null_L = cbind(c(-3,2,1,0), c(-2,0,0,1))
null_L
## [,1] [,2]
## [1,] -3 -2
## [2,] 2 0
## [3,] 1 0
## [4,] 0 1
L%*%null_L
## [,1] [,2]
## [1,] -8.881784e-16 -1.776357e-15
## [2,] 0.000000e+00 0.000000e+00
The columns of null_L are a linearly independent set whose span is the columns space of D
Lt = t(L)
Lt
## [,1] [,2]
## [1,] 1 0
## [2,] 0 1
## [3,] 3 -2
## [4,] 2 0
The columns of Lt are a linearly independent set whose span is the left null space of D