Skip to content

Commit 5ead1a0

Browse files
committed
change wording in eigen_II
1 parent 1a1e771 commit 5ead1a0

File tree

2 files changed

+7
-29
lines changed

2 files changed

+7
-29
lines changed

lectures/eigen_II.md

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ kernelspec:
1111
name: python3
1212
---
1313

14-
15-
1614
# Spectral Theory
1715

1816
```{index} single: Spectral Theory
@@ -63,9 +61,9 @@ We denote this as $A \geq 0$.
6361
(irreducible)=
6462
### Irreducible matrices
6563

66-
We have (informally) introduced irreducible matrices in the [Markov chain lecture](markov_chains_II.md).
64+
We have introduced irreducible matrices in the [Markov chain lecture](mc_irreducible).
6765

68-
Here we will introduce this concept formally.
66+
Here we generalize this concept:
6967

7068
$A$ is called **irreducible** if for *each* $(i,j)$ there is an integer $k \geq 0$ such that $a^{k}_{ij} > 0$.
7169

@@ -90,10 +88,6 @@ It means that $A$ is called primitive if there is an integer $k \geq 0$ such tha
9088

9189
We can see that if a matrix is primitive, then it implies the matrix is irreducible.
9290

93-
This is because if there exists an $A^k$ such that $a^{k}_{ij} > 0$ for all $(i,j)$, then it guarantees the same property for ${k+1}^th, {k+2}^th ... {k+n}^th$ iterations.
94-
95-
In other words, a primitive matrix is both irreducible and aperiodic as aperiodicity requires a state to be visited with a guarantee of returning to itself after a certain amount of iterations.
96-
9791
### Left eigenvectors
9892

9993
We have previously discussed right (ordinary) eigenvectors $Av = \lambda v$.
@@ -178,9 +172,7 @@ If $A$ is primitive then,
178172
179173
6. the inequality $|\lambda| \leq r(A)$ is **strict** for all eigenvalues $\lambda$ of $A$ distinct from $r(A)$, and
180174
7. with $v$ and $w$ normalized so that the inner product of $w$ and $v = 1$, we have
181-
$ r(A)^{-m} A^m$ converges to $v w^{\top}$ when $m \rightarrow \infty$.
182-
\
183-
the matrix $v w^{\top}$ is called the **Perron projection** of $A$.
175+
$ r(A)^{-m} A^m$ converges to $v w^{\top}$ when $m \rightarrow \infty$. $v w^{\top}$ is called the **Perron projection** of $A$
184176
```
185177

186178
(This is a relatively simple version of the theorem --- for more details see
@@ -228,26 +220,12 @@ B = np.array([[0, 1, 1],
228220
np.linalg.matrix_power(B, 2)
229221
```
230222

231-
We can compute the dominant eigenvalue and the corresponding eigenvector using the power iteration method as discussed {ref}`earlier<eig1_ex1>`:
232-
233-
```{code-cell} ipython3
234-
num_iters = 20
235-
b = np.random.rand(B.shape[1])
236-
237-
for i in range(num_iters):
238-
b = B @ b
239-
b = b / np.linalg.norm(b)
240-
241-
dominant_eigenvalue = np.dot(B @ b, b) / np.dot(b, b)
242-
np.round(dominant_eigenvalue, 2)
243-
```
223+
We compute the dominant eigenvalue and the corresponding eigenvector
244224

245225
```{code-cell} ipython3
246226
eig(B)
247227
```
248228

249-
250-
251229
Now let's verify the claims of the Perron-Frobenius Theorem for the primitive matrix B:
252230

253231
1. The dominant eigenvalue is real-valued and non-negative.
@@ -307,8 +285,8 @@ A1 = np.array([[1, 2],
307285
[1, 4]])
308286
309287
A2 = np.array([[0, 1, 1],
310-
[1, 0, 1],
311-
[1, 1, 0]])
288+
[1, 0, 1],
289+
[1, 1, 0]])
312290
313291
A3 = np.array([[0.971, 0.029, 0.1, 1],
314292
[0.145, 0.778, 0.077, 0.59],

lectures/markov_chains_II.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ from matplotlib import cm
7171
import matplotlib as mpl
7272
```
7373

74+
(mc_irreducible)=
7475
## Irreducibility
7576

76-
7777
To explain irreducibility, let's take $P$ to be a fixed stochastic matrix.
7878

7979
Two states $x$ and $y$ are said to **communicate** with each other if

0 commit comments

Comments
 (0)