Book A Free Math Class

# Inverse of a Matrix — Definition & Formula

[Algebra](/content/tag/algebra/index.html)

TL;DR

The inverse of a matrix AAA is the square matrix A−1A^{-1}A−1 satisfying AA−1=A−1A=IAA^{-1} = A^{-1}A = IAA−1=A−1A=I, and it exists only when AAA is square with a non-zero determinant. This article covers what an inverse really is, the fast 2x2 formula, the adjugate-over-determinant method for any size, the invertibility condition, and six worked examples.

BT

Bhanzu Team Last updated on June 10, 2026 9 min read

## What Is the Inverse of a Matrix?

The **inverse of a matrix** AAA is the unique matrix A−1A^{-1}A−1 such that

AA−1=A−1A=I,AA^{-1} = A^{-1} A = I,AA−1=A−1A=I,

where III is the identity matrix of the same order. Multiplying AAA by A−1A^{-1}A−1 in either order returns the identity — the matrix that leaves every vector unchanged, exactly as multiplying a number by 1 leaves it unchanged.

Two conditions must hold for an inverse to exist. First, AAA must be **square** — same number of rows and columns — because only square matrices can map a space back onto itself. Second, its **determinant must be non-zero**. A square matrix with a non-zero determinant is [invertible (non-singular)](/content/math/algebra/invertible-matrix/index.html); one whose determinant is zero is a [singular matrix](/content/math/algebra/singular-matrix/index.html) and has no inverse. When the inverse exists, it is unique — a matrix never has two different inverses.

## What Is the Inverse of a Matrix Formula?

There is one general formula, and one fast shortcut for the 2x2 case.

**The general (adjugate) formula** works for any invertible square matrix:

A−1=1det⁡A,adj(A),A^{-1} = \frac{1}{\det A},\text{adj}(A),A−1=detA1​,adj(A),

where det⁡A\det AdetA is the determinant and adj(A)\text{adj}(A)adj(A) is the **adjugate** — the transpose of the [cofactor matrix](/content/math/algebra/cofactor-matrix/index.html). The cofactor of each entry is the determinant of the smaller matrix left after deleting that entry's row and column, signed by the checkerboard pattern (−1)i+j(-1)^{i+j}(−1)i+j.

**The 2x2 shortcut** is worth memorising because it appears everywhere. For

A=\[abcd\], A−1=1ad−bc\[d−b−ca\].A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \qquad A^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}.A=\[a​bc​d​\],A−1=ad−bc1​\[d​−b−c​a​\].

Swap the diagonal entries, negate the off-diagonal entries, and divide by the determinant ad−bcad - bcad−bc. The [full 2x2 derivation and more practice](/content/math/algebra/inverse-of-2x2-matrix/index.html) lives in its own article; for the 3x3 case, where the cofactor work gets heavier, see the [inverse of a 3x3 matrix](/content/math/algebra/inverse-of-3x3-matrix/index.html) walkthrough.

## How Do You Find the Inverse of a Matrix?

Two methods dominate, and which one you choose depends on the size.

**Adjugate method** — best for 2x2 and 3x3 by hand:

1. Compute det⁡A\det AdetA. If it is zero, stop — no inverse.
2. Build the cofactor matrix, signing each minor by (−1)i+j(-1)^{i+j}(−1)i+j.
3. Transpose it to get the adjugate.
4. Divide every entry by det⁡A\det AdetA.

**Elementary row operations (Gauss-Jordan)** — best for larger matrices: augment AAA with the identity to form \[A∣I\]\[A \mid I\]\[A∣I\], then row-reduce until the left block becomes III. Whatever the right block becomes is A−1A^{-1}A−1:

\[,A∣I,\];⟶;\[,I∣A−1,\].\[,A \mid I,\] ;\longrightarrow; \[,I \mid A^{-1},\].\[,A∣I,\];⟶;\[,I∣A−1,\].

If the left block can never reach III, the matrix is singular. Both methods give the same answer when an inverse exists — they are different routes to the same unique matrix.

## What Are the Properties of the Inverse of a Matrix?

A short list of rules lets you rearrange inverse expressions without recomputing from scratch:

- **The inverse is unique.** A matrix has at most one inverse.
- **Inverse of an inverse:**(A−1)−1=A(A^{-1})^{-1} = A(A^{-1})^{-1}=A. Undoing the undo returns the original.
- **Product rule (note the reversed order):**(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}(AB)−1=B−1A^{-1}. The order flips — like taking off shoes then socks in reverse.
- **Transpose rule:**(AT)−1=(A−1)T(A^T)^{-1} = (A^{-1})^T(AT)^{-1}=(A^{-1})^T.
- **Determinant of the inverse:** det⁡(A−1)=1det⁡A\det(A^{-1}) = \dfrac{1}{\det A}det(A−1)=detA1​.
- **Scalar multiple:**(kA)−1=1kA−1(kA)^{-1} = \dfrac{1}{k}A^{-1}(kA)^{-1}=k1​A^{-1} for any non-zero scalar kkk.

The reversed order in the product rule is the one most worth remembering — it trips up nearly everyone the first time.

## Examples of Inverse of a Matrix

The set runs from a clean 2x2, through the most common sign mistake, to a singular matrix that has no inverse, a system solved by inversion, the product rule in action, and a verification check.

### Example 1

**Find the inverse of A=\[4726\]A = \begin{bmatrix} 4 & 7 \\ 2 & 6 \end{bmatrix}A=\[4​72​6​\].**

Determinant: det⁡A=(4)(6)−(7)(2)=24−14=10\det A = (4)(6) - (7)(2) = 24 - 14 = 10detA=(4)(6)−(7)(2)=24−14=10. Apply the 2x2 shortcut — swap the diagonal, negate the off-diagonal, divide by 10:

A−1=110\[6−7−24\]=\[0.6−0.7−0.20.4\].A^{-1} = \frac{1}{10}\begin{bmatrix} 6 & -7 \\ -2 & 4 \end{bmatrix} = \begin{bmatrix} 0.6 & -0.7 \\ -0.2 & 0.4 \end{bmatrix}.A−1=101​\[6​−7−2​4​\]=\[0.6​−0.7−0.2​0.4​\].

**Final answer:** the matrix above. Check: AA−1A A^{-1}AA−1 should return the identity, and it does.

### Example 2

**A common slip — find the inverse of A=\[3512\]A = \begin{bmatrix} 3 & 5 \\ 1 & 2 \end{bmatrix}A=\[3​51​2​\].**

_Wrong attempt._ A student computes det⁡A=(3)(2)−(5)(1)=1\det A = (3)(2) - (5)(1) = 1detA=(3)(2)−(5)(1)=1, then writes the inverse by swapping the diagonal but forgetting to negate the off-diagonal entries: \[2513\]\begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix}\[2​51​3​\]. It looks like the right shape.

Test it. Multiply by AAA: the off-diagonal terms come out non-zero, so the product is not the identity. The shortcut is not just "swap" — the two off-diagonal entries must change sign.

_Correct._ Swap the diagonal _and_ negate the off-diagonal:

A−1=11\[2−5−13\].A^{-1} = \frac{1}{1}\begin{bmatrix} 2 & -5 \\ -1 & 3 \end{bmatrix}.A−1=11​\[2​−5−1​3​\].

**Final answer:**\[2−5−13\]\begin{bmatrix} 2 & -5 \\ -1 & 3 \end{bmatrix}\[2​−5−1​3​\]. The negation is the half of the shortcut that gets skipped most.

### Example 3

**Does A=\[2436\]A = \begin{bmatrix} 2 & 4 \\ 3 & 6 \end{bmatrix}A=\[2​43​6​\] have an inverse?**

Compute the determinant: det⁡A=(2)(6)−(4)(3)=12−12=0\det A = (2)(6) - (4)(3) = 12 - 12 = 0detA=(2)(6)−(4)(3)=12−12=0. A zero determinant means the matrix is singular.

**Final answer:** no inverse exists. The second row is 1.51.51.5 times the first — the rows are linearly dependent, which is what a zero determinant detects.

### Example 4

**Solve ;2x+y=5,;x+3y=10;;2x + y = 5,; x + 3y = 10;;2x+y=5,;x+3y=10; using the inverse.**

Write as Ax=bA\mathbf{x} = \mathbf{b}Ax=b with A=\[2113\]A = \begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}A=\[2​11​3​\] and b=(5,10)T\mathbf{b} = (5, 10)^Tb=(5,10)T. Determinant =6−1=5= 6 - 1 = 5=6−1=5, so

A−1=15\[3−1−12\],x=A−1b=15\[15−10−5+20\]=\[13\].A^{-1} = \frac{1}{5}\begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}, \qquad \mathbf{x} = A^{-1}\mathbf{b} = \frac{1}{5}\begin{bmatrix} 15 - 10 \\ -5 + 20 \end{bmatrix} = \begin{bmatrix} 1 \\ 3 \end{bmatrix}.A^{-1}=51​\[3​−1−1​2​	ext{and}]=A=7.

**Final answer:** x=1,;y=3x = 1,; y = 3x=1,;y=3. The inverse turns "solve the system" into a single multiplication.

### Example 5

**Verify the product rule (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}(AB)−1=B−1A^{-1} for A=\[1021\]A = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix}A=\[1​02​1​\], B=\[1301\]B = \begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix}B=\[1​30​1​\].**

Both are triangular with determinant 1, so A−1=\[10−21\]A^{-1} = \begin{bmatrix} 1 & 0 \\ -2 & 1 \end{bmatrix}A^{-1}=\[1​0−2​1​\] and B−1=\[1−301\]B^{-1} = \begin{bmatrix} 1 & -3 \\ 0 & 1 \end{bmatrix}B^{-1}=\[1​−30​1​\]. Then

B−1A−1=\[1−301\]\[10−21\]=\[7−3−21\].B^{-1}A^{-1} = \begin{bmatrix} 1 & -3 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ -2 & 1 \end{bmatrix} = \begin{bmatrix} 7 & -3 \\ -2 & 1 \end{bmatrix}.B−1A−1=\[1​−30​1​\]\[1​0−2​1​\]=\[7​−3−2​1​\].

Computing (AB)−1(AB)^{-1}(AB)−1 directly gives the same matrix.

**Final answer:**(AB)−1=\[7−3−21\](AB)^{-1} = \begin{bmatrix} 7 & -3 \\ -2 & 1 \end{bmatrix}(AB)−1=\[7​−3−2​1​\] — and crucially, A−1B−1A^{-1}B^{-1}A^{-1}B^{-1} in the wrong order does _not_ match. The order matters.

### Example 6

**Confirm that \[1−1−12\]\begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix}\[1​−1−1​2​\] is the inverse of \[2111\]\begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}\[2​11​1​\].**

The fastest verification is to multiply them:

\[2111\]\[1−1−12\]=\[2−1−2+21−1−1+2\]=\[1001\]=I.\begin{bmatrix} 2 & 1 \end{bmatrix}\begin{bmatrix} 1 & -1 \end{bmatrix} = \begin{bmatrix} 2-1 & -2+2 \end{bmatrix} = \begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix} = I.

**Final answer:** yes — the product is the identity, so the two matrices are inverses. Verifying by multiplication is faster than recomputing the inverse from scratch.

## Why the Inverse of a Matrix Earns Its Place

> "If you cannot divide by a matrix, how do you ever solve for one?"

The matrix inverse arrived with [Arthur Cayley](https://mathshistory.st-andrews.ac.uk/Biographies/Cayley/) (1821–1895, England), whose 1858 _A Memoir on the Theory of Matrices_ defined matrix multiplication, the identity, and the inverse as a single algebraic system. That paper is the reason "solve AX=BAX = BAX=B" became a one-line operation rather than a fresh round of elimination.

Where the inverse does real work today:

- **Solving linear systems.** Any system Ax=bA\mathbf{x} = \mathbf{b}Ax=b collapses to x=A−1b\mathbf{x} = A^{-1}\mathbf{b}x=A−1b, and the same inverse reuses for every new b\mathbf{b}b — circuit analysis, economics input-output models, and structural engineering all run on this.
- **Computer graphics.** Undoing a transformation — moving a camera back, un-rotating an object — is applying the inverse matrix.
- **Cryptography.** The Hill cipher decrypts by multiplying by the inverse of the key matrix, which exists only when the key is invertible.
- **Statistics and machine learning.** Least-squares regression solves β^=(XTX)−1XTy\hat{\beta} = (X^T X)^{-1} X^T yβ^​=(XTX)−1XTy — the inverse sits at the heart of fitting a line to data.

## Where Students Trip Up on the Inverse of a Matrix

### Mistake 1: Trying to invert a non-square matrix

**Where it slips in:** Reaching for the inverse of a rectangular matrix, like a 2×32 \times 32×3.

**Don't do this:** Apply the formula to a matrix that is not square — there is no A−1A^{-1}A−1 to find.

**The correct way:** Only square matrices have inverses. A rectangular matrix can have a one-sided pseudo-inverse, but that is a different object entirely.

### Mistake 2: Flipping the product-rule order

**Where it slips in:** Inverting a product ABABAB.

**Don't do this:** Write (AB)−1=A−1B−1(AB)^{-1} = A^{-1}B^{-1}(AB)−1=A^{-1}B^{-1}. The order is wrong.

**The correct way:**(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}(AB)−1=B^{-1}A^{-1} — the order reverses. The second-guesser who knows the rule still flips it back under time pressure; the "shoes-then-socks, reversed" image keeps it anchored.

### Mistake 3: Forgetting to divide by the determinant

**Where it slips in:** Building the adjugate (or applying the 2x2 swap-and-negate) and stopping there.

**Don't do this:** Hand in the adjugate as the inverse. The adjugate is only the inverse up to a scale factor.

**The correct way:** Divide every entry by det⁡A\det AdetA. The rusher who skips this step gets an answer that is off by exactly the determinant — and fails the AA−1=IAA^{-1} = IAA−1=I check.

## Key Takeaways

- The **inverse of a matrix** AAA is the unique A−1A^{-1}A−1 with AA−1=A−1A=IAA^{-1} = A^{-1}A = IAA−1=A−1A=I — the matrix version of a reciprocal.
- An inverse exists only when AAA is square and det⁡A≠0\det A \neq 0detA=0; otherwise the matrix is singular.
- The 2x2 shortcut: swap the diagonal, negate the off-diagonal, divide by ad−bcad - bcad−bc.
- The general method is A−1=1det⁡Aadj(A)A^{-1} = \frac{1}{\det A}\text{adj}(A)A^{-1}=detA1​adj(A), or row-reduce \[A∣I\]\[A \mid I\] for larger matrices.
- The product rule reverses order: (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}(AB)−1=B^{-1}A^{-1}.
- The inverse turns Ax=bA\mathbf{x} = \mathbf{b}Ax=b into x=A−1b\mathbf{x} = A^{-1}\mathbf{b}x=A−1b — the reason it powers linear systems, graphics, ciphers, and regression.
