ProjVontoW[v_,w_]:=(v.w/w.w)*w;

w1 = {1,0,0,1,1};
w2 = {1,1,0,0,1};

w1.w2

q1 = w1/Norm[w1]

q2 = w2-ProjVontoW[w2,q1]

q1.q2

Norm[q2]

q2 = q2/Norm[q2]

q1.q2

q1.q1

q2.q2

v = {5,2,8,13,-1}

Simplify[(v.q1)*q1+(v.q2)*q2]

(CMat = Transpose[{w1,w2}])//MatrixForm

(WMat = Transpose[CMat].CMat)//MatrixForm

V = {{v.w1},{v.w2}};

Inverse[WMat].V//MatrixForm

39/5*w1-16/5*w2

w1 = {1,0,0,1,1};
w2 = {1,1,0,0,1};
w3 = {0,1,0,1,1};

RowReduce[{w1,w2,w3}]//MatrixForm

q3 = Simplify[w3-ProjVontoW[w3,q1]-ProjVontoW[w3,q2]]

q1.q3

q2.q3

q3.q3

q3  = q3/Norm[q3]

C2 = Transpose[{q1,q2,q3}]

Transpose[C2].C2//MatrixForm

v

Simplify[v.q1*q1+v.q2*q2+v.q3*q3]

C3 = Transpose[{w1,w2,w3}]

V2 = {{v.w1},{v.w2},{v.w3}};

Inverse[Transpose[C3].C3].V2//MatrixForm

Simplify[45/7*w1-32/7*w2+24/7*w3]

w1 = {1,0,0,1,1};
w2 = {1,1,0,0,1};
w3 = {0,1,0,1,1};
w4 = {1,1,1,0,0};

RowReduce[{w1,w2,w3,w4}]//MatrixForm

q4 = Simplify[w4-ProjVontoW[w4,q3]-ProjVontoW[w4,q1]-ProjVontoW[w4,q2]]

q4 = q4/Norm[q4]

C4 = Transpose[{q1,q2,q3,q4}];

Transpose[C4].C4//MatrixForm

w1 = {1,0,0,1,1};
w2 = {1,1,0,0,1};
w3 = {0,1,0,1,1};
w4 = {1,1,1,0,0};
w5 = {1,1,0,1,1};

RowReduce[{w1,w2,w3,w4,w5}]//MatrixForm

q5 = Simplify[w5-ProjVontoW[w5,q1]-ProjVontoW[w5,q2]-ProjVontoW[w5,q3]-ProjVontoW[w5,q4]]

q5 = q5/Norm[q5]

C5 = Transpose[{q1,q2,q3,q4,q5}];

Transpose[C5].C5//MatrixForm

v2 = {1,3,7,2,0};

Simplify[v2.q1*q1+v2.q2*q2+v2.q3*q3+v2.q4*q4+v2.q5*q5]

1*{1,0,0,0,0}+3*{0,1,0,0,0}+7*{0,0,1,0,0}+2*{0,0,0,1,0}+0*{0,0,0,0,1}