Click or drag to resize
SingularValueDecomposition Class
Stores the singular value decomposition of a matrix.
Inheritance Hierarchy
SystemObject
  Meta.Numerics.MatricesSingularValueDecomposition

Namespace:  Meta.Numerics.Matrices
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 3.1.0.0 (3.1.0.0)
Syntax
public sealed class SingularValueDecomposition

The SingularValueDecomposition type exposes the following members.

Properties
  NameDescription
Public propertyColumnCount
Gets the number of columns in the original matrix.
Public propertyConditionNumber
Returns the condition number of the matrix.
Public propertyDimension
Gets the number of singular values.
Public propertyRank
Computes the rank of the original matrix.
Public propertyRowCount
Gets the number of rows in the original matrix.
Public propertyTolerance
Gets or sets the tolerance with which singular values are distinguished from zero.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLeftSingularVector
Returns the specified left singular vector.
Public methodLeftTransformMatrix
Returns the left transform matrix.
Public methodRightSingularVector
Returns the specified right singular vector.
Public methodRightTransformMatrix
Returns the right transform matrix.
Public methodSingularValue
Gets the specificed singular value.
Public methodSolve
Solves the system of equations Ax = b, where A is the original, square matrix.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The singular value decomposition of a matrix represents it as a product of a left orthogonal matrix U, a quasi-diagonal Σ matrix, and a right orthogonal matrix V.

Any rectangular matrix has an SVD decomposition. The matrix need not be square. If square, it need not be invertable. The dimensions of the decomposition factors are illustrated in the following diagram.

The elements of the Σ are called the singular values of the original matrix.

Viewing A as a linear operator, the rows of VT (columns of V) form an orthonormal basis for the domain of the operator, while the columns of U form an orthonormal basis for the range of the operator. These rows and columns are called, respectively, the right and left singular vectors of the matrix.

The right singular vectors corresponding to zero singular values span the nullspace of A, that is the set of all x for which Ax = 0. The left singular vectors corresponding to non-zero singular values span the range of A, that is the space into which all Ax fall; the left singular vectors corresponding to zero singular values span the complementary space into which no Ax fall. The total number of non-zero singular values is the rank of A.

The SVD can be used to approximate the action of a high-dimensional matrix operator by a lower-rank one. By keeping only the largest singular values and setting the remaining ones to zero, one obtains a operator that can applied with fewer operations and approximates the properties of the original operator.

Notice that elements in the last columns of U do not contribute to A since they will be multiplied with elements of zero rows of Σ. Many applications use a "thin" or "reduced" form of the SVD, in which the last columns of U and the last rows of Σ are omitted; this makes U not square (and therefore not orthogonal) and Σ square (and diagonal). Since the remaining elements are the same, you can obtain the thin SVD from this object by simply ignoring the irrelevent elements.

Use the SingularValueDecomposition of the RectangularMatrix class to obtain the SVD of an rectangular matrix, or the corresponding SingularValueDecomposition method of the SquareMatrix class to obtain the SVD of a square matrix.

See Also