How to find the basis of a vector space