SingularValueDecompositionSolve Method

Solves the system of equations Ax = b, where A is the original, square matrix.

Definition

Namespace: Meta.Numerics.Matrices
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public ColumnVector Solve(
	IReadOnlyList<double> rhs
)

Parameters

rhs  IReadOnlyListDouble
The right-hand-side vector b.

Return Value

ColumnVector
The solution vector x.

Remarks

For singular and nearly-singular matrices, this method operates differently than other solution methods like Solve(IReadOnlyListDouble) and Solve(IReadOnlyListDouble). For singular and nearly-singular matrices, those methods tend to produce very large or even infinite solution components that delicately cancel to produce the required right-hand-side, but have little significance to the problem being modeled because they arise from inverting very small singular values of the original matrix that are dominated by floating point rounding errors. The SVD solution discards those singular values to obtain a solution vector driven by the dominant, non-singular parts of A. While this solution does not have the minimum achievable |Ax - b|, it is often more representative of the desired solution to the problem being modeled.

For original matrices that are not singular or nearly-singular, this method will compute the same solution as other methods.

This method is only available for square original matrices.

Exceptions

ArgumentNullExceptionrhs is null.
DimensionMismatchExceptionrhs does not have the same dimension as the original matrix.
InvalidOperationExceptionThe original matrix is not square.

See Also