||'''Book'''|| Linear Algebra || ||'''Author'''|| Gilbert Strang || ||'''Edition'''|| || /* code_begins */ {{{ q1=matrix([2/3],[2/3],[-1/3]]) q2=matrix([[-1/3],[2/3],[2/3]]) q1.transpose()*q2==0 /* checking the condition for orthonormal vectors*/ Q=matrix([[2/3,-1/3],[2/3,2/3],[-1/3,2/3]]) Q.transpose() Q.transpose()*Q /* this results in an identity matrix*/ Q1=Q*Q.transpose() Q1 A=Q*(Q.transpose()*Q).inverse()*(Q.transpose()) /* calculating the projection matrix over the two vectors q1,q2*/ A==Q1 /*checking if Q1 itself is the projection matrix*/ }}} /* code_ends */ * '''Solution by''': * , , * , ,