Previous Up Next

6.49.6  Singular value decomposition : svd

svd (singular value decomposition) a comme argument une matrice carrée numérique d’ordre n.
svd(A) renvoie U une matrice orthogonale, s la diagonale d’une matrice diagonale S, Q une matrice orthogonale (tQ*Q=I) tel que :
A=U.S.tQ.
On tape :

svd([[1,2],[3,4]])

On obtient :

[[-0.404553584834,-0.914514295677],[-0.914514295677, 0.404553584834]], [5.46498570422,0.365966190626], [[-0.576048436766,0.81741556047],[-0.81741556047, -0.576048436766]]

On tape :

(U,s,Q):=svd([[3,5],[4,5]])

On obtient :

[[-0.672988041811,-0.739653361771],[-0.739653361771, 0.672988041811]],[8.6409011028,0.578643354497], [[-0.576048436766,0.81741556047],[-0.81741556047, -0.576048436766]]

Vérifions :
On tape :

U*diag(s)*tran(Q)

On obtient :

[[3.0,5.0],[4.0,5.0]]

Previous Up Next