---
title: The Inverse and the Invertible Matrix Theorem
module: Matrix Algebra
moduleNumber: 2
lessonNumber: 2
order: 202
summary: >
  The inverse of a square matrix is the matrix analogue of a reciprocal, defined
  by AA⁻¹ = I. A closed form settles the 2×2 case; the Gauss–Jordan algorithm
  row reduces [A | I] to [I | A⁻¹] in general; and elementary matrices record
  single row operations. The Invertible Matrix Theorem collects a dozen
  equivalent conditions for invertibility into one statement.
topics: [Matrix Algebra]
sources:
  - book: Lay
    ref: "Ch. 2 — Matrix Algebra; §2.2 The Inverse of a Matrix, §2.3 Characterizations of Invertible Matrices"
---

The reciprocal $5^{-1}$ undoes multiplication by $5$: $5^{-1} \cdot 5 = 1$. A
square matrix has an analogous partner, defined so that multiplying by it undoes
multiplication by $A$. Two features of matrices constrain the generalization:
multiplication is not commutative, so both orders $CA = I$ and $AC = I$ must be
required, and only square matrices can have a full two-sided inverse.

## Definition and uniqueness

> **Definition (Invertible matrix).** An $n \times n$ matrix $A$ is **invertible**
> if there is an $n \times n$ matrix $C$ with
> $$
> AC = I \qquad \text{and} \qquad CA = I,
> $$
> where $I = I_n$. Such a $C$ is an **inverse** of $A$.

The inverse is unique. If $B$ and $C$ were both inverses, then

$$
B = BI = B(AC) = (BA)C = IC = C,
$$

so there is only one inverse, written $A^{-1}$, with $A A^{-1} = A^{-1} A = I$. A
matrix with no inverse is called **singular**; an invertible matrix is
**nonsingular**.

### The 2×2 formula

For $2 \times 2$ matrices there is a closed form, controlled by a single number.

> **Theorem (2×2 inverse).** Let
> $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$. If $ad - bc \ne 0$, then $A$
> is invertible and
> $$
> A^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}.
> $$
> If $ad - bc = 0$, then $A$ is not invertible.

The quantity $ad - bc$ is the **determinant** of $A$, written $\det A$; the $2 \times 2$
inverse criterion says a $2 \times 2$ matrix is invertible exactly when $\det A \ne 0$. The
[determinant of a general square matrix](/linear-algebra/determinants/determinants-and-cofactors)
extends this test to every size. For
$A = \begin{bmatrix} 3 & 4 \\ 5 & 6 \end{bmatrix}$, $\det A = 18 - 20 = -2 \ne 0$,
so

$$
A^{-1} = \frac{1}{-2}\begin{bmatrix} 6 & -4 \\ -5 & 3 \end{bmatrix}
= \begin{bmatrix} -3 & 2 \\ 5/2 & -3/2 \end{bmatrix}.
$$

### Solving $Ax = b$

An inverse turns a square system into a single multiplication.

> **Theorem (Unique solution).** If $A$ is invertible, then for each $b$ in
> $\mathbb{R}^n$ the equation $Ax = b$ has the unique solution $x = A^{-1}b$.

The solution exists because $A(A^{-1}b) = (A A^{-1})b = Ib = b$, and it is unique
because $Au = b$ forces $u = A^{-1}Au = A^{-1}b$. In practice $A^{-1}b$ is rarely
the way to solve a system numerically — row reducing $[\,A \mid b\,]$ is faster
and more accurate — but the unique-solution theorem is the theoretical bridge between inverses and
solvability, and for hand computation on a $2 \times 2$ system the formula is
convenient.

> **Worked example.** The matrix $A = \begin{bmatrix} 3 & 4 \\ 5 & 6 \end{bmatrix}$
> above has $A^{-1} = \begin{bmatrix} -3 & 2 \\ 5/2 & -3/2 \end{bmatrix}$. To solve
> the system
>
> $$
> 3x_1 + 4x_2 = 3, \qquad 5x_1 + 6x_2 = 7,
> $$
>
> read it as $Ax = b$ with $b = (3, 7)$ and multiply by $A^{-1}$:
>
> $$
> x = A^{-1}b = \begin{bmatrix} -3 & 2 \\ 5/2 & -3/2 \end{bmatrix}\begin{bmatrix} 3 \\ 7 \end{bmatrix}
> = \begin{bmatrix} -9 + 14 \\ 15/2 - 21/2 \end{bmatrix} = \begin{bmatrix} 5 \\ -3 \end{bmatrix}.
> $$
>
> A single matrix–vector product replaces the elimination.

## Algebra of inverses

Three rules describe how the inverse interacts with itself, with products, and
with the transpose. The product rule reverses order, exactly as the transpose
does.[^lay-thm6]

> **Theorem (Inverse rules).** Let $A$ and $B$ be invertible $n \times n$
> matrices. Then $A^{-1}$ is invertible with $(A^{-1})^{-1} = A$; the product
> $AB$ is invertible with $(AB)^{-1} = B^{-1}A^{-1}$; and $A^\top$ is invertible
> with $(A^\top)^{-1} = (A^{-1})^\top$.

The product rule is proved by checking the definition:
$(AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AIA^{-1} = I$, and similarly on the other
side. It generalizes: a product of invertible matrices is invertible, and the
inverse is the product of the inverses in reverse order,
$(A_1 A_2 \cdots A_k)^{-1} = A_k^{-1} \cdots A_2^{-1} A_1^{-1}$.

## Elementary matrices

Computing $A^{-1}$ efficiently rests on a connection between inverses and row
operations, made through elementary matrices.

> **Definition (Elementary matrix).** An **elementary matrix** is one obtained by
> performing a single [elementary row operation](/linear-algebra/linear-systems/systems-and-echelon-forms)
> on the identity matrix.

Left-multiplying any matrix $A$ by an elementary matrix $E$ performs that same row
operation on $A$: if $E$ is $I$ with rows $1$ and $2$ swapped, then $EA$ is $A$
with rows $1$ and $2$ swapped. Because row operations are reversible, every
elementary matrix is invertible, and its inverse is the elementary matrix of the
same type that undoes the operation.

For instance, the operation "add $4$ times row $1$ to row $3$" applied to $I_3$
gives the elementary matrix $E$, and left-multiplying $A$ by $E$ performs that
same operation on $A$:

$$
E = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 4 & 0 & 1 \end{bmatrix},
\qquad
EA = \begin{bmatrix} a & b & c \\ d & e & f \\ g+4a & h+4b & i+4c \end{bmatrix}.
$$

$$
% caption: An elementary matrix records one row operation on the identity;
% left-multiplying by it then replays that operation on any matrix A.
\begin{tikzpicture}[>=stealth, font=\footnotesize,
  st/.style={draw, minimum width=26mm, minimum height=11mm, align=center, font=\scriptsize}]
  \definecolor{acc}{HTML}{4A6FA5}
  \node[st] (i) at (0,0) {identity $I$};
  \node[st, draw=acc, thick] (e) at (4.2,0) {elementary $E$};
  \node[st] (ea) at (8.7,0) {$EA$: same op on $A$};
  \draw[->, acc, thick] (i) -- (e) node[midway, above, font=\scriptsize] {one row op};
  \draw[->, black, thick] (e) -- (ea) node[midway, above, font=\scriptsize] {left-multiply $A$};
\end{tikzpicture}
$$

An elementary row operation carried out on an $m \times n$ matrix $A$ produces
$EA$, where $E$ is $I_m$ with that same operation applied. Since each step of a
row reduction is a left-multiplication by an elementary matrix, reducing $A$ to
$I$ amounts to a product $E_p \cdots E_1 A = I$.

## Row reduction finds the inverse

> **Theorem (Row equivalence to $I$).** An $n \times n$ matrix $A$ is
> invertible if and only if $A$ is row equivalent to $I_n$. In that case, any
> sequence of row operations reducing $A$ to $I_n$ transforms $I_n$ into
> $A^{-1}$.

The reason is direct. If $A$ is invertible, $Ax = b$ is solvable for every $b$,
so $A$ has a pivot in every row; being square, its reduced echelon form is $I_n$.
Conversely, if $A$ reduces to $I_n$, then $E_p \cdots E_1 A = I_n$, so
$A = (E_p \cdots E_1)^{-1}$ is invertible, and $A^{-1} = E_p \cdots E_1$ is
precisely what those same operations do to $I_n$.

Placing $A$ and $I$ side by side lets a single row reduction act on both.

```algorithm
caption: Inverse by Gauss–Jordan reduction of $[\,A \mid I\,]$
form the augmented matrix $[\,A \mid I\,]$
row reduce $[\,A \mid I\,]$ toward reduced echelon form
if the left block reaches $I_n$ then
  the right block is $A^{-1}$
else // a zero row appears on the left
  report that $A$ is singular
```

$$
% caption: Row reducing the double-wide matrix [A | I]: as the left block becomes
% the identity, the right block becomes A⁻¹.
\begin{tikzpicture}[font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % left [A | I]
  \draw[black, thick] (0,0) rectangle (1.5,1.5);
  \draw[black, thick] (1.5,0) rectangle (3.0,1.5);
  \node at (0.75,0.75) {$A$};
  \node at (2.25,0.75) {$I$};
  \node[black, font=\scriptsize] at (1.5,1.8) {$A$ beside $I$};
  % arrow
  \draw[->, acc, very thick] (3.5,0.75) -- (5.0,0.75)
    node[midway, above, font=\scriptsize] {row reduce};
  % right block: I beside the inverse
  \draw[black, thick] (5.5,0) rectangle (7.0,1.5);
  \draw[acc, thick] (7.0,0) rectangle (8.5,1.5);
  \fill[acc!12] (7.0,0) rectangle (8.5,1.5);
  \node at (6.25,0.75) {$I$};
  \node[acc, font=\scriptsize] at (7.75,0.75) {inverse};
  \node[black, font=\scriptsize] at (7.0,1.8) {$I$ beside inverse};
\end{tikzpicture}
$$

> **Worked example.** Invert
> $A = \begin{bmatrix} 0 & 1 & 2 \\ 1 & 0 & 3 \\ 4 & -3 & 8 \end{bmatrix}$ by row
> reducing $[\,A \mid I\,]$. Swap rows $1$ and $2$ for a leading $1$, then clear
> the first column with $R_3 \mapsto R_3 - 4R_1$:
>
> $$
> \left[\begin{array}{ccc|ccc}
> 0 & 1 & 2 & 1 & 0 & 0 \\
> 1 & 0 & 3 & 0 & 1 & 0 \\
> 4 & -3 & 8 & 0 & 0 & 1
> \end{array}\right]
> \sim
> \left[\begin{array}{ccc|ccc}
> 1 & 0 & 3 & 0 & 1 & 0 \\
> 0 & 1 & 2 & 1 & 0 & 0 \\
> 0 & -3 & -4 & 0 & -4 & 1
> \end{array}\right].
> $$
>
> Clear the second column with $R_3 \mapsto R_3 + 3R_2$, then scale $R_3$ by
> $\tfrac{1}{2}$:
>
> $$
> \sim
> \left[\begin{array}{ccc|ccc}
> 1 & 0 & 3 & 0 & 1 & 0 \\
> 0 & 1 & 2 & 1 & 0 & 0 \\
> 0 & 0 & 2 & 3 & -4 & 1
> \end{array}\right]
> \sim
> \left[\begin{array}{ccc|ccc}
> 1 & 0 & 3 & 0 & 1 & 0 \\
> 0 & 1 & 2 & 1 & 0 & 0 \\
> 0 & 0 & 1 & 3/2 & -2 & 1/2
> \end{array}\right].
> $$
>
> Back-clear the third column with $R_1 \mapsto R_1 - 3R_3$ and
> $R_2 \mapsto R_2 - 2R_3$:
>
> $$
> \sim
> \left[\begin{array}{ccc|ccc}
> 1 & 0 & 0 & -9/2 & 7 & -3/2 \\
> 0 & 1 & 0 & -2 & 4 & -1 \\
> 0 & 0 & 1 & 3/2 & -2 & 1/2
> \end{array}\right].
> $$
>
> The left block reached $I$, so $A$ is invertible and the right block is
>
> $$
> A^{-1} = \begin{bmatrix} -9/2 & 7 & -3/2 \\ -2 & 4 & -1 \\ 3/2 & -2 & 1/2 \end{bmatrix}.
> $$

If instead a row of zeros had appeared in the left block, the reduction would
stop: $A$ is not row equivalent to $I$, hence singular.

### Another view: columns solve $Ax = e_j$

Writing $I = [\,e_1 \; \cdots \; e_n\,]$, the reduction of $[\,A \mid I\,]$ solves
the $n$ systems $Ax = e_1, \dots, Ax = e_n$ simultaneously. Since
$A A^{-1} = I$, column $j$ of $A^{-1}$ solves $Ax = e_j$. When
an application needs only one or two columns of the inverse, only the
corresponding systems must be solved.

## The Invertible Matrix Theorem

Row reduction, linear independence, spanning, and one-to-one/onto maps all turn
out to be the same condition on a square matrix, stated in different vocabularies.
The Invertible Matrix Theorem collects them.[^lay-imt]

> **Theorem (Invertible Matrix Theorem).** Let $A$ be a square $n \times n$
> matrix. The following statements are equivalent — for a given $A$, all true or
> all false.
>
> - **(a)** $A$ is invertible.
> - **(b)** $A$ is row equivalent to $I_n$.
> - **(c)** $A$ has $n$ pivot positions.
> - **(d)** $Ax = 0$ has only the trivial solution.
> - **(e)** The columns of $A$ are linearly independent.
> - **(f)** The map $x \mapsto Ax$ is one-to-one.
> - **(g)** $Ax = b$ has at least one solution for every $b$ in $\mathbb{R}^n$.
> - **(h)** The columns of $A$ span $\mathbb{R}^n$.
> - **(i)** The map $x \mapsto Ax$ is onto $\mathbb{R}^n$.
> - **(j)** There is a matrix $C$ with $CA = I$.
> - **(k)** There is a matrix $D$ with $AD = I$.
> - **(l)** $A^\top$ is invertible.

The proof runs a circle of implications
$\text{(a)} \Rightarrow \text{(j)} \Rightarrow \text{(d)} \Rightarrow \text{(c)}
\Rightarrow \text{(b)} \Rightarrow \text{(a)}$, then links the remaining
statements to that circle through results already available for any matrix:
(d), (e), (f) are equivalent for every matrix, as are (g), (h), (i).

$$
% caption: The Invertible Matrix Theorem as a hub: every condition on the rim is
% equivalent to the single fact that A is invertible.
\begin{tikzpicture}[font=\footnotesize,
  spoke/.style={draw, minimum width=22mm, minimum height=8mm, align=center, font=\scriptsize}]
  \definecolor{acc}{HTML}{4A6FA5}
  \node[draw=acc, thick, fill=acc!10, minimum width=24mm, minimum height=11mm, align=center] (hub) at (0,0)
    {$A$ invertible};
  \node[spoke] (n1) at (0,2.6)     {$n$ pivots};
  \node[spoke] (n2) at (3.4,1.4)   {cols independent};
  \node[spoke] (n3) at (3.9,-0.7)  {$Ax=0$ trivial};
  \node[spoke] (n4) at (2.7,-2.5)  {$Ax=b$ solvable};
  \node[spoke] (n5) at (-2.7,-2.5) {cols span $\mathbb{R}^n$};
  \node[spoke] (n6) at (-3.9,-0.7) {map $A$ onto};
  \node[spoke] (n7) at (-3.4,1.4)  {map $A$ one-to-one};
  \node[spoke] (n8) at (0,-2.9)    {$A^{T}$ invertible};
  \foreach \n in {n1,n2,n3,n4,n5,n6,n7,n8}
    \draw[acc, thick] (hub) -- (\n);
\end{tikzpicture}
$$

> **Worked example.** To decide whether
> $A = \begin{bmatrix} 1 & 0 & -2 \\ 3 & 1 & -2 \\ -5 & -1 & 9 \end{bmatrix}$ is
> invertible, reduce it to echelon form and count pivots. Apply
> $R_2 \mapsto R_2 - 3R_1$ and $R_3 \mapsto R_3 + 5R_1$, then $R_3 \mapsto R_3 + R_2$:
>
> $$
> A \sim \begin{bmatrix} 1 & 0 & -2 \\ 0 & 1 & 4 \\ 0 & -1 & -1 \end{bmatrix}
> \sim \begin{bmatrix} 1 & 0 & -2 \\ 0 & 1 & 4 \\ 0 & 0 & 3 \end{bmatrix}.
> $$
>
> Three pivot positions in a $3 \times 3$ matrix satisfy condition (c), so $A$ is
> invertible. No inverse was computed to reach the conclusion.

Two cautions. Statement (g) can be strengthened to "$Ax = b$
has a **unique** solution for each $b$" by the unique-solution theorem, so uniqueness is built in.
And the theorem applies only to **square** matrices: if the columns of a
$4 \times 3$ matrix are linearly independent, nothing follows about the
solvability of $Ax = b$, because that matrix is not square.

A companion fact drops out of the theorem: for square $A$ and $B$, a one-sided
identity is enough. If $AB = I$, then $A$ and $B$ are both invertible, with
$B = A^{-1}$ and $A = B^{-1}$.

## Invertible linear transformations

The theorem transfers to maps. A linear transformation
$T : \mathbb{R}^n \to \mathbb{R}^n$ is **invertible** if there is a function
$S : \mathbb{R}^n \to \mathbb{R}^n$ with $S(T(x)) = x$ and $T(S(x)) = x$ for all
$x$. When $A$ is the standard matrix of $T$, invertibility of the map and of the
matrix coincide.

> **Theorem (Invertible transformation).** Let $T : \mathbb{R}^n \to
> \mathbb{R}^n$ be linear with standard matrix $A$. Then $T$ is invertible if and
> only if $A$ is invertible, and the inverse is $S(x) = A^{-1}x$, the unique
> function satisfying both composition identities.

$$
% caption: A⁻¹ reverses the action of A: applying A then A⁻¹ returns every vector
% to where it started.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \node (x)  at (0,0)   {$x$};
  \node (ax) at (3.4,0) {$Ax$};
  \draw[->, acc, thick, bend left=35] (x) to node[above, font=\scriptsize] {mult. by $A$} (ax);
  \draw[->, black, thick, bend left=35] (ax) to node[below, font=\scriptsize] {mult. by inverse} (x);
\end{tikzpicture}
$$

A one-to-one linear map from $\mathbb{R}^n$ into $\mathbb{R}^n$ therefore has
independent columns in its standard matrix (statement (e)), so the matrix is
invertible, the map is automatically onto (statement (i)), and $T$ has an inverse
$T^{-1}(x) = A^{-1}x$. For square maps, one-to-one and onto are equivalent: each
implies the other.

## Numerical note

In floating-point arithmetic a matrix can be **ill-conditioned**: invertible in
exact arithmetic, yet so close to singular that small perturbations of its
entries make it singular. Row reduction may then report fewer than $n$ pivots
because of roundoff, or make a genuinely singular matrix look invertible. Matrix
software reports a **condition number** measuring this sensitivity: it is $1$ for
$I$, grows without bound as a matrix approaches singularity, and is infinite for a
singular matrix. The
[singular value decomposition](/linear-algebra/symmetric-quadratic-svd/singular-value-decomposition)
gives the reliable way to judge how close a matrix is to losing rank, and the
[numerical module](/linear-algebra/numerical-linear-algebra/conditioning-and-floating-point)
develops the condition number in full.

[^lay-thm6]: **Lay**, _Linear Algebra and Its Applications_, §2.2 — Theorem 6: the inverse of a product reverses order, $(AB)^{-1} = B^{-1}A^{-1}$, with $(A^{-1})^{-1} = A$ and $(A^\top)^{-1} = (A^{-1})^\top$; each is verified against the definition of the inverse.
[^lay-imt]: **Lay**, §2.3 — Theorem 8, the Invertible Matrix Theorem, whose twelve equivalent statements are chained through a circle of implications and the earlier results on linear independence, spanning, and one-to-one/onto maps; §2.2 Theorem 7 supplies the row-reduction characterization and the algorithm for $A^{-1}$.
