# inv

Version:

Computes the inverse of a square matrix.

## Syntax

c = inv(a)

## a

Square matrix. If a is singular, or has a determinant of zero, MathScript returns an error. If the reciprocal of the infinity norm of a is less than sqrt(eps), MathScript generates a warning because the inverse might be inaccurate. Consider checking the value of the inverse using inv(a)*a.

## c

Inverse of a. c is a square matrix.

## Matrices within larger Expressions

Use the / and \ operators if you multiply a matrix inverse by another matrix within larger expressions. For example, use A\B instead of inv(A)*B and use B/A instead of B*inv(A).

D = [3, 2, -1; 1, 6, 3; 2, -4, 0]
D_INV = inv(D)
RESULT = D*D_INV

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported