Reference Guide > I–L Routines > INVERSE Function
  

INVERSE Function
Inverts matrices stored as a list of lists of arrays.
Usage
v = INVERSE(m)
Input Parameters
m—A p-element list of p-element lists of n-dimensional arrays all of the same dimensions di (i = 0 ... n–1): (m(j)) (k) is the jk component of a matrix function defined on n-space. Such matrix representations occur naturally as Jacobians of functions represented by arrays (see the JACOBIAN Function).
Returned Value
v—A p-element list of p-element lists of n-dimensional arrays all of the same dimensions di (i = 0 ... n–1): (v(j)) (k) is the jk component of the matrix function which is the matrix inverse of the matrix function m.
Keywords
None.
Discussion
Refer to the discussion sections of the JACOBIAN Function and the DERIVN Function.
Example
seed = 0
r = RANDOMU(seed,40,80,4)
m = LIST( LIST(r(*,*,0),r(*,*,1)), LIST(r(*,*,2),r(*,*,3)) )
v = INVERSE(m)
; Visually verify that at each point of !P.multi = [0,2,2]
; the space, v is the matrix inverse of m.
WINDOW, Xsize=700, Ysize=700
SHADE_SURF, m(0,0)*v(0,0)+m(0,1)*v(1,0), Title='iden(0,0)', $
   Charsize=2
SHADE_SURF, m(0,0)*v(0,1)+m(0,1)*v(1,1), Title='iden(0,1)', $
   Charsize=2
SHADE_SURF, m(1,0)*v(0,0)+m(1,1)*v(1,0), Title='iden(1,0)', $
   Charsize=2
SHADE_SURF, m(1,0)*v(0,1)+m(1,1)*v(1,1), Title='iden(1,1)', $
   Charsize=2
See also the discussion sections for DERIVN and JACOBIAN.
See Also
JACOBIAN, DERIVN

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.