Tutorials › Linear Algebra › Convergence and Periodicity in Markov Chains

Applications of Diagonalization · Tutorial 591 of 1000

Convergence and Periodicity in Markov Chains

Relate the second eigenvalue of a two-state transition matrix to convergence, persistent oscillation, and the exceptional identity chain.

Intermediate 10 min read

What You'll Learn

  • Write the transition matrix and probability-state iteration using the column-vector convention.
  • Find the two eigenvalues of a general two-state transition matrix, counting multiplicity.
  • Derive an exact formula for every iterate when a stationary distribution is unique.
  • Explain why a positive two-state chain converges to its stationary distribution.
  • Recognise the eigenvalue negative one as the source of alternating two-step oscillation.
  • Handle the identity matrix, where both eigenvalues are one and every probability vector is stationary.

Eigenvalues and Long-Term Markov Iteration

A Markov transition matrix describes how a probability distribution changes one step at a time. Its eigenvalues help distinguish two kinds of long-term behaviour: a component of the distribution may decay, or it may persist and change sign on each step. In a two-state chain, the calculation is especially explicit. One eigenvalue is always \(1\); the other can be anywhere from \(-1\) to \(1\), including the exceptional cases where it equals \(1\) or \(-1\).

We use column probability vectors. A two-state probability vector has the form \(\mathbf{x}=(q,1-q)^{\top}\), where \(0\le q\le1\). Let \(a\) be the probability of moving from state 1 to state 1, and \(b\) the probability of moving from state 2 to state 1. The transition matrix is column-stochastic: each column sums to \(1\), and its entries are nonnegative.

$$ \mathbf{P}= \begin{bmatrix} a&b\\ 1-a&1-b \end{bmatrix}, \qquad 0\le a,b\le1, \qquad \mathbf{x}_{k+1}=\mathbf{P}\mathbf{x}_k. $$

Here \(\mathbf{x}_k\) is the probability distribution after \(k\) transitions, with \(\mathbf{x}_0\) the initial distribution. A stationary distribution is a probability vector \(\boldsymbol{\pi}\) satisfying \(\mathbf{P}\boldsymbol{\pi}=\boldsymbol{\pi}\). We will identify both the eigenvalues and the exact iteration formula, then use them to distinguish convergence from oscillation.

The Two Eigenvalues

An eigenvalue of \(\mathbf{P}\) is a scalar \(\lambda\) for which there is a nonzero vector \(\mathbf{v}\) satisfying \(\mathbf{P}\mathbf{v}=\lambda\mathbf{v}\). The eigenvalue \(1\) is present because \(\mathbf{P}\) preserves total probability. The second eigenvalue, counted with multiplicity, is \(a-b\). The phrase “counted with multiplicity” matters: for the identity matrix both eigenvalues are \(1\), so there is no distinct second value.

Theorem: For \(\mathbf{P}=\begin{bmatrix}a&b\\1-a&1-b\end{bmatrix}\), where \(0\le a,b\le1\), the eigenvalues, counted with algebraic multiplicity, are \(1\) and \(\lambda=a-b\). In particular, \(-1\le\lambda\le1\). The value \(\lambda=1\) occurs exactly when \(\mathbf{P}=\mathbf{I}_2\), and \(\lambda=-1\) occurs exactly when \(\mathbf{P}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\).

Proof. The characteristic polynomial, using \(t\) as its variable, is

$$ \begin{aligned} \det(\mathbf{P}-t\mathbf{I}_2) &=(a-t)(1-b-t)-b(1-a)\\ &=t^2-(1+a-b)t+(a-b)\\ &=(t-1)(t-(a-b)). \end{aligned} $$

Thus the eigenvalues are \(1\) and \(a-b\), with a repeated root when \(a-b=1\). Since \(a,b\in[0,1]\), their difference lies in \([-1,1]\). If \(a-b=1\), then \(a=1\) and \(b=0\), because \(a\le1\) and \(b\ge0\); substitution gives \(\mathbf{P}=\mathbf{I}_2\). If \(a-b=-1\), then \(a=0\) and \(b=1\), giving the stated alternating matrix. \(\square\)

One can also see the role of the second eigenvalue directly. The vector \((1,-1)^{\top}\) is an eigenvector, since

$$ \mathbf{P} \begin{bmatrix}1\\-1\end{bmatrix} = \begin{bmatrix}a-b\\b-a\end{bmatrix} =(a-b)\begin{bmatrix}1\\-1\end{bmatrix}. $$

This direction changes the balance between the two state probabilities while preserving their sum. When \(|a-b|<1\), its contribution shrinks with each iteration. When \(a-b=-1\), it changes sign but does not shrink. When \(a-b=1\), the matrix is the identity and the distribution does not change at all.

Exact Iteration and Convergence

To derive the iteration, write \(\mathbf{x}_k=(q_k,1-q_k)^{\top}\). The first component after one step is

$$ q_{k+1}=a q_k+b(1-q_k)=b+(a-b)q_k. $$

When \(1-a+b>0\), the fixed value of this scalar recurrence is \(q_*=\dfrac{b}{1-a+b}\). The resulting stationary probability vector is \(\boldsymbol{\pi}=(q_*,1-q_*)^{\top}\). The denominator is positive in this case, so the formula is defined. Subtracting the fixed-point equation \(q_*=b+(a-b)q_*\) from the recurrence gives \(q_{k+1}-q_*=(a-b)(q_k-q_*)\). Repeating this relation yields an exact expression for every iterate.

Theorem: For the two-state transition matrix above, if \(1-a+b>0\), there is a unique stationary distribution \(\boldsymbol{\pi}=\left(\dfrac{b}{1-a+b},\dfrac{1-a}{1-a+b}\right)^{\top}\), and for every probability vector \(\mathbf{x}_0\), \(\mathbf{x}_k=\boldsymbol{\pi}+(a-b)^k(\mathbf{x}_0-\boldsymbol{\pi})\). If \(|a-b|<1\), then \(\mathbf{x}_k\) converges to \(\boldsymbol{\pi}\). If \(a-b=-1\), the distributions alternate between \(\mathbf{x}_0\) and \(\mathbf{x}_1\), unless \(\mathbf{x}_0=\boldsymbol{\pi}\), in which case they are constant.

Proof. Put \(d=1-a+b\), and assume \(d>0\). The equation for a stationary first component is \(q=b+(a-b)q\), or \(dq=b\), so its only solution is \(q=b/d\). This value lies in \([0,1]\): \(b\ge0\), and \(d-b=1-a\ge0\). The second component is \(1-q=(1-a)/d\), so the vector stated in the theorem is a probability vector. The scalar fixed-point equation shows that \(\mathbf{P}\boldsymbol{\pi}=\boldsymbol{\pi}\). Conversely, every stationary probability vector must have first component solving \(dq=b\); since \(d>0\), this solution is unique.

For any initial probability vector, subtract the fixed-point equation from the first-component recurrence. With \(\lambda=a-b\), this gives \(q_{k+1}-q_*=\lambda(q_k-q_*)\). Induction on \(k\) gives \(q_k-q_*=\lambda^k(q_0-q_*)\): it holds at \(k=0\), and multiplying the equation at step \(k\) by \(\lambda\) gives the equation at step \(k+1\). The second component is one minus the first, so the vector formula follows. If \(|\lambda|<1\), then \(\lambda^k\to0\), and the formula gives convergence to \(\boldsymbol{\pi}\). If \(\lambda=-1\), then \(\mathbf{x}_k=\boldsymbol{\pi}+(-1)^k(\mathbf{x}_0-\boldsymbol{\pi})\), which alternates between \(\mathbf{x}_0\) and \(\mathbf{x}_1\). It is constant precisely when \(\mathbf{x}_0=\boldsymbol{\pi}\). \(\square\)

It remains to account for the excluded case \(1-a+b=0\). Both terms \(1-a\) and \(b\) are nonnegative, and their sum is zero only if \(a=1\) and \(b=0\). Then \(\mathbf{P}=\mathbf{I}_2\), and every probability vector is stationary. This is exactly the repeated-eigenvalue case: both eigenvalues are \(1\). Thus the stationary formula with denominator \(1-a+b\) must not be used for the identity matrix.

Worked Iterations

Worked Example: A Positive Chain Converges

Consider the positive transition matrix \(\mathbf{P}=\begin{bmatrix}3/4&1/2\\1/4&1/2\end{bmatrix}\), whose entries are all strictly positive. Here \(a=3/4\), \(b=1/2\), and \(\lambda=a-b=1/4\). The denominator is \(1-a+b=3/4\), so the stationary distribution is \(\boldsymbol{\pi}=(2/3,1/3)^{\top}\). Start from \(\mathbf{x}_0=(1,0)^{\top}\). The exact formula gives

$$ \mathbf{x}_k= \begin{bmatrix}2/3\\1/3\end{bmatrix} +\left(\frac14\right)^k \begin{bmatrix}1/3\\-1/3\end{bmatrix}. $$

At \(k=1\), this is \((3/4,1/4)^{\top}\), and direct multiplication confirms it:

$$ \mathbf{P}\mathbf{x}_0= \begin{bmatrix}3/4&1/2\\1/4&1/2\end{bmatrix} \begin{bmatrix}1\\0\end{bmatrix} = \begin{bmatrix}3/4\\1/4\end{bmatrix}. $$

At \(k=2\), the formula gives \((11/16,5/16)^{\top}\). Multiplication checks the same result:

$$ \mathbf{P}\mathbf{x}_1= \begin{bmatrix} (3/4)(3/4)+(1/2)(1/4)\\ (1/4)(3/4)+(1/2)(1/4) \end{bmatrix} = \begin{bmatrix}11/16\\5/16\end{bmatrix}. $$

Because the factor \((1/4)^k\) tends to zero, the distributions converge to \((2/3,1/3)^{\top}\), as the theorem predicts. The entries of \(\boldsymbol{\pi}\) sum to \(1\), and direct multiplication gives \(\mathbf{P}\boldsymbol{\pi}=(2/3,1/3)^{\top}\), confirming stationarity.

Worked Example: A Two-State Alternating Chain

Let \(\mathbf{P}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\). This chain moves from either state to the other with probability \(1\). Its eigenvalues are \(1\) and \(-1\); the stationary distribution is \(\boldsymbol{\pi}=(1/2,1/2)^{\top}\). Starting from \(\mathbf{x}_0=(1,0)^{\top}\), the exact formula gives \(\mathbf{x}_k=\boldsymbol{\pi}+(-1)^k(1/2,-1/2)^{\top}\). Thus even iterates equal \((1,0)^{\top}\), and odd iterates equal \((0,1)^{\top}\).

Direct multiplication verifies the first two steps:

$$ \mathbf{P}\begin{bmatrix}1\\0\end{bmatrix} =\begin{bmatrix}0\\1\end{bmatrix}, \qquad \mathbf{P}\begin{bmatrix}0\\1\end{bmatrix} =\begin{bmatrix}1\\0\end{bmatrix}. $$

The distribution does not converge from this initial state. It has period two: after each pair of transitions it returns to its starting distribution. The stationary distribution itself is an exception to the oscillation, since \(\mathbf{P}(1/2,1/2)^{\top}=(1/2,1/2)^{\top}\).

Worked Example: The Identity Chain Has a Repeated Eigenvalue

For \(a=1\) and \(b=0\), the transition matrix is \(\mathbf{P}=\begin{bmatrix}1&0\\0&1\end{bmatrix}=\mathbf{I}_2\). The eigenvalue formula gives \(1\) and \(a-b=1\), so the eigenvalue \(1\) has multiplicity two. For any initial distribution \(\mathbf{x}_0=(q,1-q)^{\top}\), multiplication gives

$$ \mathbf{P}\mathbf{x}_0= \begin{bmatrix}1&0\\0&1\end{bmatrix} \begin{bmatrix}q\\1-q\end{bmatrix} = \begin{bmatrix}q\\1-q\end{bmatrix} =\mathbf{x}_0. $$

Every initial distribution is stationary, and each iteration remains equal to that initial distribution. There is no unique stationary distribution and no “other eigenvalue” distinct from \(1\). The formula involving division by \(1-a+b\) is inapplicable because that denominator is zero.

Positive Chains and the Unit Circle

A two-state transition matrix is positive when every entry is strictly positive. In the parametrization used here, this means \(0<a<1\) and \(0<b<1\). Consequently \(-1<a-b<1\), and \(1-a+b>0\). The convergence theorem therefore applies: every initial probability vector converges to the unique stationary distribution. The second eigenvalue is strictly inside the unit circle, so its iterated contribution vanishes.

The two boundary values of the interval \([-1,1]\) explain the exceptional behaviour. At \(1\), the matrix is the identity, and every distribution is fixed. At \(-1\), the matrix swaps the two states, so any nonstationary initial distribution oscillates with period two. Eigenvalues on the unit circle do not decay under taking powers: the value \(1\) preserves a component, while \(-1\) reverses its sign at each step. For a positive two-state chain, neither boundary value occurs for the second eigenvalue.

Common pitfall: Do not claim that every two-state chain has a distinct eigenvalue “other than \(1\).” For \(a=1,b=0\), the calculation gives \(\lambda=a-b=1\), so both eigenvalues are \(1\). The correct statement is that the second eigenvalue, counted with multiplicity, is \(a-b\); it equals \(1\) exactly for \(\mathbf{P}=\mathbf{I}_2\), and otherwise is distinct from \(1\).

A related error is to use the stationary formula \(\boldsymbol{\pi}=(b/(1-a+b),(1-a)/(1-a+b))^{\top}\) for the identity matrix. Substituting \(a=1,b=0\) produces division by zero, not a stationary distribution. The correction is to treat that case separately: \(\mathbf{P}=\mathbf{I}_2\), so every probability vector is stationary. Checking the denominator before using the formula prevents this mistake.

Check Your Understanding

Use the column-vector convention and justify each conclusion from the eigenvalue or iteration formula.

  1. For \(a=2/3\) and \(b=1/6\), find the two eigenvalues and the stationary distribution. Does every initial distribution converge?
  2. For which values of \(a,b\in[0,1]\) does the second eigenvalue equal \(1\)? What is the corresponding matrix?
  3. Starting with \(\mathbf{x}_0=(1,0)^{\top}\), find \(\mathbf{x}_1\) and \(\mathbf{x}_2\) for the alternating matrix \(\begin{bmatrix}0&1\\1&0\end{bmatrix}\).
  4. Explain why the identity matrix has no unique stationary distribution, despite having eigenvalue \(1\).
  5. For a positive two-state chain, explain why the second eigenvalue cannot equal either \(1\) or \(-1\).

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon