Calculates the row space of a matrix.