Documentation

CslibFrontier.Foundations.LinearAlgebra.Matrix.Stochastic

Stationary vectors of row-stochastic matrices #

Every real row-stochastic matrix M over a finite nonempty type has a stationary probability vector: p ᵥ* M = p with p ≥ 0 and ∑ i, p i = 1. In the language of Markov chains, every finite chain has a stationary distribution.

The proof is linear algebra. Since M *ᵥ 1 = 1, the matrix M - 1 is singular, so some nonzero v has v ᵥ* M = v. By the triangle inequality the entrywise absolute value |v| satisfies |v| ≤ |v| ᵥ* M, and both sides have the same total because the rows of M sum to 1. So |v| ᵥ* M = |v|, and |v| normalized is the stationary vector.

Stationary vectors are what the Blum–Mansour reduction from swap regret to external regret needs ([BM07a], §3).

Main definitions #

Main results #

References #

theorem Matrix.exists_vecMul_eq_self_of_mem_rowStochastic {n : Type u_1} [Fintype n] [DecidableEq n] [Nonempty n] {M : Matrix n n ℝ} (hM : M ∈ rowStochastic ℝ n) :
∃ (p : n → ℝ), (∀ (i : n), 0 ≤ p i) ∧ ∑ i : n, p i = 1 ∧ vecMul p M = p

Every real row-stochastic matrix over a finite nonempty type has a stationary probability vector p: p ᵥ* M = p, 0 ≤ p and ∑ i, p i = 1.

noncomputable def Matrix.stationaryVec {n : Type u_1} [Fintype n] [DecidableEq n] (M : Matrix n n ℝ) :
n → ℝ

A stationary probability vector of a row-stochastic matrix M, chosen by exists_vecMul_eq_self_of_mem_rowStochastic; 0 if M is not row-stochastic or n is empty.

theorem Matrix.stationaryVec_nonneg {n : Type u_1} [Fintype n] [DecidableEq n] [Nonempty n] {M : Matrix n n ℝ} (hM : M ∈ rowStochastic ℝ n) (i : n) :

The chosen stationary vector is nonnegative.

theorem Matrix.sum_stationaryVec {n : Type u_1} [Fintype n] [DecidableEq n] [Nonempty n] {M : Matrix n n ℝ} (hM : M ∈ rowStochastic ℝ n) :
∑ i : n, M.stationaryVec i = 1

The chosen stationary vector sums to 1.

The chosen stationary vector is stationary: stationaryVec M ᵥ* M = stationaryVec M.