Markov matrix, 又稱為轉移矩陣, 是用來描述 Markov chain 的轉變的矩陣.
矩陣裡每一個元素都代表機率, 因此是個介於 與 之間的實數, 並且 column sum 等於 .
Let be a Markov matrix, then and
對於 的 Markov matrix, 我們可以把他表示為
其中 .
對於 Markov matrix 我們最想知道的是在不斷的轉移之後, 會不會"收斂"到某個狀態去. 也就是我們想求
第一件重要的事就是 Markov matrix 他的 column sum 等於 . 因此,
也就是說 是 Markov matrix 的左 eigenvector, 並且 Markov matrix 的 eigenvalue 一定有一個是 .
接著我們看一下左 eigenvector 以及其相關性質.
以下是對 方陣左 eigenvector 的定義以及一些性質.
Definition:
Let satisfies
then is called the left eigenvector of that corresponds to the eigenvalue .
Remark:
Taking tranpose to each side of (8) we have . So the left eigenvector is also the eigenvector of .
Lemma 1: and share exactly the same eigenvalues.
pf: . So the roots are exactly the same.
Lemma 2: Let and be the right and left eigenvector of that corresponds to different eigenvalues, i.e.,
Then .
pf: and .
Therefore , and due to .
因此, 對一般 的 Markov matrix, 我們也知道它一定有一個 eigenvalue 是 .
Lemma 3: An Markov matrix has an eigenvalue and corresponding left eigenvector .
pf: Using (1) we have . Therefore, is the left eigenvector corresponds to eigenvalue , and Markov matrix has an eigenvalue .
利用 Lemma 2 我們可以推論一件有一點點神奇的事. 我們已經知道 (2) 的這個 矩陣他一定有個 eigenvalue 是 . 那假設他另一個 eigenvalue 不是 , 並且假設這個對應的 eigenvector 叫做 , 那根據 Lemma 2 我們有
也就是 . 然後就知道這個 eigenvector 的 basis 一定是 .
然後我們再反過來算一下它的 eigenvalue
因此知道 eigenvalue 是 , eigenvector 是 .
那這個推論的原始假設是"第二個 eigenvalue 不是 ". 因此只有 的時候推論才會錯. 而由於 , 可以發現只有在 的時候才會有 . 也就是 是 identity matrix.
Lemma 4: Let be a Markov matrix, written as (2). Assume is not an identity matrix, then it has eigenvalue with corresponding eigenvector .
接著我們來試著將 對角化. 先算一下 的 eigenvector:
因此可以很輕易看出 eigenvector 的 basis 是 . 不過我們把它 normalize 一下, 使它是個機率 (元素和為 ):
有了所有的 eigenvalue 跟 eigenvector 我們就可以將矩陣對角化.
假設 ,
令 , 那我們就有
並且
接著我們再稍微整理一下, 算一下
也就是我們得到了 與 分別是 的兩個 left-eigenvectors. 而 也如預料中是個元素全為 的向量.
因此對角化 (12) 可以改寫為
以及
最後我們就可以找出 Markov process 的 steady state 了. 假設 (也就是 不是 identity matrix (3) 或 位置調換的矩陣 (5)), 並且假設 是個機率向量, 元素和為 , 則有
這邊我們有利用到 以及 .
而如果對 沒有任何條件, 令 , 則有
對於一般的 Markov matrix 我們也有類似的結果.
Markov matrix 的條件為元素介於 跟 之間以及 column sum 為 .
根據 Lemma 3 我們知道 有一個 eigenvalue 是 . 我們做以下兩個假設
那麼, 假設 並且 的元素和為 . 那我們有,
對任何元素和為 的向量 都會成立.
因此 就是 Markov process 的 Steady state.
所以任給一個 Markov matrix , 我們目標就是要找他的 , 這樣就知道最終狀態長怎樣了. 而找 這件事可以利用 power iteration. 再請自行參閱.
不過簡單的說, 其實所謂的以 power iteration 找 的作法我們已經在 (18) 說明完了. 就是先隨機生成一個向量 , 然後再一直以 來乘它.
然後過程中檢驗看看 收斂了沒即可.