inverse
Matrix inversion function.
Syntax
inverse(mat_expr)
Argument
- mat_expr
- A valid square matrix expression.
Example
Templex Expression | Result |
---|---|
{inverse( { {1, 2}, {2, 1} } )} |
{-0.3333, 0.6667}, {0.6667, -0.3333} |
Comments
The inverse function returns the inverse of a square matrix. The inverse of a matrix is a matrix, that when multiplied by the original, produces the identity matrix. That is:
AB = BA = I
where A is a square matrix, B is the inverse of A, and I is the identity matrix.
If the matrix is invertible, the result is a matrix which is the inverse of mat_expr. The result will have the same dimensions as mat_expr. If the matrix is singular, an error occurs.
The inverse matrix is computed by using the LU decomposition method.