Matrix Inverse Block

Matrix Inverse Block

The Matrix Inverse block emits the vector solution to the invertible matrix problem for an input matrix (2d vector). The input must square (rows == columns).

The second outport of the block emits True if the input was successfully inverted, False otherwise.

Parameters

  • Method [Inverse | SVD ]
    • Inverse: Emits the matrix inversion of the input, if it is indeed invertible.
    • SVD: Emits the Singular Value Decomposition Pseudoinverse of the input matrix. This is an iterative, least-square approximate solution. Although more computationally intensive, it better handles over-determined input, rank deficient input, and is more numerically stable. For more details on Rust implementation, check out NAlgebra's documentation, or view the source code here.

Examples

Matrix inverse example
Inverting a square 2x2 matrix using the default Inverse method
Matrix inverse SVD example
Inverting a square 2x2 matrix using the SVD method, which solves the non-invertible example matrix. The Is Valid outport shows the SVD solution marked valid, while the normal inverse solution is invalid.