Due Friday, November 18 at 11am.
In class, we saw that $o = [1,1,\ldots,1,1]$ is an eigenvector of $M^T$ with eigenvalue $\lambda = 1$ for any Markov matrix $M$.
(a) If $x_k$ is an eigenvector of $M$ ($M x_k = \lambda_k x_k$) for any other eigenvalue $\lambda_k \ne 1$ of $M$, show that we must have $o^T x_k = 0$: it must be orthogonal to $o$. (Hint: use $o^T = o^T M$.)
(b) Check your result from (a) numerically for a random $5 \times 5$ Markov matrix M = rand(5,5); M = M ./ sum(M, dims=1)
, with eigenvalues eigvals(M)
and eigenvectors X = eigvecs(M)
. (Do using LinearAlgebra
to get eigvecs
and eigvals
.)
(Note: if you have a long vector v
, Julia only shows a few elements by default, but you can show all the elements with @show v
. You can also look at the absolute values of the elements with abs.(v)
, which can be easier to read than complex numbers in checking that entries are small.)
(c) If we expand an arbitrary $x$ in an eigenvector basis $x = c_1 x_1 + \cdots + c_m x_m$, letting $x_m$ be a steady-state eigenvector ($\lambda_m = 1$) and supposing all of the other eigenvalues are $\ne 1$, show that $o^T x$ gives us a simple formula for $c_m = \_\_\_\_\_\_\_\_$.
(d) Hence, if all other eigenvalues have magnitude $<1$, then $M^n x \to \_\_\_\_\_\_\_\_$ (simple formula in $o,x,x_m$) as $n \to \infty$. Check this formula against M^100 * [1,2,3,4,5]
for your M
from (b).
From Strang, section 6.2. Consider $A = \begin{pmatrix} 0.6 & 0.4 \\ 0.4 & 0.6 \end{pmatrix}$ and $B = \begin{pmatrix} 0.6 & 0.9 \\ 0.1 & 0.6 \end{pmatrix}$. For this problem you keep in mind the diagonalization of matrices like $A$ and $B$.
(a) Which of $A^n$ or $B^n$ (or both, or neither) go $\to \begin{pmatrix}0 & 0 \\ 0 & 0 \end{pmatrix}$ as $n \to \infty$? Double-check your answer by looking at $A^{100}$ and $B^{100}$ in Julia — these are approaching matrices of rank ________ and ________, respectively.
(b) For what values of the real scalar $\mu$ is $\sqrt{A - \mu I}$ a real matrix? Check your answer by trying sqrt(A - μ*I)
for a few values of μ
in Julia (do using LinearAlgebra
to get I
).