Qu

inv

Builtin index · Core maths

result = inv(A)

Input: A · Output: result

What it is

True inverse of A (a square Mat or CMat); requires full rank, errors otherwise.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = inv(A)
A Mat or CMatnot documented yet
result matrix
Returns an n×n matrix of the same real/complex kind as A.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

A = [4, 7; 2, 6]
print("A*inv(A) = {A * inv(A)}")
output
A*inv(A) = [1, -1.221245e-15; 0, 1]

from numerics-dsp

How it works

inv(M) == M^-1: the true inverse, requiring square + full rank.

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.