Kolton Ndoj

PageRank: the random surfer who ranked the web

Behind Google Search, which grew out of this idea in 1998

What problem does it solve?

Out of billions of web pages, which are the most important?

The big idea

A link is a vote, but votes from important pages count more. That sounds circular, and it is, beautifully so. Imagine a surfer clicking random links forever, and once in a while (15% of the time) getting bored and jumping to a completely random page. The fraction of time the surfer spends on each page is its PageRank. Mathematically, it's the special vector that stays the same when you apply 'one random click' to it: an eigenvector of the web's 'random click' matrix (links plus bored jumps).

How it works, step by step

  1. 1. Start every page with the same score, 1/N.
  2. 2. Each page splits its score evenly among the pages it links to.
  3. 3. Every page's new score = a small 'bored jump' share + 0.85 × the shares flowing in.
  4. 4. Repeat until the scores stop changing (power iteration).
  5. 5. Use the scores, alongside many other signals, to rank results.

The key formula

PR(p)=1−dN+d∑q→pPR(q)L(q)PR(p)=\frac{1-d}{N}+d\sum_{q\to p}\frac{PR(q)}{L(q)}
PR(p)PR(p)
the PageRank of page p: the share of time the surfer spends there
dd
the damping factor, 0.85 in the original paper: the chance the surfer keeps clicking
NN
the total number of pages
q→pq\to p
every page q that links to p
L(q)L(q)
how many outgoing links q has, so its vote is split

How fast is it?

Each round is one pass over every link on the web, and about 50 rounds are typically enough. Honest version: modern Google uses hundreds of signals (what your words mean, freshness, location, spam detection, machine-learned models), and PageRank is just one of them. Google retired the public PageRank score in 2016.

Try it yourself

Fun fact

Larry Page and Sergey Brin developed PageRank as Stanford PhD students; Page is the 'Page' in PageRank. Stanford owned the patent and received Google shares for licensing it, which it sold in 2005 for about $336 million. A famous maths paper calls it 'The $25,000,000,000 Eigenvector'.

Related

Play with the live demo →

Search · Intermediate