Matrix Inverses and Elementary Matrices

Computing A − 1 by Gauss–Jordan elimination, and seeing why it works: each row operation is multiplication by an elementary matrix, so a reduction to the identity is a factorisation of the inverse. The same bookkeeping gives the LU factorisation.

Definition

A square matrix A is invertible when some A − 1 satisfies A A − 1 = A − 1 A = I . The inverse is unique when it exists: if B A = I = A C then B = B ( A C ) = ( B A ) C = C .

Elementary matrices. Each row operation on an n × n matrix is left multiplication by an elementary matrix, obtained by performing that operation on I :

OperationElementary matrixIts inverse
swap rows i , j I with those rows swappeditself
scale row i by c ≠ 0 I with c at ( i , i ) scale by 1 / c
add m × row i to row j I with m at ( j , i ) add − m × row i

Every elementary matrix is invertible, because every row operation is reversible by another of the same kind.

Why Gauss–Jordan computes the inverse. If row operations E 1 , … , E k reduce A to I , then

E k ⋯ E 1 A = I ⟹ E k ⋯ E 1 = A − 1 .

Applying the same operations to I therefore produces A − 1 , which is what running them on the augmented array [ A ∣ I ] does in one pass. If the reduction stalls, a row of zeros appears on the left, then A has dependent columns and no inverse exists.

Consequences. A is invertible exactly when it is a product of elementary matrices, exactly when rank ⁡ A = n , exactly when det A ≠ 0 , exactly when A x = 0 has only the zero solution.

Order reversal. ( A B ) − 1 = B − 1 A − 1 , since ( A B ) ( B − 1 A − 1 ) = A ( B B − 1 ) A − 1 = I . The order flips because the last map applied is the first to be undone. Likewise ( A T ) − 1 = ( A − 1 ) T .

LU factorisation. When A reduces to echelon form using only "add a multiple of one row to a lower row", the multipliers assemble into a unit lower triangular L and the result is U , with A = L U . Solving A x = b then becomes two triangular solves, and det A is the product of U 's diagonal. A row swap is needed when a pivot position holds zero, giving P A = L U .

Assumptions and scope

  • Only square matrices have inverses. A rectangular matrix may have a one-sided inverse or a pseudoinverse, neither of which satisfies both identities.

  • One-sided invertibility is two-sided for square matrices over a field: B A = I forces A B = I . This follows from rank–nullity and fails for infinite-dimensional operators.

  • A reduction that stalls proves non-invertibility rather than indicating an error. A zero row on the left of the augmented array means the columns are dependent.

  • LU without row swaps requires every pivot to be nonzero as elimination proceeds. Otherwise a permutation is needed, giving P A = L U , and numerical implementations swap for stability even when a pivot is merely small.

  • The adjugate formula A − 1 = adj ⁡ ( A ) / det A is correct and impractical beyond 3 × 3 , since it requires n 2 cofactors each of size n − 1 .

  • Inverting a matrix to solve a single system is wasteful and numerically worse than elimination. The inverse is for derivations; factorisations are for computation.

Worked material

Example

Inverses read off structure

Diagonal. diag ⁡ ( d 1 , … , d n ) − 1 = diag ⁡ ( 1 / d 1 , … , 1 / d n ) , provided every d i ≠ 0 . A single zero on the diagonal makes the matrix singular, since that column is zero.

Elementary. Each is inverted by undoing its operation: ( 1 0 − 5 1 ) − 1 = ( 1 0 5 1 ) , and a swap matrix is its own inverse.

Orthogonal. Q − 1 = Q T , by definition of orthogonality. The cheapest inverse available, and the reason U and V in a singular value decomposition are convenient to work with.

Triangular. The inverse of an invertible triangular matrix is triangular of the same kind, and its diagonal entries are the reciprocals. For

( 2 3 0 4 ) − 1 = 1 8 ( 4 − 3 0 2 ) = ( 1 2 − 3 8 0 1 4 ) ,

the diagonal holds 1 / 2 and 1 / 4 as promised, and the matrix is still upper triangular.

A 2 × 2 with determinant 1. ( 2 1 5 3 ) − 1 = ( 3 − 1 − 5 2 ) , integer entries throughout, because dividing by det = 1 introduces no fractions. Any integer matrix with determinant ± 1 inverts to an integer matrix, which is why such matrices are the invertible ones over the integers.

Singular cases. ( 1 2 2 4 ) has determinant 0 and its second row is twice the first, so reduction produces a zero row. ( 1 2 3 0 0 0 4 5 6 ) has a zero row already, and ( 1 1 1 1 ) has equal rows. Each fails every entry of the equivalence list at once, rank below n , zero determinant, nontrivial kernel, 0 an eigenvalue.

What the pattern shows. For a structured matrix the inverse is usually structured the same way and readable without elimination. Recognising the structure first is what saves the computation, and it is also what tells you the answer is wrong when a triangular matrix produces a full inverse.

Non-example

Five errors with inverses

Preserving the order. Writing ( A B ) − 1 = A − 1 B − 1 . With A = ( 2 1 5 3 ) and B = ( 1 2 0 1 ) , the product is A B = ( 2 5 5 13 ) with inverse ( 13 − 5 − 5 2 ) . Computing B − 1 A − 1 gives exactly that; computing A − 1 B − 1 gives ( 3 − 7 − 5 12 ) , a different matrix. The inner factors must be adjacent to cancel.

Inverting entrywise. Replacing each entry by its reciprocal. For ( 2 1 5 3 ) that would give ( 1 / 2 1 1 / 5 1 / 3 ) , whose product with A is nothing like I . The inverse inverts the map, not the numbers; the entrywise reciprocal has no algebraic meaning here, and a zero entry makes it undefined for matrices that are perfectly invertible.

Negating the LU multipliers. After R 2 → R 2 − 2 R 1 , recording − 2 in L rather than 2 . Multiplying L U back out then fails to reproduce A . The check exists precisely because this slip is silent otherwise. L holds the multipliers used, with their own signs.

Treating a stalled reduction as a dead end. Reaching a zero row on the left of [ A ∣ I ] and concluding the arithmetic went wrong. It is a proof: a zero row means the rows are dependent, so the rank is below n and no inverse exists. The correct response is to report singularity, not to restart.

Cancelling a singular matrix. From A B = A C , concluding B = C . That step multiplies by A − 1 and needs A invertible. With A = ( 1 1 1 1 ) , taking B = I and C = ( 0 2 2 0 ) gives A B = A C = ( 1 1 1 1 ) ⋅ , both products equal ( 2 2 2 2 ) , while B ≠ C . Cancellation is a theorem about invertible matrices, not a rule of algebra.

What unites them. The first and last forget that matrix multiplication is neither commutative nor cancellative without invertibility. The middle three treat a matrix as a container of numbers rather than as a map, which is the habit the elementary-matrix reading is meant to displace.

Common errors

Common misconception

The inverse of a product is the product of the inverses in the same order, so ( A B ) − 1 = A − 1 B − 1 .

Related units

Requires

Connected

Learn this topic

Used in

Sources

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.