If a matrix A rotates and stretches space, can you undo that transformation? Yes, and the inverse matrix combined with the identity matrix is how you reverse any linear transformation and solve systems like Ax = b in one elegant step.
This idea is central for anyone studying linear algebra, machine learning or computer graphics, because it turns a system of equations into a single multiplication.
What is the identity matrix and why does it matter?
Before undoing anything, you need a reference point: the state where nothing has changed. That state is the identity matrix, written as I.
The identity matrix has ones on its main diagonal and zeros everywhere else. A 2x2 identity looks like 1, 0, 0, 1. Its key property is simple: any matrix A multiplied by I gives you back A, untouched. It is the matrix version of the number one.
Geometrically, multiplying by I is the transformation that does nothing. Vectors stay where they are, the basis vectors i and j don't move, and space looks identical.
What is the identity matrix? It's a square matrix with ones on the diagonal and zeros elsewhere. Multiplying any matrix by it leaves the matrix unchanged, so it acts as the neutral element of matrix multiplication.
How does the inverse matrix undo a transformation?
The inverse matrix, written as A⁻¹, is the transformation that cancels the effect of A. Its defining property is that A multiplied by A⁻¹ equals the identity matrix.
In plain words: applying a transformation and then reversing it is the same as doing nothing at all.
Solving Ax = b with the inverse
Here is where the inverse becomes powerful. Take the system Ax = b. If you multiply both sides by A⁻¹, you get:
- A⁻¹ · A · x = A⁻¹ · b.
- A⁻¹ · A simplifies to I.
- I · x is just x.
- So x = A⁻¹ · b.
If you know the inverse of A, you find x with a single dot product. No row reduction, no substitution, no system of equations.
Visually, imagine three frames. On the left, your original vector x with the standard basis. In the middle, A transforms x into a new vector b and tilts the basis. On the right, A⁻¹ pulls everything back: b returns to x, and the basis snaps to its starting position.
When does a matrix have an inverse?
Not every matrix is invertible. For A⁻¹ to exist, two conditions must hold:
- The matrix must be square. The inverse has to work from both sides, A · A⁻¹ and A⁻¹ · A, and only square matrices can produce the same identity in both directions.
- The transformation must not collapse space into fewer dimensions. If A flattens a 2D plane into a line, information is lost and there's no way to recover the original vectors.
Why isn't every matrix invertible? Because some transformations destroy dimensions. If a matrix squashes a plane into a line, multiple input vectors end up at the same output, so reversing it uniquely is impossible.
There is a number that tells you whether a matrix collapses space, and you'll meet it in the next lesson.
Checking if one matrix is the inverse of another
You don't need to compute an inverse from scratch to verify one. Just multiply both matrices and check if the result is the identity.
Take A with values 3, 2, 1, 1 and B with values 1, -2, -1, 3. Compute the dot product A · B using linear combinations:
- First column: 1·(3,1) + (-1)·(2,1) = (3-2, 1-1) = (1, 0).
- Second column: (-2)·(3,1) + 3·(2,1) = (-6+6, -2+3) = (0, 1).
The result is 1, 0, 0, 1, the identity matrix. So B is indeed the inverse of A.
What properties does the inverse matrix have?
Three properties are worth memorizing because they show up constantly:
- The inverse of the inverse is the original: (A⁻¹)⁻¹ = A. If you undo a transformation and then undo that undo, you're back to A.
- The inverse of a product reverses the order: (A · B)⁻¹ = B⁻¹ · A⁻¹. Matrix multiplication reads right to left, so to undo a chain you reverse it from the end.
- The inverse of the transpose equals the transpose of the inverse: (Aᵀ)⁻¹ = (A⁻¹)ᵀ.
These rules let you manipulate expressions with inverses without expanding everything by hand.
Practice exercise
Given A with values 2, 5, 1, 3 and B with values 3, -5, -1, 2, check whether B is the inverse of A, or whether A is the inverse of B. Compute the dot product, look for the identity, and share what you got in the comments.
In the next lesson you'll discover the single number that tells you, before any calculation, whether a matrix can be inverted at all.