Detailed Balance and Reversibility

Suppose a chemist watches a molecule hop between conformational states. Or an analyst watches a random walk on a graph. Often the process, filmed and played backward, looks statistically identical to forward play. This time-symmetry is not a coincidence. It is a structural property called reversibility. It is the single most useful shortcut for finding a stationary distribution of a Markov chain by hand. Instead of solving a large linear system of global balance equations, reversibility offers an alternative. It lets us solve a much smaller, decoupled system of local, pairwise equations: the detailed balance equations. The idea matters because most Markov chains from physical models are reversible. This includes random walks on graphs and networks, birth-death queues, the Ehrenfest urn. It also includes the Metropolis-Hastings algorithm at the heart of modern computational statistics. These chains are reversible with respect to their stationary distributions. Recognizing this fact turns an intractable eigenvalue-style problem into simple algebra. Guess a candidate distribution, check that flow balances across every single edge, and you are done. Reversibility is also the conceptual bridge to statistical mechanics. There, detailed balance is the microscopic mechanism that guarantees convergence to the Boltzmann distribution. The big picture is this: stationarity is a global balance condition. Total flow into a state equals total flow out. But detailed balance is a much stronger, local condition. Flow across each individual link balances in both directions. Every chain satisfying detailed balance is stationary with respect to that measure. But not every stationary chain satisfies detailed balance. The article makes this hierarchy completely precise. It proves the key theorem in both directions where it holds. It shows exactly where the implication breaks. This article defines detailed balance and reversibility rigorously. It proves that detailed balance implies stationarity. It characterizes reversibility via the Kolmogorov cycle condition. It works through two asymmetric examples to show the method in action: a random walk on a weighted graph and a birth-death chain with unequal rates. It closes by placing detailed balance in its role as the analytic engine. This engine drives behind the ergodic theorem and behind Markov chain Monte Carlo.

Key takeaways
  • A chain is reversible with respect to π\pi if (X0,…,Xn)(X_0,\dots,X_n) and (Xn,…,X0)(X_n,\dots,X_0) have the same law when X0∼πX_0\sim\pi.
  • Detailed balance: πipij=πjpji\pi_i p_{ij} = \pi_j p_{ji} for all states i,ji,j — flow across each edge balances in both directions.
  • Detailed balance ⇒\Rightarrow π\pi is stationary, but the converse is false in general.
  • A stationary chain is reversible iff it satisfies the Kolmogorov cycle condition: products of transition probabilities around any cycle equal the reverse products.
  • Detailed balance turns solving πP=π\pi P=\pi (a full linear system) into solving n−1n-1 decoupled two-term equations.
  • Random walks on weighted graphs, birth-death chains, and Metropolis-Hastings samplers are all reversible by construction.
  • Key idea: local, edge-by-edge balance is a sufficient (not necessary) engine for global stationarity, and it is exactly the algebraic signature of time-reversal symmetry.

Where this lives today

Detailed balance is the design principle behind essentially all Markov chain Monte Carlo algorithms — Metropolis–Hastings, Gibbs sampling, and their descendants are constructed so that a target distribution π\pi (often a Bayesian posterior or a statistical-mechanics Boltzmann distribution known only up to normalization) satisfies detailed balance with the proposed transition kernel, guaranteeing π\pi is stationary without ever needing to normalize it. In statistical physics, detailed balance is the microscopic reversibility condition satisfied by equilibrium thermodynamic systems, and its failure is precisely the signature of nonequilibrium steady states with sustained probability currents (as in the counterexample's directed cycle). In electrical network theory, reversible random walks on weighted graphs correspond exactly to random walks on resistor networks, where πipij\pi_i p_{ij} plays the role of current and detailed balance is Kirchhoff's current law applied edge-by-edge in equilibrium — this correspondence underlies fast algorithms for effective resistance and spanning-tree counting. In queueing theory, birth-death chains modeling queue lengths are reversible by the tree-graph argument above, giving product-form stationary distributions (as in Jackson networks) essentially for free. In genetics, reversible substitution models of DNA evolution (Jukes–Cantor, HKY, GTR) are built so that the stationary nucleotide frequencies satisfy detailed balance with the substitution rate matrix, which is what allows likelihood computations on phylogenetic trees to be rerooted arbitrarily. The concept sets up the machinery for proving the Ergodic Theorem for Markov Chains, where reversibility (via the spectral theory of self-adjoint operators on ℓ2(π)\ell^2(\pi)) gives sharp, real-eigenvalue convergence-rate bounds unavailable for general non-reversible chains.

Ask the tutor: Can you show me why a chain being reversible forces its transition matrix to have only real eigenvalues?

DefinitionDetailed balance and reversibility

Let (Xn)n≥0(X_n)_{n\ge 0} be a Markov chain on a countable state space SS with transition matrix P=(pij)i,j∈SP = (p_{ij})_{i,j\in S}, and let π=(πi)i∈S\pi = (\pi_i)_{i\in S} be a probability distribution on SS.

Detailed balance. The pair (π,P)(\pi, P) is said to satisfy detailed balance (equivalently, π\pi and PP are in detailed balance) if

πi pij  =  πj pjifor all i,j∈S.\pi_i \, p_{ij} \;=\; \pi_j \, p_{ji} \qquad \text{for all } i,j \in S.

Reversibility. Suppose π\pi is a stationary distribution for PP and X0∼πX_0 \sim \pi. The chain is reversible (with respect to π\pi) if for every n≥1n \ge 1 the reversed sequence (Xn,Xn−1,…,X0)(X_n, X_{n-1}, \dots, X_0) has the same joint distribution as the forward sequence (X0,X1,…,Xn)(X_0, X_1, \dots, X_n):

P(X0=i0,…,Xn=in)  =  P(X0=in,…,Xn=i0)for all i0,…,in∈S, n≥1.\mathbb{P}(X_0 = i_0, \dots, X_n = i_n) \;=\; \mathbb{P}(X_0 = i_n, \dots, X_n = i_0) \qquad \text{for all } i_0,\dots,i_n \in S, \, n\ge 1.

Equivalently, running π\pi-stationary chain (X0,…,Xn)(X_0,\dots,X_n) backward — i.e. setting Yk=Xn−kY_k = X_{n-k} — produces a process with the same law as (X0,…,Xn)(X_0,\dots,X_n) itself; in particular (Yk)(Y_k) is again a Markov chain with transition matrix PP, started from π\pi.

Intuition

Picture a Markov chain as water flowing along the directed edges of a weighted graph, where the edge from ii to jj carries flow πipij\pi_i p_{ij}: the long-run fraction of time-steps that are transitions from ii to jj. Stationarity of π\pi says exactly that, at every node jj, total inflow equals total outflow:

∑iπipij=πj=πj∑ipji=∑iπjpji.\sum_i \pi_i p_{ij} = \pi_j = \pi_j \sum_i p_{ji} = \sum_i \pi_j p_{ji}.

This is a conservation law summed over all neighbors — it says nothing about any individual edge. Detailed balance is the much stronger statement that this conservation holds edge by edge: the flow from ii to jj exactly cancels the flow from jj to ii, for every single pair (i,j)(i,j), not just in aggregate. Think of a network of rooms connected by doors, with πipij\pi_i p_{ij} people per minute walking through the door from room ii to room jj. Stationarity says each room's population is stable. Detailed balance says something much stronger: through every single door, the crowd walking one way exactly equals the crowd walking the other way — no door has a net current. A chain can have stable room populations while doors carry net one-way traffic (think of a circular corridor with everyone shuffling clockwise); that chain is stationary but not reversible.

Figure
Detailed balance: flow across each edge balances in both directions
i j k π_i p_ij π_j p_ji equal flows ⇒ no net current on edge (i,j) π_j p_jk
TheoremDetailed balance implies stationarity; and the reversibility criterion

Let P=(pij)i,j∈SP=(p_{ij})_{i,j\in S} be the transition matrix of a Markov chain on a countable state space SS, and let π=(πi)i∈S\pi=(\pi_i)_{i \in S} be a probability distribution.

(a) Detailed balance ⇒\Rightarrow stationarity. If

πipij=πjpjifor all i,j∈S,\pi_i p_{ij} = \pi_j p_{ji} \qquad \text{for all } i, j \in S,

then π\pi is a stationary distribution for PP, i.e. πP=π\pi P = \pi.

(b) Detailed balance ⇒\Rightarrow reversibility. If in addition π\pi is a stationary distribution and (π,P)(\pi, P) satisfies detailed balance, and X0∼πX_0 \sim \pi, then the chain (Xn)n≥0(X_n)_{n\ge0} is reversible with respect to π\pi in the sense of the definition above.

(c) Converse (Kolmogorov's criterion). Conversely, suppose π\pi is a stationary distribution with πi>0\pi_i > 0 for all i∈Si \in S, and pij>0  ⟺  pji>0p_{ij} > 0 \iff p_{ji} > 0 for all i,ji,j. Then the π\pi-stationary chain is reversible if and only if (π,P)(\pi,P) satisfies detailed balance.

Proof

Proof of (a). Fix j∈Sj \in S. Summing the detailed balance equation over ii,

∑i∈Sπipij  =  ∑i∈Sπjpji  =  πj∑i∈Spji  =  πj⋅1  =  πj,\sum_{i\in S} \pi_i p_{ij} \;=\; \sum_{i\in S} \pi_j p_{ji} \;=\; \pi_j \sum_{i\in S} p_{ji} \;=\; \pi_j \cdot 1 \;=\; \pi_j,

where we used that πj\pi_j does not depend on the summation index ii and that ∑ipji=1\sum_i p_{ji}=1 because PP is a stochastic matrix (rows sum to one). This holds for every j∈Sj\in S, so πP=π\pi P = \pi; since π\pi is a probability distribution this exactly says π\pi is a stationary distribution for PP. (Interchanging sum and the finite/countable index is justified since all terms are nonnegative, so Tonelli's theorem for series applies without any regularity assumption.)

Proof of (b). Assume π\pi is stationary and satisfies detailed balance with PP; let X0∼πX_0 \sim \pi. We must show that for every n≥1n \ge 1 and every choice of states i0,…,ini_0,\dots,i_n,

P(X0=i0,…,Xn=in)=P(X0=in,…,Xn=i0).\mathbb{P}(X_0=i_0,\dots,X_n=i_n) = \mathbb{P}(X_0=i_n,\dots,X_n=i_0).

By the Markov property, the left side factors as

P(X0=i0,…,Xn=in)=πi0 pi0i1 pi1i2⋯pin−1in.\mathbb{P}(X_0=i_0,\dots,X_n=i_n) = \pi_{i_0}\, p_{i_0 i_1}\, p_{i_1 i_2}\cdots p_{i_{n-1} i_n}.

Apply detailed balance to the first factor: πi0pi0i1=πi1pi1i0\pi_{i_0} p_{i_0 i_1} = \pi_{i_1} p_{i_1 i_0}. Substitute:

πi0pi0i1pi1i2⋯pin−1in=πi1pi1i0 pi1i2⋯pin−1in.\pi_{i_0} p_{i_0 i_1} p_{i_1 i_2}\cdots p_{i_{n-1}i_n} = \pi_{i_1} p_{i_1 i_0}\, p_{i_1 i_2} \cdots p_{i_{n-1} i_n}.

This does not yet have the shape we want; instead we proceed by a direct chain of substitutions, applying detailed balance successively to convert the whole product. Rewrite the product by pulling π\pi through step by step: define Qk=πi0pi0i1⋯pik−1ikQ_k = \pi_{i_0} p_{i_0i_1}\cdots p_{i_{k-1}i_k} for 0≤k≤n0\le k\le n (with Q0=πi0Q_0=\pi_{i_0}). We claim

Qn=πin pinin−1 pin−1in−2⋯pi1i0.Q_n = \pi_{i_n} \, p_{i_n i_{n-1}} \, p_{i_{n-1} i_{n-2}} \cdots p_{i_1 i_0}.

We prove this by induction on nn. For n=1n=1: Q1=πi0pi0i1=πi1pi1i0Q_1 = \pi_{i_0}p_{i_0i_1} = \pi_{i_1}p_{i_1i_0} by detailed balance directly — this is the base case. Assume the claim holds for products of length n−1n-1, i.e. for any states j0,…,jn−1j_0,\dots,j_{n-1},

πj0pj0j1⋯pjn−2jn−1=πjn−1pjn−1jn−2⋯pj1j0.\pi_{j_0}p_{j_0j_1}\cdots p_{j_{n-2}j_{n-1}} = \pi_{j_{n-1}}p_{j_{n-1}j_{n-2}}\cdots p_{j_1j_0}.

Apply this inductive hypothesis to the states j0,…,jn−1=i0,…,in−1j_0,\dots,j_{n-1} = i_0,\dots,i_{n-1}, then multiply both sides by pin−1inp_{i_{n-1}i_n}:

πi0pi0i1⋯pin−2in−1 pin−1in=πin−1pin−1in−2⋯pi1i0 pin−1in.\pi_{i_0}p_{i_0i_1}\cdots p_{i_{n-2}i_{n-1}}\,p_{i_{n-1}i_n} = \pi_{i_{n-1}}p_{i_{n-1}i_{n-2}}\cdots p_{i_1i_0}\,p_{i_{n-1}i_n}.

The left side is exactly QnQ_n. On the right side, use detailed balance on the pair (in−1,in)(i_{n-1},i_n) in the last factor written, i.e. rearrange: pin−1inp_{i_{n-1}i_n} commutes with the rest as a scalar, so the right side equals

(πin−1pin−1in) pin−1in−2⋯pi1i0=(πinpinin−1) pin−1in−2⋯pi1i0,\big(\pi_{i_{n-1}} p_{i_{n-1} i_n}\big)\, p_{i_{n-1}i_{n-2}}\cdots p_{i_1 i_0} = \big(\pi_{i_n} p_{i_n i_{n-1}}\big)\, p_{i_{n-1}i_{n-2}}\cdots p_{i_1 i_0},

using detailed balance πin−1pin−1in=πinpinin−1\pi_{i_{n-1}}p_{i_{n-1}i_n} = \pi_{i_n}p_{i_n i_{n-1}} in the last step. This equals πin pinin−1pin−1in−2⋯pi1i0\pi_{i_n}\,p_{i_ni_{n-1}}p_{i_{n-1}i_{n-2}}\cdots p_{i_1i_0}, completing the induction. Hence

P(X0=i0,…,Xn=in)=Qn=πinpinin−1⋯pi1i0=P(X0=in,X1=in−1,…,Xn=i0),\mathbb{P}(X_0=i_0,\dots,X_n=i_n) = Q_n = \pi_{i_n}p_{i_ni_{n-1}}\cdots p_{i_1i_0} = \mathbb{P}(X_0=i_n,X_1=i_{n-1},\dots,X_n=i_0),

where the last equality is again the Markov chain factorization, this time read for the sequence in,in−1,…,i0i_n, i_{n-1},\dots,i_0 started from stationarity (π\pi stationary is what lets X0=inX_0=i_n have probability πin\pi_{i_n} regardless of nn, by part (a)). This proves the required equality of joint distributions for every nn, so the chain is reversible.

Proof of (c). (⇒\Rightarrow) Suppose the π\pi-stationary chain is reversible with πi>0\pi_i>0 for all ii. Apply the definition of reversibility with n=1n=1 and states i0=i, i1=ji_0=i,\ i_1=j:

P(X0=i,X1=j)=P(X0=j,X1=i).\mathbb{P}(X_0=i,X_1=j) = \mathbb{P}(X_0=j,X_1=i).

The left side is πipij\pi_i p_{ij} and the right side is πjpji\pi_j p_{ji} (Markov property applied to a single step, using stationarity so that X0X_0 and X1X_1 both have marginal π\pi). Hence πipij=πjpji\pi_i p_{ij}=\pi_j p_{ji} for all i,ji,j, which is exactly detailed balance. (⇐\Leftarrow) This direction is exactly part (b): detailed balance together with stationarity implies reversibility, and we do not need the positivity/support hypothesis for this direction — it was only used in the forward direction to legitimately divide and recover the equality πipij=πjpji\pi_i p_{ij}=\pi_j p_{ji} from a probability statement about single transitions (the support condition pij>0  ⟺  pji>0p_{ij}>0 \iff p_{ji}>0 guarantees the equation πipij=πjpji\pi_i p_{ij}=\pi_j p_{ji} is not vacuous when one side is a positive number and the other is forced to be 00 from a missing edge; if pij=0p_{ij}=0 but pji>0p_{ji}>0 with πi,πj>0\pi_i,\pi_j>0, reversibility at n=1n=1 would force πjpji=0\pi_j p_{ji}=0, a contradiction — the support hypothesis exists precisely to rule out this asymmetric-edge pathology from ever being consistent with reversibility, though in fact the argument above shows any violation of it already contradicts reversibility directly). ■\blacksquare

∎

Worked examples

Example 1: Random walk on a weighted graph (asymmetric weights). Let GG be a finite connected graph on vertex set S={1,2,3,4}S=\{1,2,3,4\} with the following distinct positive edge weights wij=wjiw_{ij}=w_{ji}:

w12=3,w13=1,w23=2,w24=5,w34=4,w_{12}=3,\quad w_{13}=1,\quad w_{23}=2,\quad w_{24}=5,\quad w_{34}=4,

and no edge between 1,41,4 (so w14=0w_{14}=0). Define the weighted random walk: from state ii, jump to a neighbor jj with probability

pij=wijdi,di:=∑kwik.p_{ij} = \frac{w_{ij}}{d_i}, \qquad d_i := \sum_{k} w_{ik}.

Compute the vertex weights: d1=w12+w13=4d_1 = w_{12}+w_{13} = 4, d2=w12+w23+w24=10d_2 = w_{12}+w_{23}+w_{24} = 10, d3=w13+w23+w34=7d_3 = w_{13}+w_{23}+w_{34}=7, d4=w24+w34=9d_4 = w_{24}+w_{34}=9. Let W=∑idi=4+10+7+9=30W = \sum_i d_i = 4+10+7+9=30 (this double-counts each edge weight, consistent with W=2∑i<jwij=2(3+1+2+5+4)=30W = 2\sum_{i<j} w_{ij} = 2(3+1+2+5+4)=30).

Claim: πi=di/W\pi_i = d_i / W is stationary, and the walk is reversible with respect to π\pi. Check detailed balance directly: for any edge (i,j)(i,j),

πipij=diW⋅wijdi=wijW,πjpji=djW⋅wjidj=wjiW=wijW,\pi_i p_{ij} = \frac{d_i}{W}\cdot \frac{w_{ij}}{d_i} = \frac{w_{ij}}{W}, \qquad \pi_j p_{ji} = \frac{d_j}{W}\cdot\frac{w_{ji}}{d_j} = \frac{w_{ji}}{W} = \frac{w_{ij}}{W},

using symmetry wij=wjiw_{ij}=w_{ji}. The two sides are equal for every pair (i,j)(i,j) (trivially so when wij=0w_{ij}=0, since pij=pji=0p_{ij}=p_{ji}=0 too). So detailed balance holds for every edge weight, however asymmetric the weights themselves are — the symmetry needed is only wij=wjiw_{ij}=w_{ji}, not any relation between different edges' weights. By Theorem (a), π=(4/30,10/30,7/30,9/30)=(2/15,1/3,7/30,3/10)\pi = (4/30, 10/30, 7/30, 9/30) = (2/15, 1/3, 7/30, 3/10) is stationary. Numerically, π=(0.13‾,0.33‾,0.23‾3‾,0.3)\pi = (0.1\overline{3}, 0.3\overline{3}, 0.2\overline{3}\overline{3}, 0.3), and indeed 0.13‾+0.33‾+0.23‾+0.3=10.1\overline{3}+0.3\overline{3}+0.2\overline{3}+0.3 = 1 (check: 4/30+10/30+7/30+9/30=30/30=14/30+10/30+7/30+9/30 = 30/30=1 ✓). By Theorem (b), the chain is reversible with respect to π\pi. Note we found π\pi without solving the 4×44\times4 linear system πP=π\pi P=\pi directly — detailed balance reduced the problem to reading off vertex degrees.

Example 2: Birth-death chain with unequal, state-dependent rates. Let S={0,1,2,3}S=\{0,1,2,3\} be a birth-death chain (nearest-neighbor only) with transition probabilities

p0,1=1,p1,0=13, p1,2=23,p2,1=12, p2,3=13, p2,2=16,p3,2=1.p_{0,1}=1,\qquad p_{1,0}=\tfrac13,\ p_{1,2}=\tfrac23,\qquad p_{2,1}=\tfrac12,\ p_{2,3}=\tfrac13,\ p_{2,2}=\tfrac16,\qquad p_{3,2}=1.

(One checks each row sums to 11: row 22 gives 12+13+16=1\tfrac12+\tfrac13+\tfrac16=1 ✓.) Birth-death chains only have nonzero transition probability between adjacent states (or a self-loop), so any candidate stationary π\pi satisfying detailed balance need only satisfy the local equations along the path 0−1−2−30-1-2-3:

π0p01=π1p10,π1p12=π2p21,π2p23=π3p32.\pi_0 p_{01} = \pi_1 p_{10}, \qquad \pi_1 p_{12} = \pi_2 p_{21}, \qquad \pi_2 p_{23} = \pi_3 p_{32}.

(Self-loops like p22p_{22} trivially satisfy detailed balance with themselves and impose no constraint.) Solve sequentially, normalizing π0=1\pi_0=1 first and rescaling at the end: From the first equation: π0⋅1=π1⋅13⇒π1=3π0\pi_0\cdot 1 = \pi_1 \cdot \tfrac13 \Rightarrow \pi_1 = 3\pi_0. From the second: π1⋅23=π2⋅12⇒π2=43π1=4π0\pi_1 \cdot \tfrac23 = \pi_2 \cdot \tfrac12 \Rightarrow \pi_2 = \tfrac{4}{3}\pi_1 = 4\pi_0. From the third: π2⋅13=π3⋅1⇒π3=13π2=43π0\pi_2 \cdot \tfrac13 = \pi_3 \cdot 1 \Rightarrow \pi_3 = \tfrac13 \pi_2 = \tfrac43 \pi_0. So, taking π0=c\pi_0 = c, we get the unnormalized vector (c, 3c, 4c, 43c)\big(c,\ 3c,\ 4c,\ \tfrac43 c\big). Multiply through by 33 to clear fractions: proportional to (3,9,12,4)(3, 9, 12, 4), with sum 3+9+12+4=283+9+12+4=28. Hence

π=(328, 928, 1228, 428)=(328, 928, 37, 17).\pi = \left(\frac{3}{28},\ \frac{9}{28},\ \frac{12}{28},\ \frac{4}{28}\right) = \left(\frac{3}{28},\ \frac{9}{28},\ \frac{3}{7},\ \frac{1}{7}\right).

Verification of full stationarity at state 22 (a nontrivial check, using global balance ∑iπipi2=π2\sum_i \pi_i p_{i2}=\pi_2):

π1p12+π2p22+π3p32=928⋅23+1228⋅16+428⋅1=628+228+428=1228=π2.✓\pi_1 p_{12} + \pi_2 p_{22} + \pi_3 p_{32} = \frac{9}{28}\cdot\frac23 + \frac{12}{28}\cdot\frac16 + \frac{4}{28}\cdot 1 = \frac{6}{28} + \frac{2}{28} + \frac{4}{28} = \frac{12}{28} = \pi_2. \checkmark

The check succeeds, confirming detailed balance's local equations were sufficient to pin down the true global stationary distribution — this is guaranteed in general for any birth-death (nearest-neighbor path) chain, since the graph of allowed transitions is a tree (a path), and on a tree the Kolmogorov cycle condition of Theorem (c) is vacuous (there are no cycles), so every stationary birth-death chain is automatically reversible.

CounterexampleWhy stationarity alone does not imply reversibility

Detailed balance is a sufficient, not necessary, condition for stationarity, and the gap is exactly reversibility. Here is a stationary chain that is provably not reversible, showing the hypothesis of detailed balance in Theorem (b) cannot simply be replaced by stationarity. Let S={1,2,3}S=\{1,2,3\} arranged in a directed cycle, with

p12=p23=p31=1,p_{12}=p_{23}=p_{31}=1,

and all other entries of PP equal to 00 (a deterministic clockwise rotation). Check that π=(13,13,13)\pi = (\tfrac13,\tfrac13,\tfrac13) is stationary:

(πP)1=π3p31=13⋅1=13=π1,(\pi P)_1 = \pi_3 p_{31} = \tfrac13\cdot 1 = \tfrac13 = \pi_1,

and by the cyclic symmetry of the construction the same holds for coordinates 2,32,3. So πP=π\pi P = \pi and π\pi is a genuine stationary distribution. Now test detailed balance on the edge (1,2)(1,2):

π1p12=13⋅1=13,π2p21=13⋅0=0.\pi_1 p_{12} = \tfrac13 \cdot 1 = \tfrac13, \qquad \pi_2 p_{21} = \tfrac13 \cdot 0 = 0.

These are unequal, so (π,P)(\pi,P) does not satisfy detailed balance. And indeed the chain is not reversible: starting from stationarity, the forward path 1→2→3→1→⋯1\to2\to3\to1\to\cdots occurs with probability 11, while the reversed path 1→3→2→1→⋯1\to3\to2\to1\to\cdots — which is what the time-reversal would have to produce — has probability 00 under PP (since p13=0p_{13}=0). Concretely,

P(X0=1,X1=2,X2=3)=13⋅1⋅1=13,P(X0=3,X1=2,X2=1)=π3p32p21=13⋅0⋅0=0,\mathbb{P}(X_0=1,X_1=2,X_2=3) = \tfrac13\cdot1\cdot1 = \tfrac13, \qquad \mathbb{P}(X_0=3,X_1=2,X_2=1) = \pi_3 p_{32} p_{21} = \tfrac13\cdot 0\cdot 0 = 0,

so the reversed-sequence law and the forward-sequence law disagree — the defining equation of reversibility fails outright. This is the archetypal example of a chain with a nonzero "probability current" circulating around a cycle: stationary populations at each node are exactly balanced, but there is a directed flow of probability mass around the loop 1→2→3→11\to2\to3\to1 that has no counter-flow to cancel it, which is precisely what Kolmogorov's cycle condition in Theorem (c) detects and forbids for reversible chains.

Scope, edge cases & common traps

SituationWhat happens
(π,P)(\pi,P) satisfies detailed balanceπ\pi automatically stationary (Thm a); chain reversible (Thm b)
π\pi stationary, but chain not reversibleDetailed balance can fail on some edge (see counterexample); happens exactly when nonzero probability current circulates on some cycle
Chain lives on a tree (no cycles)Every stationary distribution automatically satisfies detailed balance — no cycle condition to check
Some πi=0\pi_i = 0 or asymmetric support (pij=0p_{ij}=0, pji>0p_{ji}>0)Kolmogorov's converse criterion (Thm c) requires positivity and matching support; without it the "only if" direction can fail vacuously or need care
Continuous-time chains (Markov jump processes)Same detailed balance equations hold with generator rates qijq_{ij}: πiqij=πjqji\pi_i q_{ij} = \pi_j q_{ji}; theorem and proof adapt essentially verbatim
Non-stationary π\piDetailed balance equations for a non-probability vector π\pi (allowing ∑πi≠1\sum \pi_i \ne 1 or even πi\pi_i not all positive) can still be solved and normalized afterward; the direction of implication (a) still holds for the normalized measure

The mathematician behind it

Origins · 1 minAndrei Andreyevich Markov and how this was discovered
AA
Andrei Andreyevich Markov
1856–1922 · Imperial St. Petersburg, chains and dependent trials

Markov introduced the chains that bear his name in 1906, originally to extend the law of large numbers to sequences of dependent trials — famously applying the theory to the alternation of vowels and consonants in Pushkin's Eugene Onegin. The formal theory of stationary and reversible measures on his chains was developed over subsequent decades by the Soviet and Western probability schools, notably by Andrei Kolmogorov, whose 1936 cycle criterion (used in Theorem c above) gave the complete combinatorial characterization of reversibility purely in terms of the transition graph, without ever needing to guess a candidate π\pi.

History
- 1906 — Markov defines chains of dependent trials and proves an ergodic-type theorem for them.
- 1931 — Kolmogorov's foundational paper on analytic methods in probability theory develops continuous-time Markov processes and their equilibrium equations.
- 1936 — Kolmogorov's cycle condition characterizes reversibility of a stationary chain purely via products of transition probabilities around cycles.
- 1953 — Metropolis, Rosenbluth, Rosenbluth, Teller, and Teller construct the Metropolis algorithm, engineering detailed balance by design to sample from a target Boltzmann distribution.
- 1970 — Hastings generalizes the Metropolis construction, giving the Metropolis–Hastings algorithm and cementing detailed balance as the standard design principle of Markov chain Monte Carlo.
Is every stationary Markov chain reversible?

No. Stationarity is a global balance condition (total inflow equals total outflow at each state), while reversibility requires the much stronger edge-by-edge detailed balance condition. The directed-cycle counterexample above gives an explicit finite chain that is stationary under the uniform distribution but carries a nonzero probability current around a cycle, so it fails reversibility completely: the forward and time-reversed path probabilities are not just unequal but can be 11 versus 00. Reversibility is precisely the extra structure that lets you replace the linear system πP=π\pi P=\pi with decoupled pairwise equations.

Why does detailed balance make finding π\pi easier?

The stationarity equation πP=π\pi P=\pi is a system of ∣S∣|S| linear equations coupling all states simultaneously, typically solved by matrix methods or an eigenvector computation. Detailed balance replaces this with (∣S∣2)\binom{|S|}{2} decoupled equations πipij=πjpji\pi_ip_{ij}=\pi_jp_{ji}, each involving only two unknowns' ratio πj/πi=pij/pji\pi_j/\pi_i = p_{ij}/p_{ji}. On chains whose transition graph is a tree (e.g. birth-death chains), these ratios can be chained together sequentially with no cycles to create inconsistency, giving π\pi up to normalization by simple multiplication along a path, as in the birth-death worked example.

Does detailed balance require the transition matrix to be symmetric?

No — that is a common confusion. Detailed balance requires πipij=πjpji\pi_ip_{ij}=\pi_jp_{ji}, which reduces to pij=pjip_{ij}=p_{ji} only in the special case πi=πj\pi_i=\pi_j for all i,ji,j, i.e. π\pi uniform. In general π\pi is non-uniform and PP itself is highly asymmetric (as in the birth-death example, where p01=1≠13=p10p_{01}=1\ne \tfrac13=p_{10}), while the weighted quantities πipij\pi_ip_{ij} and πjpji\pi_jp_{ji} still coincide.

How does the Kolmogorov cycle condition actually work?

For any finite sequence of states forming a cycle i0→i1→⋯→ik→i0i_0\to i_1\to\cdots\to i_k\to i_0 with all forward transition probabilities positive, the condition requires the product of forward probabilities around the cycle to equal the product of the corresponding backward probabilities:

pi0i1pi1i2⋯piki0=pi0ikpikik−1⋯pi1i0.p_{i_0i_1}p_{i_1i_2}\cdots p_{i_ki_0} = p_{i_0i_k}p_{i_ki_{k-1}}\cdots p_{i_1i_0}.

Kolmogorov proved that (under positivity/irreducibility assumptions) this holds for every cycle if and only if the chain is reversible with respect to some stationary π\pi, and one can then recover π\pi up to normalization by fixing πi0=1\pi_{i_0}=1 and using the ratios pij/pjip_{ij}/p_{ji} along any spanning tree of the graph. On a tree there are no cycles, so the condition is automatically satisfied — this is exactly why birth-death chains are always reversible.

Are continuous-time Markov chains reversible in the same sense?

Yes, with generator rates replacing transition probabilities. If Q=(qij)i≠jQ=(q_{ij})_{i\ne j} is the rate matrix (generator) of a continuous-time chain and π\pi is stationary, detailed balance reads πiqij=πjqji\pi_iq_{ij}=\pi_jq_{ji} for all i≠ji\ne j. The proof that this implies stationarity is the continuous-time analogue of Theorem (a): sum over ii and use ∑iqij=−qjj=∑k≠jqjk\sum_i q_{ij} = -q_{jj}=\sum_{k\ne j}q_{jk} (rows of QQ sum to zero), reproducing the global balance equation ∑iπiqij=0\sum_i\pi_iq_{ij}=0 for i≠ji\ne j. All results and proof techniques transfer essentially unchanged.

How is detailed balance used to design MCMC samplers?

Given a target distribution π\pi known only up to a normalizing constant (e.g. a Bayesian posterior), the Metropolis–Hastings algorithm proposes a move from ii to jj with probability qijq_{ij} and accepts it with probability αij=min⁡{1,πjqji/(πiqij)}\alpha_{ij}=\min\{1, \pi_jq_{ji}/(\pi_iq_{ij})\}. One can check directly that the resulting transition kernel pij=qijαijp_{ij}=q_{ij}\alpha_{ij} satisfies πipij=πjpji\pi_ip_{ij}=\pi_jp_{ji} by construction, for every pair i≠ji\ne j. By Theorem (a) this guarantees π\pi is stationary for the constructed chain — without ever needing to compute the normalizing constant of π\pi, since only the ratio πj/πi\pi_j/\pi_i enters the acceptance probability.

If a chain is reversible, does that make it converge faster to stationarity?

Reversibility does not by itself imply faster convergence, but it makes the rate of convergence analytically tractable. A reversible chain's transition matrix PP is self-adjoint on the Hilbert space ℓ2(π)\ell^2(\pi) with inner product ⟨f,g⟩π=∑iπifigi\langle f,g\rangle_\pi=\sum_i\pi_if_ig_i, so PP has a real spectrum and an orthogonal eigenbasis; convergence rates are then governed cleanly by the spectral gap. Non-reversible chains can have complex eigenvalues and lack this clean spectral picture, which is one reason reversibility is exploited so heavily in the proof machinery leading up to Ergodic Theorem for Markov Chains.

Before this

Where this leads