# Row/Column Space of a matrix [duplicate]

I am trying to write some more linear algebra functions into my copy of mathematica, and one that I really want is a function that will give me the row and column space of a matrix, which mathematica doesn't have. To be more specific, If I pass the function a matrix m, which may or may not have linearly independent columns, then it will return the set of linearly independent column vectors, and similarly for the row vectors. For example, if i passed the column space function the matrix

{{1,1},{2,2}}


it would just give me the set

{{1,1}}


as that is the basis of the column space. For the matrix

{{1,2},{3,4}}


The function would give me the same set, as both columns are linearly independant.

I know how to do this on paper, but not in mathematica. If someone could help, I would appreciate it.

• – corey979 Nov 5 '16 at 20:46
• I think what you want is "Interpolative Decomposition" – mikado Nov 6 '16 at 6:35