Home/Labs/PageRank Power Iteration
All 280 Labs
INTERACTIVE LAB🔍

Google PageRank Power Iteration Lab (Interactive)

Run real power iteration on a six-node web graph and dial damping, links, and spam. Iterate the actual PageRank equation across a toy link graph: follow my-rank damping, redistribute dangling-node mass, and watch the L1 error converge toward zero iteration by iteration.

PageRank Power Iteration

Run the random-surfer eigenvector over a six-page web: PR(A) = (1-d)/N + d·Σ PR(B)/L(B). Tune the damping factor and iteration count and watch authority converge.

Not converged: L1 change 0.1208 per pass — add iterations.
#1 Wikipedia84.60%
#2 BlogSpot64.61%
#3 SpamURL60.33%
#4 NewsHub57.56%
#5 ShopCo57.56%
#6 ForumX37.32%
At d≈0.85 the Markov chain stays irreducible: rank sinks (ForumX loop, spam self-link) leak their mass back through the teleport term.

Top page holds 84.6% of all probability mass — one inbound link from Wikipedia outweighs hundreds of blog links, the anti-keyword-stuffing insight of 1998.

How It Works Under the Hood

Brin and Page's insight was that the web's link graph is a vote: a page's importance is the sum of importance flowing into it from its referrers, split across their outgoing links. PageRank = alpha/N + (1-alpha) x sum of received rank computes as a power iteration whose cost scales with edges, not node pairs — what made indexing hundreds of billions of documents feasible in days of MapReduce. Dangling nodes with no outgoing links leak mass unless it is redistributed, and the fixed damping factor of 0.85 keeps the iteration converging to a unique stationary vector.

Core Architectural Principles

  • Damping factor 0.85 models the random surfer who jumps to a random page 15% of the time, guaranteeing a unique fixed point.
  • Dangling-node handling: pages with no outlinks leak probability, so the iteration must redistribute their mass globally.
  • Convergence metric: L1 distance between successive rank vectors falls geometrically until the ranking stabilizes.
Interview Round Script

You may be asked to rank things by graph signal: link authority, fraud rings, supply-chain trust. State the iterative definition, why out-degree splitting is the fair transfer rule, and why damping prevents rank sinks. Then extend: "Link farms abuse it, which is why modern search layers neural relevance on top of graph priors." Bonus points for noting the computation is edge-proportional and embarrassingly parallel.

Key Trade-Offs

Link-based ranking is query-independent and hard to game with pure content tricks, but it lags on fresh pages and invites link-farm manipulation.

Related Curriculum Chapter

Google Search: Crawling, Indexing, & The PageRank Algorithm

Read Full Chapter Blueprint

Explore More Interactive Labs

View All 280 Labs