Matrix Inverse Calculator

The Matrix Equivalent of Division

Ordinary numbers have reciprocals; square matrices have inverses, and they play the same role — a matrix multiplied by its own inverse yields the identity matrix, the matrix world's version of the number 1. Not every matrix has one: a matrix is invertible only when its determinant is non-zero.

The Formulas

2×2: A-1 = (1/det(A)) × [[d, −b], [−c, a]]
3×3: A-1 = (1/det(A)) × adj(A)

Worked Example

For matrix A = [4, 7; 2, 6]:

2x2 matrix inverse, step by step
StepCalculationResult
det(A)(4×6) − (7×2)10
Inverse(1/10) × [[6, −7], [−2, 4]][[0.6, −0.7], [−0.2, 0.4]]

Where This Matters

  • Solving linear systems as Ax = b — multiplying both sides by A-1 isolates x directly, an approach used throughout engineering and computer graphics.
  • Coordinate transformations — reversing a rotation, scaling, or shear transformation applies the inverse of the original transformation matrix.
  • Statistics and regression — least-squares regression coefficients are computed using a matrix inverse (or a numerically stable equivalent).
Note: If the determinant is zero, the matrix is singular and has no inverse — this calculator will flag that case rather than divide by zero.

How to Use This Calculator

  1. Choose the matrix size: 2 x 2 Matrix or 3 x 3 Matrix.
  2. Enter each cell value (row1 col1, row1 col2, and so on).
  3. Select Calculate to get the inverse matrix.

Related Calculations

Check invertibility first with the Matrix Determinant Calculator, or multiply matrices together with the Matrix Multiplication Calculator.

Principles of Matrix Inversion and Invertibility Criteria

In linear algebra, the inverse of a square n×n matrix A — denoted as A-1 — is the unique matrix that, when multiplied with matrix A (in either order), yields the n×n multiplicative Identity Matrix (In):

A × A-1 = A-1 × A = In

Matrix inversion functions as the matrix equivalent of scalar division, allowing engineers to solve matrix equations (A × x = b &implies; x = A-1 × b).

The Invertible Matrix Theorem (Non-Singular Matrices)

A square matrix A possesses a unique inverse if and only if it is non-singular, which requires:

  • The determinant is non-zero: det(A) ≠ 0.
  • The matrix rank equals n (full rank, all columns are linearly independent).
  • Zero is not an eigenvalue of A.

Analytical Inversion: The Adjugate Matrix Formula

For any invertible square matrix A, the inverse is formulated as the transpose of the cofactor matrix (the Adjugate matrix, adj(A)) divided by the scalar determinant:

A-1 = (1 / det(A)) × adj(A) = (1 / det(A)) × CT

For a 2×2 matrix [ [a, b], [c, d] ]:

A-1 = (1 / (ad - bc)) × [ [d, -b], [-c, a] ]

Step-by-Step Worked Calculation Example

Example: Calculating the Inverse of a 2x2 Coordinate Transformation Matrix

Problem: Find the inverse of matrix A = [ [4, 7], [2, 6] ] and verify that A × A-1 = I.

Step 1: Calculate the determinant det(A):

det(A) = (4 × 6) - (7 × 2) = 24 - 14 = 10 (det ≠ 0 &implies; invertible)

Step 2: Construct the adjugate matrix (swap diagonals, negate off-diagonals):

adj(A) = [ [6, -7], [-2, 4] ]

Step 3: Multiply by scalar 1/det(A):

A-1 = (1 / 10) × [ [6, -7], [-2, 4] ] = [ [0.6, -0.7], [-0.2, 0.4] ]

Step 4: Verify identity matrix multiplication:

(4)(0.6) + (7)(-0.2) = 2.4 - 1.4 = 1.0

(4)(-0.7) + (7)(0.4) = -2.8 + 2.8 = 0.0

(2)(0.6) + (6)(-0.2) = 1.2 - 1.2 = 0.0

(2)(-0.7) + (6)(0.4) = -1.4 + 2.4 = 1.0

Conclusion: A-1 = [ [0.6, -0.7], [-0.2, 0.4] ], confirming A × A-1 = [ [1, 0], [0, 1] ].

Condition Number and Ill-Conditioned Systems

In finite element analysis (FEA) and structural engineering, numerical stability is measured by the Matrix Condition Number: κ(A) = ||A|| × ||A-1||. If κ(A) is very large (>106), the matrix is "ill-conditioned," meaning tiny floating-point input perturbations cause massive errors in calculated inverses.

The Moore-Penrose Pseudoinverse for Non-Square Matrices

When a matrix A is rectangular (m×n with m ≠ n) or singular (det(A) = 0), a classical two-sided inverse does not exist. Applied mathematicians and machine learning researchers utilize the Moore-Penrose Pseudoinverse (A+):

Overdetermined (Tall) Matrix (m > n, Full Column Rank): A+ = (AT × A)-1 × AT
Underdetermined (Wide) Matrix (m < n, Full Row Rank): A+ = AT × (A × AT)-1

In Ordinary Least Squares (OLS) linear regression, the optimal parameter weight vector that minimizes sum-of-squared-errors is computed directly via the pseudoinverse: w = A+ × y = (ATA)-1ATy.

The Sherman-Morrison-Woodbury Inversion Formula

In numerical optimization and recursive online machine learning (such as Recursive Least Squares filters), when a matrix undergoes a rank-1 update (A + u × vT), the new inverse is computed in O(n²) operations without inverting from scratch:

(A + u vT)-1 = A-1 - [ (A-1 u vT A-1) / (1 + vT A-1 u) ]

Iterative Matrix Inversion: The Newton-Schulz Algorithm

In high-performance GPU computing and distributed parallel linear algebra, computing matrix inverses via Gaussian elimination involves serial pivoting bottlenecks. Numerical engineers implement the Newton-Schulz Iterative Algorithm, which solves for A-1 using only highly parallelizable matrix multiplications:

Xk+1 = Xk × ( 2 × In - A × Xk )

Starting from a scaled initial guess X0 = AT / (||A||1 × ||A||), the sequence converges quadratically to A-1, doubling the number of correct decimal precision digits with each iteration.

Orthogonal Matrices: Inversion via Transposition

For an Orthogonal Matrix Q (whose column vectors form an orthonormal basis, such as 3D rotation matrices):

Q-1 = QT  &implies;  Q × QT = In

Inverting 3D coordinate rotation matrices in computer graphics requires zero floating-point division; simply swapping rows and columns computes the exact inverse rotation matrix instantaneously.

Block Matrix Inversion Formula (Schur Complement)

In partitioned structural mechanics and state-space control systems, large 2×2 block matrices are inverted using the Schur Complement (S = D - C A-1 B):

[ [A, B], [C, D] ]-1 = [ [ A-1 + A-1 B S-1 C A-1,   -A-1 B S-1 ], [ -S-1 C A-1,   S-1 ] ]

This block-wise inversion formula allows engineering solvers to invert massive thousand-node finite element matrices in parallel by decomposing systems into localized sub-domain substructures.

Tikhonov Regularization (Ridge Regression Inversion)

When inverting ill-conditioned or rank-deficient matrices in real-world sensor inverse problems (such as seismic geophysical imaging and tomographic deconvolution), direct inversion explodes measurement noise. Engineers apply Tikhonov Regularization, adding a positive damping diagonal matrix (Γ = λ I) prior to inversion:

Areg-1 = (AT A + λ2 I)-1 AT

This regularized inversion stabilizes the matrix condition number, producing smooth, physically realistic inverse solutions.

Cayley-Hamilton Theorem for Analytical Matrix Inversion

The Cayley-Hamilton Theorem establishes that every square matrix A satisfies its own characteristic polynomial: p(A) = An + cn-1An-1 + … + c1A + (-1)n det(A) I = 0. Multiplying this equation by A-1 allows engineers to express the matrix inverse as an explicit polynomial sum of positive matrix powers:

A-1 = [ -1 / ((-1)n det(A)) ] × [ An-1 + cn-1An-2 + … + c1I ]

Symplectic Matrix Inversion

In Hamiltonian mechanics and symplectic geometry, the inverse of a 2n×2n symplectic matrix M satisfies M-1 = -J MT J, preserving phase-space volume in celestial orbital integrations.