powered by
Compare column spaces of two matrices
compare_column_space(X1, X2)
-1 : Either C(X1)=C(X2), or the spaces are not nested.
0 : C(X1) is contained in C(X2)
1 : C(X2) is contained in C(X1)
matrices with the same number of rows
A1 <- matrix(c(1,1,1,1,2,3), nrow=3) A2 <- A1[, 1, drop=FALSE] compare_column_space(A1, A2) compare_column_space(A2, A1) compare_column_space(A1, A1)
Run the code above in your browser using DataLab