Markov Chain Visualizer

Edit transition matrix, watch the chain walk, find the stationary distribution

Preset Chains

Transition Matrix P

Click cells to edit

Simulation

Stationary Distribution π

Stationary π: πP = π (left eigenvector for λ=1)
Computed by power iteration: Pⁿ → rows converge to π.

For ergodic chains (irreducible + aperiodic), the chain mixes to π regardless of start.

Drag the slider to see how empirical frequencies converge to π over time.