Contents Previous Next Subchapters

Inverting A Square Matrix
Syntax inv(x)
See Also \ eigen , svd , qred

Description
Returns the inverse of the matrix x, where x is a square real, double-precision, or complex matrix. The return value has the same type and dimension as x.

Example
     x = {[2., 1.], [1., 1.]}
     inv(x)
returns
     {
     [ 1 , -1 ]
     [ -1 , 2 ]
     }

Algorithm
This function first forms a LU factorization of the matrix x and then solves for the inverse.