Notes for My Daughter on Linear Algebra: Nullity and Rank

Define the matrix B

B = matrix(c(5, 5, 3, 6, 1, 8, 4, 1, 6, 2, 1, 2), nrow = 3, byrow = TRUE)
B
##      [,1] [,2] [,3] [,4]
## [1,]    5    5    3    6
## [2,]    1    8    4    1
## [3,]    6    2    1    2

Transform it to Row Echelon Form

pracma::rref(B)
##      [,1] [,2] [,3]       [,4]
## [1,]    1    0    0  0.3043478
## [2,]    0    1    0 -3.9565217
## [3,]    0    0    1  8.0869565

Conclusion

Number of pivot variables are three, and we have one free variable in the matrix. Therefore rank of the matrix \(B\) is 3 and nullity equals 1.