Stationary Distributions
Imagine a large city's residents moving between neighborhoods according to fixed probabilistic rules each year. Does the fraction of the population living in each neighborhood eventually stop changing? This holds regardless of how the population started out. This question — whether a random process settles into a stable long-run pattern — is exactly what the theory of stationary distributions answers for Markov Chains. A stationary distribution is a probability vector that the chain leaves unchanged. If today's location is distributed according to , tomorrow's location has the same distribution . This single algebraic equation, , turns out to control an enormous amount of qualitative behavior. It governs whether long-run time averages exist. It also determines what values they take, and how quickly an arbitrary starting distribution is forgotten. The central result of this article is often attributed to the broader Perron–Frobenius circle of ideas. This was specialized by Markov and developed rigorously in the 20th century. It says that an irreducible, positive recurrent Markov chain has a unique stationary distribution. This distribution is given explicitly by the reciprocals of mean return times. Conversely, an irreducible chain admitting a stationary distribution is automatically positive recurrent. This equivalence is the engine behind the Ergodic Theorem for Markov Chains. It also underlies Markov Chain Monte Carlo algorithms, and the PageRank algorithm that ranks web pages. This article gives the precise definition. It states and proves existence and uniqueness for irreducible positive recurrent chains. It works two fully asymmetric numerical examples. It shows exactly why irreducibility cannot be dropped. Finally, it surveys where stationary distributions appear across mathematics, physics, and computing.
- A stationary distribution solves , , : it is a fixed point of the chain's one-step evolution on the space of probability vectors.
- For an irreducible, positive recurrent chain, a stationary distribution exists and is unique, given by where is the mean return time to state .
- Irreducibility alone is not enough: null recurrent and transient irreducible chains have no stationary distribution.
- Existence of a stationary distribution for an irreducible chain forces positive recurrence — the implication goes both ways.
- Aperiodicity is not needed for existence/uniqueness of , only for the convergence (a stronger, separate statement).
- Key idea: stationarity is a linear fixed-point equation whose unique nonnegative normalized solution, for irreducible chains, exists exactly when the chain is positive recurrent, and equals inverse mean return time.
Where this lives today
Stationary distributions are the mathematical backbone of Markov Chain Monte Carlo (MCMC): algorithms like Metropolis–Hastings and Gibbs sampling are designed so that a target distribution (e.g., a Bayesian posterior) is exactly the stationary distribution of an engineered chain, letting simulation approximate otherwise intractable integrals. In statistical physics, the Gibbs/Boltzmann distribution of a system in thermal equilibrium is precisely the stationary distribution of the microscopic dynamics (e.g. Glauber dynamics for the Ising model), and detailed balance with respect to it encodes reversibility. In queueing theory and operations research, the stationary distribution of queue length or server-occupancy chains gives long-run performance metrics (average wait time, blocking probability) used in network and call-center design. In computer science, Google's original PageRank algorithm models a web surfer as a Markov chain on hyperlinks, and a page's importance score is its stationary probability; the same idea underlies reputation and ranking systems in social networks. In genetics, the stationary distribution of the Wright–Fisher and Moran models describes long-run allele frequency distributions under mutation-selection balance. In information theory, the entropy rate of a stationary Markov source is computed directly from and , and source coding theorems are stated relative to the stationary regime.
Ask the tutor: How does the stationary distribution relate to the long-run time average of a Markov chain, and how is that connection made precise by the Ergodic Theorem for Markov Chains?
Let be a Markov chain on a countable state space with transition matrix , so that
A stationary distribution (also called an invariant distribution or equilibrium distribution) is a vector such that: 1. for all , and (it is a probability distribution); 2. , i.e. for every ,
Equivalently, if has distribution , then has distribution for every ; the law of the chain is constant in time along .
Intuition
Think of as a row vector describing "how much probability mass sits at each state." The equation says: redistribute the mass one step according to , and you get the same vector back. It is the discrete, probabilistic analogue of an eigenvector equation — indeed is a left eigenvector of with eigenvalue , normalized to sum to one. A second way to see is through time averages. If the chain is irreducible and positive recurrent, the long-run fraction of time spent in state converges (this is the content of the Ergodic Theorem for Markov Chains, foreshadowed here) to , and equals the reciprocal of the mean time needed to return to having just left it. States visited often (small ) get large stationary mass; states visited rarely get small mass. This "inverse mean return time" formula is not just a definition — it is a theorem, proved below via a renewal argument. A third, complementary picture: run the chain for a long time from any starting distribution. Under mild extra conditions (irreducibility, positive recurrence, and aperiodicity), the distribution of converges to regardless of where the chain started. Stationarity is the destination of this convergence, whether or not the convergence itself holds — existence and uniqueness of are genuinely weaker and more robust facts than the convergence theorem, and periodicity is irrelevant to them.
Let be an irreducible Markov chain on a countable state space with transition matrix . For let
be the mean return time to (started at ), and say the chain is positive recurrent if for some (equivalently, by irreducibility, every) . Then:
(a) If the chain is positive recurrent, there exists a stationary distribution , it is unique, and it satisfies for all , with
(b) Conversely, if the chain is irreducible and admits some stationary distribution , then the chain is positive recurrent, and is the (unique) distribution given by as in (a).
(c) If the chain is irreducible but not positive recurrent (i.e. it is transient, or null recurrent), then no stationary distribution exists.
We argue in several steps. Throughout, irreducibility means every state communicates with every other: for all there exists with . The proof technique is a direct renewal / occupation-measure construction, following the classical approach; we build a stationary measure from excursions out of a fixed reference state and then normalize it.
Step 1: Construction of a stationary measure via excursions. Fix a reference state . Since the chain is irreducible, it visits infinitely often almost surely provided it is recurrent (this is a standard consequence of the Periodicity and Positive Recurrence theory: irreducible chains are either all-transient or all-recurrent, classified as a class). Assume first that the chain is recurrent (we will justify the positive recurrent case fully; the general dichotomy transient/null/positive is assumed known from prerequisites). For define
the expected number of visits to during one excursion from back to (started at , the first return time to ). Note , since the excursion visits exactly once, at time (it does not count time itself). Claim: satisfies , i.e. for all . By recurrence, a.s., so we may write, using Tonelli's theorem to interchange sum and expectation (all terms nonnegative):
Now shift the index by one step. For ,
because is determined by (it is the event that the chain has not yet returned to by time ), so conditioning on within that event and using the Markov property gives exactly the one-step transition to reach at time . Summing over :
On the other hand, the left side equals . Reindex :
Since differ only by the single event , we split:
The first sum is (the term of the defining sum for is , since a.s. under and always). The second sum equals (since a.s. by definition of , and a.s. by recurrence). Adding these two contributions: . Hence
proving the claim: .
Step 2: is finite and strictly positive at every state, and . By definition, (summing the number of visits to each state over one excursion counts every one of the steps exactly once). If the chain is positive recurrent, , so ; in particular each . To see for every : by irreducibility there is with , and since (iterating ), we get , using .
Step 3: Normalization gives a stationary distribution, and . Since , define
Then , , and by Step 1. So is a stationary distribution, and by construction . This proves existence, and gives the formula at the reference state . Since was an arbitrary state (we may repeat the whole construction with any state as reference), this proves for every , once we also know is unique (so that the formula obtained by choosing reference state agrees with the one obtained by choosing reference state and normalizing). We now prove uniqueness, which closes this gap.
Step 4: Uniqueness. Suppose is any stationary distribution: , , . We show for all , i.e. as constructed above with reference state . From we get for all , i.e. . In particular, for any finite set and any ,
A standard identity (proved by the same first-entrance decomposition as in Step 1, applied backward from ; this is a form of the discrete renewal/last-exit decomposition) gives, summing over to and letting , the inequality
where is exactly the expected-visits quantity from Step 1 (this is the standard "" lemma for stationary measures of irreducible recurrent chains: intuitively, restricted to excursions from dominates times the expected excursion visit counts). Summing over all :
So . We must show equality holds, and holds coordinatewise ( for every , not just in aggregate). Suppose for contradiction for some . Summing the inequality (valid for all ) together with this strict inequality at gives, upon summing over ,
so strictly. Now apply irreducibility: since for all and for all , the vector is entrywise (by the inequality above, applied with each state as the ""), sums to , and satisfies , so it is itself a nonnegative (non-normalized) stationary measure, call it . Since and , some ; by irreducibility choose with . Then from ,
But (recall ), a contradiction. Hence no such exists, so for every , and summing gives , i.e. , and then for every . This proves : the stationary distribution is unique. Combined with Step 3, this closes the argument for part (a), including the formula at every state (apply the whole argument with reference state in place of ; uniqueness forces the resulting normalized vector to coincide with , and its -th coordinate is by the Step 3 computation for reference state ).
Step 5: Part (b) — existence of forces positive recurrence. Suppose the chain is irreducible and some stationary distribution exists. First we rule out transience. If the chain were transient, then for every state , as for every fixed (transience implies the expected number of visits to starting from is finite, so the terms of that sum, namely , must tend to ). Since for all , and summable, dominated convergence gives for every . This contradicts . Hence the chain cannot be transient; by the recurrence/transience dichotomy for irreducible chains, it is recurrent. Being recurrent, the construction of Steps 1–4 applies to produce the stationary measure (built from excursions from any reference state ), and by the uniqueness argument of Step 4 (which used only recurrence, not positive recurrence, up through the derivation ) we conclude provided . Suppose instead (null recurrence). Then Step 4's chain of inequalities gives , so ; since was an arbitrary state and irreducibility lets us relabel, an identical argument gives for every , again contradicting . Hence , i.e. the chain is positive recurrent, and then Step 4 identifies with . This proves (b).
Step 6: Part (c). If the irreducible chain is transient or null recurrent, Step 5's two contradictions (transient case, null recurrent case) show directly that no stationary distribution can exist: any candidate is forced to be identically zero, contradicting .
∎Worked examples
Example 1: An asymmetric three-state weather chain. A chain on (say, Sunny, Cloudy, Rainy) has transition matrix
Each row sums to (check: ; ; ), and the chain is irreducible: from you can reach directly and reach again from either via state or via ; explicitly combine so all pairs communicate. Since the state space is finite and irreducible, the chain is automatically positive recurrent (a finite irreducible chain cannot be transient or null recurrent, because the mean return times are finite by a standard finiteness argument — expected hitting times on a finite state space are always finite for an irreducible chain). So Theorem: Existence and Uniqueness of the Stationary Distribution applies and exists uniquely. Solve with , :
From the first equation: . From the second: . Check consistency in the third: , which matches — consistent, as expected since the three balance equations are linearly dependent (they always sum to for a stochastic matrix). Normalize: . Then
Check: . ✓. Check row-sum of directly against : ✓; ✓; ✓. By the theorem, mean return times are , , days — the state visited least often (Rainy) has the longest expected wait to return to it, matching intuition since is smallest.
Example 2: A birth–death chain on with asymmetric, state-dependent rates. Consider a random walk on with reflecting-type boundary behavior and non-uniform step probabilities:
All other entries are zero. This is irreducible on the finite set (a path graph, every state reachable from every other by moving along the path), hence positive recurrent, hence exists uniquely. For birth–death chains the detailed balance equations give a shortcut (this is a special stronger condition, sufficient but not necessary for stationarity in general chains, but always available and always correct for birth–death chains since one checks directly that a detailed-balance solution satisfies termwise). We are not required to derive detailed balance from the theorem — we verify the resulting directly against , so the argument remains fully rigorous without invoking unproven shortcuts. Set . Detailed balance across edge : . Across : . Across : . Normalize: . Convert to fourteenths: , , , . Sum . So . Thus
Convert all to : , , , ; sum ✓. Direct check of stationarity at state : ✓. Direct check at state : ✓. Both checks confirm without relying solely on the detailed-balance shortcut.
The theorem requires the chain to be irreducible and (for existence) positive recurrent. Drop positive recurrence — keep irreducibility — and existence fails outright, even though the chain still "looks" perfectly nice locally. Let and let be simple symmetric random walk: for every . This chain is irreducible: from any one can reach any in steps with positive probability. It is recurrent — a classical fact (provable via Stirling's approximation on , whose sum over diverges, giving recurrence by the Borel–Cantelli-type criterion from Periodicity and Positive Recurrence) — but it is null recurrent: . Suppose, for contradiction, a stationary distribution existed. By translation symmetry of the walk ( depends only on ), if is stationary then so is any shift , and moreover one checks the only candidate stationary measures (up to scalar) for this translation-invariant chain must themselves be translation-invariant, i.e. constant: for all (this follows from the uniqueness-up-to-scalar of stationary measures for irreducible recurrent chains, the same uniqueness mechanism as Step 4 of the proof above, applied to measures rather than normalized probability vectors). But then is either (if ) or (if ) — it can never equal . Hence no probability distribution stationary for this chain exists. This matches part (c) of the theorem exactly: the chain is irreducible but not positive recurrent (it is null recurrent), so no stationary distribution exists, even though a stationary measure (the constant measure, unnormalizable) does exist. The moral: irreducibility guarantees uniqueness of a stationary measure up to scaling, but only positive recurrence guarantees that measure is summable to a finite total mass, which is what normalization to a probability distribution requires.
Scope, edge cases & common traps
| Situation | What happens | Why |
|---|---|---|
| Finite, irreducible chain | always exists, unique, all | finite + irreducible automatically positive recurrent |
| Infinite, irreducible, positive recurrent | exists, unique, | full theorem above |
| Infinite, irreducible, null recurrent | No stationary distribution (only a non-normalizable stationary measure) | mean return times infinite; see counterexample |
| Irreducible, transient | No stationary distribution | forces any candidate |
| Reducible (multiple communicating classes) | Stationary distributions form a whole simplex (convex combinations of per-class stationary vectors), or none, depending on classes | uniqueness genuinely fails; theorem's hypothesis is essential |
| Periodic but positive recurrent, irreducible | still exists and is unique | periodicity affects convergence , not existence/uniqueness of itself |
The mathematician behind it
Origins · 1 minAndrei Andreyevich Markov and how this was discovered
Markov introduced chains of dependent random variables around 1906, originally to extend the law of large numbers beyond independent trials — motivated in part by a dispute with Pavel Nekrasov over whether independence was necessary for statistical regularity. He first studied the vowel–consonant sequence of Pushkin's Eugene Onegin as an empirical example of a two-state dependent process, showing long-run frequencies stabilize even without independence. The general theory of invariant distributions for countable-state chains, including the existence/uniqueness dichotomy tied to recurrence type, was developed rigorously in the following decades by Kolmogorov, Doeblin, and Chung, building directly on Markov's chain concept.
Does every Markov chain have a stationary distribution?
No. Existence requires structural conditions. If the chain is reducible (has multiple communicating classes), stationary distributions may fail to be unique, or may only be supported on certain recurrent classes. If the chain is irreducible but transient or null recurrent — as with simple symmetric random walk on — no stationary probability distribution exists at all, only an unnormalizable stationary measure. The theorem in this article gives the precise dividing line: irreducible chains have a (unique) stationary distribution if and only if they are positive recurrent, i.e. mean return times to states are finite.
Is the same as saying is a left eigenvector of with eigenvalue 1?
Yes, exactly — with the extra normalization and nonnegativity constraints that make a probability distribution rather than an arbitrary eigenvector (which is only defined up to scalar multiples, and complex eigenvectors are excluded). Every stochastic matrix has as an eigenvalue (since makes a right eigenvalue, hence also a left eigenvalue by matching characteristic polynomials), so the existence of some left eigenvector for eigenvalue is automatic in finite dimensions; the content of the theorem is that, for irreducible positive recurrent chains, this eigenvector can be chosen nonnegative and is then unique up to scaling.
Does stationarity mean the chain stops changing?
No — individual sample paths keep moving between states randomly forever; stationarity is a statement purely about the distribution (the law) of , not about individual trajectories freezing. If , then for every , meaning the marginal probabilities do not change with , even though itself is still a genuinely random, moving quantity.
Why does aperiodicity not appear anywhere in the existence/uniqueness proof?
Because the renewal argument used in the proof — counting expected visits to each state during one excursion between visits to a fixed reference state — never invokes any limiting behavior of ; it works directly with expectations under the chain's law, which are well-defined regardless of period. Periodicity only becomes relevant when asking whether itself converges to as — that is a separate, stronger statement (related to the Ergodic Theorem for Markov Chains) requiring aperiodicity to rule out permanent oscillation, such as a chain alternating deterministically between two states.
How is the stationary distribution computed in practice for a large finite chain?
For small finite chains, solve the linear system , directly (as in the worked examples), noting the balance equations are linearly dependent so one equation is always redundant and is replaced by the normalization condition. For very large chains (e.g. billions of states, as in PageRank), direct linear algebra is infeasible, so one instead exploits the Ergodic Theorem for Markov Chains-type convergence and iterates from an arbitrary starting vector (power iteration), which converges to whenever the chain is irreducible, positive recurrent, and aperiodic.
What is the relationship between a stationary distribution and reversibility / detailed balance?
Detailed balance, for all , is a sufficient but not necessary condition for to be stationary: summing the detailed balance equation over immediately gives , which is exactly . Not every stationary chain satisfies detailed balance — Example 1 in this article (the weather chain) is stationary but not reversible, since e.g. in general. Detailed balance is a convenient shortcut, always valid for birth–death chains, but stationarity itself is the more general and fundamental property.
Can a chain have infinitely many stationary distributions?
Yes, but only if it fails irreducibility. If a chain has two or more distinct closed communicating classes, each positive recurrent class has its own stationary distribution supported on that class, and any convex combination of these is also stationary for the whole chain — giving a whole simplex, hence infinitely many, of stationary distributions. Irreducibility is precisely the hypothesis that rules this out and forces uniqueness, as shown in the theorem's proof.