> with(linalg):
> M:= matrix([[1, 1,1],[0, 1, 0], [-1, -1, 1]]); #This is the change of basis matrix from the basis B = {[1, 0, -1], [1, 1, -1], [-1, -1, 1]} to the standard basis.
> inverse(M);#This is the change of basis matrix from the standard basis to the basis B = {[1, 0, -1], [1, 1, -1], [-1, -1, 1]}.
> T := matrix([[1, 0, 0], [0, 1, 0], [0, 0, 0]]); #This is the matrix of the projection onto the plane spanned by the first two vectors [1, 0, -1], [1, 1, -1] along the vector [-1, -1, 1], written with respect to the basis B.
> A := multiply(M, T, inverse(M)); # This is the matrix of the projection with respect to the standard basis.
> # We verify that we got the right result
> v:= matrix([[1],[0],[-1]]);
> w :=matrix([[1],[1],[-1]]);
> z:=matrix([[1],[0],[1]]);
> multiply(A, v);
> multiply(A, w);
> multiply(A, z);
>