Macaulay2 » Documentation
Packages » Macaulay2Doc » matrices » Matrix » inverse(Matrix)
next | previous | forward | backward | up | index | toc

inverse(Matrix) -- compute the inverse

Code

../../../../Macaulay2/m2/methods.m2:693:25-693:88: --source code:
cacheValue = key -> f -> x -> ( try x.cache else x.cache = new CacheTable )#key ??= f(x)
| symbol  class            value                                                    location of symbol
| ------  -----            -----                                                    ------------------                               
| f       FunctionClosure  FunctionClosure[../../../../Macaulay2/m2/matrix1.m2:63.  ../../../../Macaulay2/m2/methods.m2:693:20-693:21
| key     Symbol           inverse                                                  ../../../../Macaulay2/m2/methods.m2:693:13-693:16
| -- function f:
| ../../../../Macaulay2/m2/matrix1.m2:631:5-637:19: --source code:
|      m -> (
|       if hasEngineLinearAlgebra ring m and isBasicMatrix m then
|           basicInverse m
|       else (
|               (quo,rem) := quotientRemainder(id_(target m), m);
|               if rem != 0 then error "matrix not invertible";
|               quo))

Menu

Ways to use this method:

  • inverse(Matrix) -- compute the inverse
  • inverse(MutableMatrix)
  • inverse(RingMap)

The source of this document is in Macaulay2Doc/functions/inverse-doc.m2:27:0.