svd INDEX

SVD _ _ _ _ _ _ _ _ _ _ _ _ operator

Singular value decomposition:

syntax:

svd(<matrix>)

<matrix> :- a matrix containing only numeric entries.

svdcomputes the singular value decomposition of <matrix>.

It returns

{U,P,V}

where A = U*P*V^T

and P = diag(sigma(1) ... sigma(n)).

sigma(i) for i= 1 ... n are the singular values of <matrix>.

n is the column dimension of <matrix>.

The singular values of <matrix> are the non-negative square roots of the eigenvalues of A^T*A.

U and V are such that U*U^T = V*V^T = V^T*V = Id. Id is the identity matrix.

examples:



Q := mat((1,3),(-4,3)); 

       [1   3]
  q := [     ]
       [-4  3]



on rounded; 

svd(Q); 

  {
   [ 0.289784137735    0.957092029805]
   [                                 ]
   [ - 0.957092029805  0.289784137735]
   ,
   [5.1491628629       0      ]
   [                          ]
   [     0        2.9130948854]
   ,
   [ - 0.687215403194   0.726453707825  ]
   [                                    ]
   [ - 0.726453707825   - 0.687215403194]
  }