Composition & Inverses

Matrix multiplication means doing transformations one after another. Inverses undo what a matrix does.

Composition = Multiplication

One transformation followed by another is itself a single transformation, and its matrix is the product. Some transformations can be undone; others crush space and can't.

Composition in Action

Step from Original to After A to After B to rotate and then shear the grid. The final picture is exactly what the single product matrix BA does.

→→

Key insight: Applying A then B is the same as applying the single matrix BA (note the order!). Matrix multiplication BA means "do A first, then B".

Go deeper:Composition = Multiplication

When you apply transformation A and then transformation B, the combined effect is a single transformation. This combined transformation is represented by the matrix product BA (note: B times A, not A times B).

If a transformation can be "undone," its inverse exists. But not all transformations can be reversed—some destroy information by collapsing space.

Watch as we apply rotation A, then shear B. The final result is exactly what the product matrix BA produces in a single step.

Order Matters (AB ≠ BA)

Compare rotate-then-scale with scale-then-rotate. The two shapes differ, because matrix multiplication is not commutative.

A then B (Rotate → Scale)
First rotate 45°, then scale
B then A (Scale → Rotate)
First scale, then rotate 45°

AB ≠ BA (order matters!)

Rotating then scaling gives a different result than scaling then rotating.

A (Rotate 45°):
[0.71, -0.71]
[0.71, 0.71]
B (Scale 2×, 0.5×):
[2.00, 0.00]
[0.00, 0.50]

The Inverse Undoes

Apply A, then press Apply A⁻¹ and watch the grid return to where it started. Together they make the identity I, the matrix that does nothing.

→→
Matrix A:
[1.50, 0.50]
[0.30, 1.20]
Matrix A⁻¹:
[0.73, -0.30]
[-0.18, 0.91]

The inverse matrix A⁻¹ undoes what A does. Applying A then A⁻¹ (or vice versa) returns to the identity—no transformation at all.

Go deeper:The Inverse Undoes

The inverse matrix A⁻¹ reverses what A does. Apply A, then A⁻¹, and you're back where you started. The identity matrix I (which does nothing) satisfies A·A⁻¹ = I.

Identity does nothing: AI = IA = A

When Inverses Don't Exist

Slide the collapse amount and watch the square flatten as the determinant falls to zero. Once it's flat, nothing can bring the points back.

Determinant
1.000
Inverse exists?
Yes

As the matrix approaches singular (det → 0), space collapses to a lower dimension. Information is lost—you can't tell where points came from, so there's no inverse.

Go deeper:When Inverses Don't Exist

A singular matrix (determinant = 0) collapses space to a lower dimension. Once collapsed, you can't reconstruct where points came from—no inverse exists.

Key Takeaways

  • Composition is multiplication: A then B = BA (right to left!)
  • Order matters: AB ≠ BA in general
  • Inverse undoes: A⁻¹ reverses the effect of A
  • Singular = no inverse: det = 0 means information is lost

Spot a mistake or have an idea?

Search