MATLAB: Find a basis and dimension for the subspace

basis

V=<(1;2;1;-1),(3;1;0;5),(0;5;3;-8)>
I'm new.please write specifically.thank you

Best Answer

V1 = [1;2;1;-1]; V2 = [3;1;0;5]; V3 = [0;5;3;-8];
V = [V1 V2 V3];
rank(X)
The rank of the matrix is 2 meaning the dimension of the space spanned by the columns of the set of three vectors is a two-dimensional subspace of R^3. To find the basic columns
R = rref(V);
The output of rref() shows how to combine columns 1 and 2 to get column three. Specifically,
3*V1-1*V2