inv
Returns the inverse of a matrix.
Signatures
- inv( matrix a )
Details
Calculates and returns the inverse of a matrix a.
Example
matrix m1 = <[<[ 2.0, 0.0, 0.0, 1.0 ]>,
<[ 0.0, 2.0, 0.0, 0.0 ]>,
<[ 0.0, 0.0, 2.0, 0.0 ]>]>
echo( inv( m1 ) )
echo ( inv(m1) * m1)
Output
<[<[0.5,0,0,-0.5]>,<[0,0.5,0,-0]>,<[0,0,0.5,-0]>]>
<[<[1,0,0]>,<[0,1,0]>,<[0,0,1]>]>
Return value
The inverse matrix of a .
Parameters
- a
-
Matrix the inverse is returned of.