gives the inverse of a square matrix m.

Details and Options

  • Inverse works on both symbolic and numerical matrices.
  • For matrices with approximate real or complex numbers, the inverse is generated to the maximum possible precision given the input. A warning is given for illconditioned matrices.
  • Inverse[m,Modulus->n] evaluates the inverse modulo n.
  • Inverse[m,ZeroTest->test] evaluates test[m[[i,j]]] to determine whether matrix elements are zero. The default setting is ZeroTest->Automatic.
  • A Method option can also be given. Settings for exact and symbolic matrices include "CofactorExpansion", "DivisionFreeRowReduction", and "OneStepRowReduction". The default setting of Automatic switches among these methods depending on the matrix given.


open allclose all

Basic Examples  (3)

Inverse of a 2×2 matrix:

Enter the matrix in a grid:

Inverse of a symbolic matrix:

Applications  (3)

Exact inverse of a Hilbert matrix:

Plot the imaginary parts of a Vandermonde matrix for a discrete Fourier transform:

Plot the inverse of a matrix, shading according to absolute value:

Show positive entries as black and others as white:

Properties & Relations  (1)

Possible Issues  (3)

The inverse may not exist:

Typically a pseudo inverse does:

Full inverses do not exist for rectangular matrices:

Accurate inverses cannot be found for ill-conditioned machine-precision numerical matrices:

Exact result:

Arbitrary-precision result:

Introduced in 1988
Updated in 1996