Matrix Inverse Calculator
Find the inverse of a square matrix A, denoted by A−1, such that their product equals the identity matrix. A matrix has an inverse only when its determinant is non-zero.
A
Learn About Matrix Inverse
Definition and Governing Equation
The inverse of an $n \times n$ square matrix $\mathbf{A}$ is the unique square matrix $\mathbf{A}^{-1}$ satisfying:
where $\mathbf{I}_n$ is the $n \times n$ identity matrix. Geometrically, if $\mathbf{A}$ defines a linear transformation $\mathbf{y} = \mathbf{A}\mathbf{x}$, its inverse reverses that transformation: $\mathbf{x} = \mathbf{A}^{-1}\mathbf{y}$.
Four Equivalent Invertibility Criteria
For any square matrix $\mathbf{A} \in \mathbb{R}^{n \times n}$, the following statements are mathematically equivalent:
- $\mathbf{A}$ is invertible (nonsingular).
- $\det(\mathbf{A}) \ne 0$.
- $\operatorname{rank}(\mathbf{A}) = n$ (full rank; linearly independent rows and columns).
- $\operatorname{Null}(\mathbf{A}) = \{\mathbf{0}\}$ (trivial null space; nullity is zero).
If $\det(\mathbf{A}) = 0$, the matrix is singular. A singular matrix flattens space into lower dimensions; because distinct inputs collapse into identical outputs, information is lost and no inverse exists.
Inverses of Rectangular Matrices (Left vs. Right)
Two-sided inverses exist only for square matrices ($m = n$). For an $m \times n$ matrix:
- Left Inverse ($\mathbf{A}_L \mathbf{A} = \mathbf{I}_n$): Exists if $\mathbf{A}$ has full column rank ($\operatorname{rank}(\mathbf{A}) = n$, requiring $m \ge n$). Formula: $\mathbf{A}_L = (\mathbf{A}^T \mathbf{A})^{-1} \mathbf{A}^T$.
- Right Inverse ($\mathbf{A} \mathbf{A}_R = \mathbf{I}_m$): Exists if $\mathbf{A}$ has full row rank ($\operatorname{rank}(\mathbf{A}) = m$, requiring $m \le n$). Formula: $\mathbf{A}_R = \mathbf{A}^T (\mathbf{A} \mathbf{A}^T)^{-1}$.
- When $m = n$ with full rank, both coincide as the unique two-sided inverse $\mathbf{A}^{-1}$.
Calculation Methods Implemented
- Adjugate / Formula Method:
where $\operatorname{adj}(\mathbf{A}) = \mathbf{C}^T$ is the transposed cofactor matrix. For a $2 \times 2$ matrix:
- Gauss-Jordan Elimination:
Augment $\mathbf{A}$ with the identity matrix and row reduce using exact rational arithmetic:
Core Properties
- Double Inverse: $(\mathbf{A}^{-1})^{-1} = \mathbf{A}$
- Product Reversal: $(\mathbf{A}\mathbf{B})^{-1} = \mathbf{B}^{-1}\mathbf{A}^{-1}$
- Transpose Commutation: $(\mathbf{A}^T)^{-1} = (\mathbf{A}^{-1})^T$
- Determinant Reciprocal: $\det(\mathbf{A}^{-1}) = \frac{1}{\det(\mathbf{A})}$
- Scalar Scaling: $(k\mathbf{A})^{-1} = \frac{1}{k}\mathbf{A}^{-1}$ for $k \ne 0$
Worked Numerical Example
Find the inverse of $\mathbf{A} = \begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix}$:
- Determinant: $\det(\mathbf{A}) = (3)(4) - (2)(1) = 10 \ne 0$ (invertible).
- Adjugate: Swap diagonal entries, negate off-diagonals:
- Scale by $\frac{1}{\det(\mathbf{A})}$:
- Verification:
1. How do I know if a matrix has an inverse before computing it?
Evaluate its determinant. A square matrix is invertible if and only if $\det(\mathbf{A}) \ne 0$. If $\det(\mathbf{A}) = 0$, the matrix is singular and has no inverse. A matrix is singular if any row or column is all zeros or a linear combination of other rows or columns.
2. Can a rectangular matrix have an ordinary inverse?
No. An ordinary two-sided inverse requires equal dimensions ($m = n$). Rectangular matrices can only have a one-sided left inverse (if $m > n$ with full column rank) or right inverse (if $m < n$ with full row rank). General rectangular systems use the Moore-Penrose pseudoinverse ($\mathbf{A}^+$).
3. Why is the inverse of an invertible matrix unique?
Suppose $\mathbf{B}$ and $\mathbf{C}$ both invert $\mathbf{A}$ ($\mathbf{A}\mathbf{B} = \mathbf{I}$ and $\mathbf{C}\mathbf{A} = \mathbf{I}$). By associativity:
Thus, an invertible matrix can have only one inverse.
4. Why is matrix division written as multiplying by an inverse?
Matrix multiplication is non-commutative ($\mathbf{A}\mathbf{B} \ne \mathbf{B}\mathbf{A}$). The notation $\mathbf{A}/\mathbf{B}$ is ambiguous because right multiplication $\mathbf{A}\mathbf{B}^{-1}$ and left multiplication $\mathbf{B}^{-1}\mathbf{A}$ yield different matrices. Writing the inverse explicitly specifies the required multiplication order.
1. The Invertible Matrix Theorem: Three Core Connections
Beyond non-zero determinants, an $n \times n$ matrix $\mathbf{A}$ is invertible if and only if:
- Unique Solvability: The linear system $\mathbf{A}\mathbf{x} = \mathbf{b}$ has exactly one solution for every vector $\mathbf{b} \in \mathbb{R}^n$.
- Spectral Non-Zero: Zero is not an eigenvalue ($\lambda_i \ne 0$ for all $i$), meaning no non-zero vector collapses to zero.
- Nonzero Volume Scaling: The matrix has a nonzero volume-scaling factor, $|\det(\mathbf{A})| > 0$, scaling space without collapsing it into a lower dimension.
2. Orthogonal Matrices: Inversion by Transposition
When a real square matrix $\mathbf{Q} \in \mathbb{R}^{n \times n}$ has orthonormal columns, it satisfies the identity:
Multiplying by $\mathbf{Q}^{-1}$ proves that its inverse is simply its transpose:
Because transposition merely swaps indices, it avoids the computational cost of explicitly computing a general matrix inverse.