Engineering / Mathematics — Modules, Vector Spaces and Matrices
The Inverse of a Matrix
Matrix inversion over a field, its computation by elimination, and why explicit inversion is usually the wrong operation.
Executive summary
A square matrix over a field is invertible exactly when its determinant is non-zero, equivalently when its rank is full. The inverse is computed by elimination on an augmented matrix.
Computing an explicit inverse is almost always avoidable and usually inadvisable — solving a system directly is faster and better conditioned.
Learning objectives
- State the invertibility conditions.
- Compute an inverse by augmented elimination.
- Explain why explicit inversion is usually avoided.
01Equivalent conditions
Invertibility over a field
For a square matrix A over a field, the following are equivalent:
determinant non-zero; rank full; kernel trivial; columns independent; rows independent; Ax = b has a unique solution for every b; A is a product of elementary matrices.
Over a field these all coincide. Over a general ring they separate — a matrix over the integers can have trivial kernel without being invertible, since its inverse may have non-integer entries.
02Computation
Inverse by augmented elimination
square matrix A over a fieldA⁻¹, or a report of singularity- Form the augmented matrix [A | I].
- Apply Gaussian elimination to reduce the left block to reduced row echelon form.
- If the left block does not reduce to I, report that A is singular.
- Otherwise the right block is A⁻¹.
O(n³) field operationsThe method works because row operations correspond to left multiplication by elementary matrices. Reducing A to the identity applies a product of elementary matrices equal to A⁻¹, and the same operations applied to I accumulate exactly that product.
03Why explicit inversion is usually wrong
| Task | Preferred method | Cost |
|---|---|---|
| Solve Ax = b once | Elimination on [A | b] | O(n³), one pass |
| Solve for many right-hand sides | LU factorisation, reused | O(n³) once, O(n²) per solve |
| Compute the determinant | Elimination, product of pivots | O(n³) |
| Genuinely need the inverse | Augmented elimination | O(n³) |
Over finite fields the numerical argument does not apply, since arithmetic is exact. The efficiency argument still does: factoring once and reusing beats inverting whenever multiple right-hand sides are involved.
The cases where the inverse is genuinely needed are those where it is the answer — computing a modular inverse of a matrix for a cryptographic scheme, or forming an explicit change of basis matrix for later reuse.
04Frequently asked questions
Is Gauss-Jordan or LU preferable?
LU factorisation for solving systems, since it separates the expensive factorisation from the cheap solve and allows reuse across right-hand sides. Gauss-Jordan is appropriate when the inverse itself is the deliverable.
Does the adjugate formula have any use?
Theoretically, yes — it proves invertibility over any commutative ring where the determinant is a unit, and gives a closed form. Computationally it costs O(n!) done naively and is never used for numbers of any size.
How is singularity detected reliably?
Over a finite field, exactly: a zero pivot with no available row swap means singular, with no ambiguity. Over the reals the question is one of conditioning rather than a clean yes or no.
Sources and method
Structural reference: Victor Shoup, A Computational Introduction to Number Theory and Algebra, Version 1, Cambridge University Press, 2005 — book pages 323-324.
This page carries the durable method layer only: definitions, constructions, algorithms, complexity results and selection criteria, authored originally for KEVOS. No text is transcribed or paraphrased from the source, and no numeric tables or benchmark data are reproduced — these are routed to live authoritative sources instead.
Author: Kevin Jogin. Last reviewed 2026-08-07.
