Inverse
Inverse[m]
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 ill‐conditioned 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.
Examples
open allclose allBasic Examples (3)
Scope (14)
Basic Uses (9)
Find the inverse of a machine-precision matrix:
Inverse of an arbitrary-precision matrix:
Verifying a symbolic inverse may require simplification:
The inversion of large machine-precision matrices is efficient:
Inverse of a matrix over a finite field:
Inverse of a CenteredInterval matrix:
Find a random representative mrep of m:
Verify that minv contains the inverse of mrep:
TraditionalForm formatting:
Special Matrices (5)
The inverse of a sparse matrix is returned as a normal matrix:
When possible, the inverse of a structured matrix is returned as another structured matrix:
IdentityMatrix is its own inverse:
Inverse of HilbertMatrix:
Visualize the inverses for several matrix sizes:
Compute the inverse of a matrix of univariate polynomials of degree :
Options (2)
Modulus (1)
Applications (10)
Solving Equations (4)
Solve the system of equations , , . First, form the coefficient matrix and constant vector :
Substitute the solution into the original system of equations to verify the solution:
Multiplying both sides of the equation on the left by shows :
Confirm the result using LinearSolve:
For numerical and especially sparse systems, LinearSolve can be considerably faster:
Multiplying both sides of the equation on the left by shows :
Substitute the solution into the equation for verification:
Solve the system of ODEs , , . First, construct the coefficient matrix for the right-hand side:
Find the eigenvalues and eigenvectors:
Construct a diagonal matrix whose entries are the exponential of :
Construct the matrix whose columns are the corresponding eigenvectors:
The general solution is , for three arbitrary starting values:
Verify the solution using DSolveValue:
Change of Basis/Coordinates (6)
Express a general vector in as a linear combination of the vectors , and . First, verify the vectors are linearly independent by checking that their null space is empty:
Form the matrix whose columns are the basis vectors:
The coefficients of a general vector are given by :
Verify that does indeed equal the linear combination :
Find the change-of-basis matrix that transforms coordinates with respect to the basis to coordinates with respect to the basis :
The matrix whose columns are the transforms from -coordinates to standard coordinates:
The matrix whose columns are the transforms from -coordinates to standard coordinates:
Its inverse converts from standard coordinates back to -coordinates:
Therefore, converts from -coordinates to -coordinates:
Express the linear operator whose representation in the standard is given by in the basis , ,
The matrix whose columns are the transforms from -coordinates to standard coordinates:
Its inverse converts from standard coordinates to -coordinates:
Therefore the representation of in -coordinates is:
Inverse can be used to diagonalize a matrix as . Compute 's eigenvalues and eigenvectors:
Construct a diagonal matrix from the eigenvalues and a matrix whose columns are the eigenvectors:
Any function of the matrix can now be computed as . For example, MatrixPower:
Similarly, MatrixExp becomes trivial, requiring only exponentiating the diagonal elements of :
Inverse of a transformation matrix gives the matrix for the reverse operation. For example, consider a translation by :
The inverse of its transformation matrix gives a translation by the opposite motion:
Consider a general affine transformation:
Construct the inverse transformation:
Verify that the two transformations really do undo each other:
For a mapping , the Jacobian of the inverse mapping is given by . Consider the mapping from Cartesian to spherical coordinates:
Compute the Jacobian at the point :
The inverse mapping is the transformation from spherical back to Cartesian coordinates:
Compute the Jacobian of the inverse mapping at the coordinates corresponding to :
Properties & Relations (13)
Inverse satisfies the relation for an matrix :
Inverse satisfies the relation :
Inverse satisfies the relation :
A square matrix has an inverse if and only if its determinant is nonzero:
Moreover, determinant of the inverse equals :
MatrixPower[m,-1] equals Inverse[m]:
For an invertible matrix , Inverse[a] equals Adjugate[a]/Det[a]:
Inverse[m] equals LinearSolve[m,IdentityMatrix[n]] for an invertible n×n matrix:
The inverse of an orthogonal matrix is given by Transpose:
The inverse of a unitary matrix is given by ConjugateTranspose:
A matrix and its inverse have the same symmetry:
A QuantityArray and its inverse have reciprocal units:
For an invertible matrix , Inverse[a] and PseudoInverse[a] coincide:
PseudoInverse extends to singular as well as rectangular matrices:
For an invertible matrix , Inverse[a] and DrazinInverse[a] coincide:
DrazinInverse extends to singular square matrices:
Possible Issues (3)
Typically a pseudo inverse does:
Full inverses do not exist for rectangular matrices:
Use PseudoInverse instead:
Accurate inverses cannot be found for ill-conditioned machine-precision numerical matrices:
Text
Wolfram Research (1988), Inverse, Wolfram Language function, https://reference.wolfram.com/language/ref/Inverse.html (updated 2024).
CMS
Wolfram Language. 1988. "Inverse." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Inverse.html.
APA
Wolfram Language. (1988). Inverse. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Inverse.html