Matrix::SVD Method

Overload List

#SignatureDescription
1TMtx *SVD(TVec *S) const;Singular value decomposition.
2TMtx *SVD(TMtx *U, TVec *S, TMtx *V, bool MinSize = true) const;Matrix version of SVD. Perfroms a SVD for each U and V matrices columns in single pass.

Overload 1: TMtx *SVD(TVec *S) const;

Singular value decomposition.

#NameTypeDescription
1STVec *
Remarks:

Performs a singular value decomposition on a calling matrix (A). U or V can be nil, if not desired. If you do not want economy size U and V set MinSize to False. The singular value decomposition (SVD) of the calling matrix (A, with m rows and n cols) is defined by the following equation:

A=USVHA=U S V^{H}

where U and V are unitay (for complex A) or orthogonal (for real A). S is a diagonal matrix with real diagonal elements is:

σ1σ2σmin(mn)0\sigma_1 \geq \sigma_2 \geq \dots \geq \sigma_{\min{(mn)}} \geq 0

The diagonal elements are singular values of A (calling matrix). The first min(m, n) columns of the matrices U and V are, respectively, left and right singular vectors of calling matrix (A). The singular values and singular vectors satisfy:

Avi=σiuiandAHui=σiviA v_i = \sigma _i u_i \quad \text{and} \quad A^H u_i = \sigma _i v_i

where ui and vi are the i-th columns of U and V, respectively. One interpretation of the singular values is as follows. If you take a unit sphere in n-dimensional space, and multiply each vector in it by an m x n matrix , you will get an ellipsoid in m-dimensional space. The singular values give the lengths of the principal axes of the ellipsoid. If the matrix is singular in some way, this will be reflected in the shape of the ellipsoid. In fact, the ratio of the largest singular value of a matrix to the smallest one gives a Matrix::ConditionNr of the matrix, which determines, for example, the accuracy of numerical matrix inverses. Very small singular values are usually numerically meaningless.

See Also: Matrix::SVDSolve, Matrix::ConditionNr
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 2: TMtx *SVD(TMtx *U, TVec *S, TMtx *V, bool MinSize = true) const;

Matrix version of SVD. Perfroms a SVD for each U and V matrices columns in single pass.

#NameTypeDescription
1UTMtx *
2STVec *
3VTMtx *
4MinSize = truebool
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler