Solving AX = B
The inverse of a matrix
To solve 3x = 9 we multiply by the inverse of 3. Can the same be done with A X = B, writing X = A⁻¹ B? Yes — but only when A has an inverse, which is not always the case.
Definition
A square matrix A is invertible if there is a matrix A⁻¹ such that:
A × A⁻¹ = A⁻¹ × A = I
A⁻¹ is called the inverse of A. It is unique when it exists. A non-invertible matrix is called singular.
Two remarks that prevent mistakes: an inverse only exists for square matrices, and you must never write B/A — matrix division does not exist, only multiplication by the inverse makes sense, and on the right side.
The 2 × 2 case: a formula worth knowing
[ a b ] 1 [ d -b ]
A = [ c d ] -> A⁻¹ = ------- [ -c a ]
ad - bc
Swap the diagonal entries, flip the sign of the others, and divide by ad - bc. That number is the determinant of A. Everything hinges on it: if it is zero, the division is impossible and the matrix is not invertible.
An example:
A = [ 3 1 ] det = 3×2 - 1×5 = 1
[ 5 2 ]
A⁻¹ = [ 2 -1 ] check: [ 3 1 ] [ 2 -1 ] [ 1 0 ]
[ -5 3 ] [ 5 2 ]×[ -5 3 ] = [ 0 1 ] ✔
Solving a system with the inverse
If A is invertible, the system A X = B has a unique solution:
A X = B
A⁻¹A X = A⁻¹B
X = A⁻¹B
On the previous example, with B = (9 ; 16):
X = [ 2 -1 ] [ 9 ] [ 2×9 - 1×16 ] [ 2 ]
[ -5 3 ]×[ 16 ] = [ -5×9 + 3×16 ] = [ 3 ]
so x = 2 and y = 3.
Mind the side. Since the product is not commutative, you multiply on the left on both sides: from A X = B you get X = A⁻¹B, definitely not B A⁻¹ — which, besides being wrong, does not even have compatible dimensions.
What the inverse does to operations
(A⁻¹)⁻¹ = A inverting twice changes nothing
(AB)⁻¹ = B⁻¹ A⁻¹ the order is REVERSED
(tA)⁻¹ = t(A⁻¹)
The second rule makes sense through transformations: if you put on socks then shoes, you must take off the shoes before the socks. Undoing a composition means undoing each step in reverse order.
A matrix with no inverse
A = [ 1 2 ] det = 1×4 - 2×2 = 0
[ 2 4 ] (the 2nd column is twice the 1st: redundant information)
No matrix can invert A: the associated map crushes the plane onto a line, and that collapse is irreversible.
Summary
Ais invertible ifA A⁻¹ = A⁻¹ A = I; the inverse is then unique.- Only square matrices can be invertible; matrix division does not exist.
- For 2 × 2: swap the diagonal, flip the signs of the others, divide by
ad - bc. det(A) = 0→ singular matrix, not invertible.- If
Ais invertible,A X = Bhas the unique solutionX = A⁻¹B, multiplying on the left. (AB)⁻¹ = B⁻¹A⁻¹: the inverse of a product reverses the order.

