The Matrix Exponential, Hands On

A matrix A defines a flow: at every point x the velocity is Ax. Following that flow for time t is the linear map etA. Everything below is computed live in your browser.

1. Follow the flow

Pick a 2×2 matrix A. The arrows show the velocity Ax. The blue square is the unit square; the orange shape is where etA carries it. Slide t from 0 and watch it travel along the flow; the dotted curves are the paths of the corners.

Rotation appears when A is antisymmetric (b=−c, a=d=0): the square turns without changing size. A saddle stretches one direction and squeezes the other, yet the area is preserved because the trace is 0. In general, area is multiplied by et·tr A.

2. Build it from the series

The definition is eA = I + A + A²/2! + A³/3! + …. Choose how many terms to keep. The green square is the exact eA; the orange shape is the partial sum with k terms applied to the unit square.

uses the matrix A from section 1 at t=1, so change it above

With k=0 you get the identity (nothing moves); k=1 is I+A, a first-order step; each added term corrects the one before it. Big entries in A need more terms, which is why libraries use scaling and squaring.

3. When eA+B ≠ eAeB

Take A and B below. Moving along A then along B is not the same as moving along A+B unless they commute. Slide the scale s and compare the three shapes, plus the commutator size ‖AB−BA‖.

orange: es(A+B). green: esAesB. blue: esBesA. For the commuting pair all three coincide; for the non-commuting pair they separate, and the gap grows with s.