Two subspaces V and W of a vector space E are supplementary subspaces, or supplement of each other, if they are independent and generate E: V intersection W equals empty set comma space space space V plus W equals E. Sometimes it is said that E is direct sum of V and W.


Given a matrix with the vector of the basis of V as columns, returns a matrix with a basis of the subspace E. The first columns correspond to the columns of the given matrix, and the other ones correspond to the supplement.