1. The Eigenvalue Equation
When a linear transformation $A \in \mathbb{R}^{n \times n}$ acts on a vector $x$, it typically changes both the magnitude and the direction of $x$.
However, there exist special non-zero vectors whose direction remains invariant under the transformation; they are only scaled by a factor $\lambda \in \mathbb{C}$:
$$A v = \lambda v, \quad v \neq \mathbf{0}$$
- $v$ is the Eigenvector (characteristic vector).
- $\lambda$ is the Eigenvalue (characteristic value).
text
The Characteristic Equation
Rearranging $(A - \lambda I)v = \mathbf{0}$. For non-trivial solutions ($v \neq \mathbf{0}$), the matrix $(A - \lambda I)$ must be singular (its determinant must equal zero):
$$\det(A - \lambda I) = 0$$
Solving this $n$-degree polynomial yields the $n$ eigenvalues $\lambda_1, \lambda_2, \dots, \lambda_n$.
2. Diagonalization: Decoupling Complex Systems
If an $n \times n$ matrix $A$ has $n$ linearly independent eigenvectors ${v_1, \dots, v_n}$, we can form the eigenvector matrix $P = [v_1 \dots v_n]$ and diagonal matrix $D = \text{diag}(\lambda_1, \dots, \lambda_n)$:
$$A = P D P^{-1}$$
Fast Matrix Exponentiation
Computing $A^k$ for large $k$ (e.g. evaluating Markov chain transitions or graph walk step counts) takes $O(k n^3)$ naively. With diagonalization:
$$A^k = (P D P^{-1})^k = P D^k P^{-1}$$
Since $D$ is diagonal, $D^k = \text{diag}(\lambda_1^k, \lambda_2^k, \dots, \lambda_n^k)$, reducing matrix powers to $O(n)$ after the initial $O(n^3)$ decomposition!
3. Google's PageRank Algorithm: The Dominant Eigenvector
Google's original search engine algorithm, PageRank (Page & Brin, 1998), models the entire World Wide Web as a directed graph of $N$ nodes.
A random web surfer on page $j$ clicks a link to page $i$ with probability $M_{ij} = 1 / L(j)$, or jumps to a random page with probability $(1 - d)$ where $d \approx 0.85$ is the damping factor.
The Google Transition Matrix $G$ is defined as:
$$G = d \cdot M + \frac{1 - d}{N} \mathbf{1} \mathbf{1}^T$$
Perron-Frobenius Theorem
Because $G$ is a strictly positive stochastic matrix ($G_{ij} > 0$ and columns sum to 1), the Perron-Frobenius theorem guarantees:
- The largest eigenvalue of $G$ is strictly equal to 1 ($\lambda_1 = 1$).
- The corresponding eigenvector $r$ satisfies:
$$G r = 1 \cdot r \implies G r = r$$
- All entries of $r$ are strictly positive ($r_i > 0$).
The components of this dominant eigenvector $r$ represent the exact steady-state probability of being on each webpage—which is precisely the PageRank score!
4. Python Implementation: The Power Iteration Method
python