LinearOperator<T>.GetInverse Method

Definition

Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

GetInverse() Calculates the inverse matrix..
GetInverse(Boolean) Calculates the inverse of the factorized matrix.

GetInverse

Calculates the inverse matrix..
C#
public Matrix<T> GetInverse()

Return Value

Matrix<T>
A DenseMatrix<T> that is the matrix inverse of this instance.

Exceptions

MatrixSingularException

The linear transformation is singular and does not have an inverse.

DimensionMismatchException

The Matrix<T> of the linear transformation is not square.

GetInverse(Boolean)

Calculates the inverse of the factorized matrix.
C#
public virtual Matrix<T> GetInverse(
	bool overwrite
)

Parameters

overwrite  Boolean
If false, the inverse matrix is returned as a new instance. If true, the decomposition is overwritten with the solution. In this case, the decomposition is no longer valid after the call to this method.

Return Value

Matrix<T>

Remarks

The inverse of a matrix is the matrix that, when multiplied by the original matrix, gives an identity matrix.

If the matrix is singular, its inverse does not exist and a MatrixSingularException is thrown.

The inverse is only defined for a square matrix. If the matrix is not square, an exception of type DimensionMismatchException is thrown.

Exceptions

DimensionMismatchException

The matrix is not square.

MatrixSingularException

The matrix is singular.

See Also