Ch8-problem15-new-이기연

1846 days ago by matrix

A=matrix(2,2, [1/2,-1/2,1/2,1/2]) B=matrix(3,2,[1/sqrt(7),0,0,3,0,0]) C=matrix(3,3, [1/sqrt(3),2/sqrt(3),1/sqrt(3),1/sqrt(3),0,-1/sqrt(3),1/sqrt(3),-1/sqrt(3),1/sqrt(3)]) D=matrix(2,3,[sqrt(7),0,0,0,3,0]) E=A.transpose() F=C.transpose() R= (F*B*E).apply_map(lambda x: x.simplify_full()) #pseudo-inverse A= A*D*C #original matrix print R print (R*A*R).apply_map(lambda x: x.simplify_full()) 
       
[-1/42*(3*sqrt(7) - 1)*sqrt(3)*sqrt(7)  1/42*(3*sqrt(7) +
1)*sqrt(3)*sqrt(7)]
[                 1/21*sqrt(3)*sqrt(7)                 
1/21*sqrt(3)*sqrt(7)]
[ 1/42*(3*sqrt(7) + 1)*sqrt(3)*sqrt(7) -1/42*(3*sqrt(7) -
1)*sqrt(3)*sqrt(7)]
[-1/42*(9*sqrt(7) - 1)*sqrt(3)*sqrt(7)  1/42*(9*sqrt(7) +
1)*sqrt(3)*sqrt(7)]
[                 1/21*sqrt(3)*sqrt(7)                 
1/21*sqrt(3)*sqrt(7)]
[ 1/42*(9*sqrt(7) + 1)*sqrt(3)*sqrt(7) -1/42*(9*sqrt(7) -
1)*sqrt(3)*sqrt(7)]
[-1/42*(3*sqrt(7) - 1)*sqrt(3)*sqrt(7)  1/42*(3*sqrt(7) + 1)*sqrt(3)*sqrt(7)]
[                 1/21*sqrt(3)*sqrt(7)                  1/21*sqrt(3)*sqrt(7)]
[ 1/42*(3*sqrt(7) + 1)*sqrt(3)*sqrt(7) -1/42*(3*sqrt(7) - 1)*sqrt(3)*sqrt(7)]
[-1/42*(9*sqrt(7) - 1)*sqrt(3)*sqrt(7)  1/42*(9*sqrt(7) + 1)*sqrt(3)*sqrt(7)]
[                 1/21*sqrt(3)*sqrt(7)                  1/21*sqrt(3)*sqrt(7)]
[ 1/42*(9*sqrt(7) + 1)*sqrt(3)*sqrt(7) -1/42*(9*sqrt(7) - 1)*sqrt(3)*sqrt(7)]