The PageRank Algorithm: The Mathematics of Link Analysis

On this page
  1. What the PageRank algorithm is and why it was invented
  2. The mathematical formula and core equation
  3. The random surfer model and the damping factor
  4. Handling dead ends, dangling nodes, and spider traps
  5. Calculating PageRank: Matrices and power iteration
  6. Exploring link flow with the PageRank simulator
  7. From random surfer to reasonable surfer
  8. Does Google still use PageRank today?
  9. Frequently asked questions
  10. What is the PageRank algorithm?
  11. What is the damping factor in PageRank?
  12. Why was the PageRank damping factor set to 0.85?
  13. Does Google still use the PageRank algorithm?
  14. What is the difference between toolbar PageRank and algorithm PageRank?
  15. What is the difference between the random surfer and reasonable surfer models?
  16. How do dead ends and spider traps affect PageRank?
  17. Can internal linking increase a website’s PageRank?
  18. Sources
In this guide: Ranking and Algorithms

The PageRank algorithm is a mathematical system developed at Stanford University that measures the relative authority of web pages based on the link graph of the World Wide Web. By interpreting hyperlinks as weighted endorsements, PageRank calculates the probability that an individual navigating random links lands on a given page. It forms the foundation of modern link-based search engine ranking.

What the PageRank algorithm is and why it was invented

The PageRank algorithm is an eigenvector centrality model that assigns a numerical weighting to each document within an interconnected hyperlinked graph. Stanford University doctoral students Larry Page and Sergey Brin invented the algorithm in 1996 while developing BackRub, the research search engine that evolved into Google. The fundamental breakthrough was recognizing that the World Wide Web contained rich peer review information embedded directly in its link architecture.

Before PageRank, first-generation search engines such as AltaVista and Lycos ranked web documents primarily by lexical keyword frequency. Site creators discovered that repeating search phrases dozens of times in hidden text allowed unhelpful pages to monopolize top rankings. Brin and Page realized that textual claims alone could not guarantee quality. A document’s importance was better judged by how many external websites chose to cite it.

PageRank treated every hyperlink from page A to page B as a vote of editorial confidence. Crucially, the algorithm did not merely tally total votes. A vote from an authoritative document carrying high PageRank contributed substantially more weight than a vote from an obscure, unlinked webpage. This recursive calculation established an objective, graph-based quality metric that resisted trivial on-page text manipulation, as explored across search engine ranking algorithms.

The algorithm scaled successfully across millions of early web documents because it converted the web into a directed graph. In this graph, web pages operate as nodes, and hyperlinks operate as directed edges. Computing global link authority enabled search engines to separate authoritative institutional resources from promotional web directories and automated link schemes.

The mathematical formula and core equation

The PageRank equation defines the authority score of a webpage recursively based on the scores of all pages linking into it. For any webpage u, its PageRank is determined by summing the scores of every inbound linking page v, divided by the total number of outbound links leaving each page v. A constant damping factor balances linked authority with the baseline probability of starting a new session.

In their 1998 Stanford research paper, Page and Brin defined the formula as:

text
PR(u) = ((1 - d) / N) + d * sum(PR(v) / L(v))

In this formulation:

  • PR(u) represents the calculated PageRank score of target webpage u.
  • d represents the damping factor, traditionally set to 0.85 in web information retrieval.
  • N represents the total number of documents in the indexed web graph.
  • B_u represents the set of all pages linking to target page u (the inbound link set).
  • PR(v) represents the PageRank score of an individual linking page v.
  • L(v) represents the total number of outbound links pointing out of page v.
text
PageRank Vote Distribution:
Page A (Score: 1.0, Outbound Links: 2)
  ├── 50% equity (0.50 * d) ──> Page B
  └── 50% equity (0.50 * d) ──> Page C
Page D (Score: 1.0, Outbound Links: 1)
  └── 100% equity (1.00 * d) ──> Page B
Result: Page B accumulates higher authority than Page C.

The division by $L(v)$ ensures that link equity dilutes proportionally as a page links to more resources. If an authoritative university homepage links to two research projects, each project receives half of that page’s transferable authority. If that same homepage adds one hundred miscellaneous directory links, each destination receives only one-hundredth of the transferable equity.

The constant term (1 - d) / N guarantees that every indexed page maintains a non-zero minimum baseline score. Even if a newly published page possesses zero inbound links, it still receives a fractional probability value. This mathematical construct prevents zero-division errors during iterative calculations across sparse graph segments.

The random surfer model and the damping factor

The random surfer model is a conceptual thought experiment that provides the physical intuition behind PageRank mathematics. Imagine an imaginary internet user who visits a random webpage and clicks hyperlinks continuously. When viewing a page with four outbound links, the user chooses any link with an equal probability of twenty-five percent, navigating endlessly across the World Wide Web.

If this process continued indefinitely without interruption, a pure link walker would eventually become trapped in cyclical link structures. The surfer might enter two pages linking exclusively to one another, circulating endlessly between them. Furthermore, real human searchers do not click hyperlinks infinitely; users eventually grow bored, close the browser window, or type an entirely new web address into the address bar.

The damping factor $d$ models this real-world human behavior mathematically. Setting $d = 0.85$ means the algorithm assumes that at any given step, there is an eighty-five percent probability that the user continues clicking links on the current page. Conversely, there is a fifteen percent probability ($1 - d = 0.15$) that the user abandons link navigation and jumps directly to a random page chosen uniformly across the entire web corpus.

text
Random Surfer Decision Tree:
                [ Current Webpage ]

        ┌────────────────┴────────────────┐
        ▼ (85% Probability: d)            ▼ (15% Probability: 1-d)
[ Clicks Outbound Link ]          [ Random Web Teleportation ]
(Follows link graph)              (Jumps to any page in corpus)

This fifteen percent teleportation probability ensures that the link graph forms an ergodic Markov chain. It guarantees that regardless of where the surfer starts, every document in the graph can eventually be visited. The stationary probability distribution of this Markov chain represents the final PageRank score of every indexed URL.

Handling dead ends, dangling nodes, and spider traps

Unconstrained link graphs contain structural flaws that can distort probability flow and disrupt algorithmic convergence. In graph theory, web pages that contain no outbound links are classified as dangling nodes or dead ends. Because a random surfer reaching a dead end cannot click forward, probability leaks out of the system, causing iterative calculations to drain toward zero.

text
Graph Pathologies:
Dead End (Dangling Node):
[ Page A ] ──> [ Page B ] ──> [ Page C (No Outbound Links) ] (Probability sinks)

Spider Trap (Absorbing Loop):
[ Page A ] ──> [ Page B ] <──> [ Page C ] (Traps 100% of graph score)

Search engines resolve dead ends by artificially treating dangling nodes as linking to every other page in the corpus. When the algorithm encounters a document with zero outbound links, it redistributes that page’s accumulated probability score uniformly across all $N$ documents in the index. This mathematical adjustment acts as an automatic teleportation step, preventing authority from disappearing.

A second structural failure is the spider trap, where a closed loop of pages links exclusively to each other without outbound exits. In early algorithmic prototypes, spider traps acted as absorbing states, continuously drawing authority from external pages while releasing nothing back. Over repeated mathematical iterations, the trap accumulated an artificially inflated score that overwhelmed the rest of the index.

The damping factor solves spider traps naturally. Because the random surfer possesses a fifteen percent chance of jumping out of any page at each step, the surfer cannot remain permanently imprisoned inside a loop. The teleportation mechanism allows probability to escape absorbing subgraphs, preserving balanced scoring across ranking mechanisms.

Calculating PageRank: Matrices and power iteration

To calculate PageRank across millions of documents, search engines express the link graph as a transition probability matrix. Let matrix M represent an N x N stochastic matrix where the entry M_ij indicates the probability of moving from page j to page i. If page j links to three destinations including page i, the cell value is one-third (1/3).

text
Sample 3-Page Link Graph:
Page 1 links to: Page 2, Page 3
Page 2 links to: Page 3
Page 3 links to: Page 1

Transition Matrix M (Columns = Source, Rows = Destination):
      P1     P2     P3
P1 [ 0.00   0.00   1.00 ]
P2 [ 0.50   0.00   0.00 ]
P3 [ 0.50   1.00   0.00 ]

Because true web graphs contain dangling nodes and disconnected clusters, the raw matrix M is modified into the Google matrix G. The calculation blends matrix M with a uniform teleportation matrix E:

text
G = d * M + ((1 - d) / N) * E

The system solves for the principal eigenvector of matrix G using the power iteration method. Power iteration is an iterative algorithm that begins by assigning every page an initial uniform probability vector R_0. The algorithm repeatedly multiplies the probability vector by the Google matrix:

text
R_(k+1) = G * R_k

With each successive multiplication, probability flows across edges, adjusting scores according to graph density. Because the Google matrix is primitive, irreducible, and stochastic, the Perron-Frobenius theorem guarantees that the vector converges toward a unique, stationary distribution regardless of starting values. On web-scale indexes, power iteration typically converges within fifty to one hundred iterations.

Visualizing how authority circulates through matrix equations helps developers understand the practical consequences of site architecture. While the underlying linear algebra operates across billions of URLs, the fundamental dynamics of link equity, dilution, and damping factors apply identically to small network clusters. Seeing these numbers adjust in real time clarifies link architecture principles.

To experiment with these mathematical mechanics directly, visit our interactive PageRank simulator. Rather than reading static explanations of node behavior, you can construct custom node networks, add and remove internal hyperlinks, alter damping factors, and execute power iteration step by step. Observing how outbound link counts dilute individual edge weights provides practical clarity for technical site planning.

Using an interactive environment demonstrates why circular internal linking structures retain authority within topic clusters. It also shows how orphan pages fail to receive link equity from primary navigation hubs. Understanding these dynamics helps engineers optimize crawl paths and ensure that web crawlers discover links efficiently.

From random surfer to reasonable surfer

In the original 1998 PageRank model, the algorithm assumed that every hyperlink on a webpage possessed an equal probability of being clicked. A link in the primary navigation header received the exact same mathematical weight as a link buried inside legal terms at the very bottom of the page. This assumption made early search engines vulnerable to link layout manipulation.

In 2004, Google filed a landmark patent titled “Ranking search results by reranking the results based on local expressions,” establishing the reasonable surfer model. The reasonable surfer model replaced uniform click probabilities with dynamic behavioral predictions. The algorithm evaluates the visual prominence, document location, font size, and editorial context of each hyperlink to estimate the realistic probability that a human visitor clicks it.

text
Reasonable Surfer Probability Weighting:
┌────────────────────────────────────────────────────────┐
│ Header / Nav Link: Moderate Weight (High Visibility)   │
├────────────────────────────────────────────────────────┤
│ Main Editorial Body Link: HIGH WEIGHT                  │
│ (Prominent font, contextual relevance, high click rate)│
├────────────────────────────────────────────────────────┤
│ Sidebar / Footer Link: LOW WEIGHT                      │
│ (Low engagement, boilerplate disclaimer, ignored)      │
└────────────────────────────────────────────────────────┘

Under this modern framework, an editorial link embedded directly inside primary body text transfers significant authority. A link hidden inside a copyright footer, terms of service disclaimer, or advertising widget carries negligible link equity. Search engines apply machine learning classifiers to determine whether a link is a genuine editorial citation or boilerplate navigation.

The reasonable surfer evolution dramatically changed link analysis in search engine optimization. It ensured that webmasters could not inflate page authority simply by stuffing site-wide links into global footers. Editorial relevance and contextual engagement became primary factors in link equity transmission.

Does Google still use PageRank today?

Google continues to use PageRank as an active component of its core ranking infrastructure, though the algorithm has evolved substantially beyond the 1998 Stanford prototype. Google representatives and official engineering documentation have repeatedly confirmed that link graph analysis and PageRank signals remain active in production scoring systems worldwide.

The common misconception that PageRank is dead stems from Google’s 2016 decision to discontinue the public PageRank toolbar score. Between 2000 and 2016, Google provided an Internet Explorer toolbar and browser add-on displaying a green bar with a 0 to 10 score for every visited URL. Because site owners obsessively bought and traded links to inflate their public score, Google deprecated the public display to reduce web spam.

text
Public Toolbar vs Core Algorithm Reality:
2000-2016: Public Toolbar Score (0-10) ──> DEPRECATED / SHUT DOWN
1998-Present: Internal Graph Engine ───> ACTIVE in core ranking systems

Behind the scenes, the internal computational engine calculating link graph authority never stopped running. Modern PageRank operates as one of dozens of coordinated ranking systems embedded within core search. It runs alongside deep neural models like RankBrain and BERT, link spam defenses like SpamBrain, and topical authority classifiers, preserving the web-scale verification detailed throughout Search Engine Basics.

Today, PageRank operates as an unweighted foundational signal during candidate retrieval and early scoring stages. Rather than determining final SERP positions in isolation, it provides a stable baseline of domain and document trust. It ensures that high-quality, widely cited web publications form the backbone of search engine results.

Frequently asked questions

What is the PageRank algorithm?

The PageRank algorithm is a link analysis system developed at Stanford University that measures webpage authority by evaluating the quantity and quality of inbound hyperlinks. The algorithm models hyperlinks as votes, calculating the probability that an idealized user navigating links across the World Wide Web arrives at a specific page.

What is the damping factor in PageRank?

The damping factor is a mathematical parameter representing the probability that a user continues clicking hyperlinks rather than abandoning navigation to visit a random webpage. In standard web retrieval models, the damping factor is conventionally set to 0.85, corresponding to an eighty-five percent likelihood of following an on-page link.

Why was the PageRank damping factor set to 0.85?

The damping factor was set to 0.85 because empirical research by Stanford computer scientists indicated that users follow an average of approximately six consecutive hyperlinks before stopping. Mathematically, 0.85 provides fast numerical convergence during power iteration calculations while preventing spider traps and cyclical link loops from trapping authority.

Does Google still use the PageRank algorithm?

Google continues to use PageRank within its core ranking systems today. While Google retired the public toolbar score in 2016 to curtail link spam manipulation, official Google documentation confirms that internal link analysis algorithms and PageRank signals remain fundamental to assessing website credibility, trust, and document authority.

What is the difference between toolbar PageRank and algorithm PageRank?

Toolbar PageRank was a simplified, logarithmic 0 to 10 visual metric displayed in desktop web browsers from 2000 until its official retirement in 2016. Algorithm PageRank is the actual, continuous mathematical calculation running across distributed server clusters that powers Google’s real-time search ranking pipeline.

What is the difference between the random surfer and reasonable surfer models?

The random surfer model assumes that all hyperlinks on a page have an equal probability of being clicked. The reasonable surfer model uses machine learning to assign varied click probabilities based on link placement, font size, visual prominence, and editorial context, passing more authority through body text than footers.

How do dead ends and spider traps affect PageRank?

Dead ends are pages with no outbound links that leak authority out of link networks. Spider traps are closed loops that hoard authority without releasing it. PageRank resolves dead ends by redistributing probability uniformly across all pages, and resolves spider traps via the damping factor’s teleportation probability.

Can internal linking increase a website’s PageRank?

Internal linking cannot create new external PageRank for a domain, as total site equity originates from external backlinks. However, strategic internal linking effectively redistributes existing authority across pages, ensuring that high-priority articles, conversion pages, and foundational guides receive sufficient equity to compete in organic search results.

Sources

Sources

Tier 1 is a search engine's own documentation or a primary standards document. Tier 2 is a reputable secondary publication or a peer-reviewed paper.

  1. The Anatomy of a Large-Scale Hypertextual Web Search Engine (Brin and Page, 1998)Stanford University InfoLabTier 1 source: primary documentation or a standards document
  2. The PageRank Citation Ranking: Bringing Order to the Web (Page, Brin, Motwani, Winograd, 1999)Stanford University Technical ReportTier 1 source: primary documentation or a standards document
  3. Google Search Central: A Guide to Google Search Ranking SystemsGoogle for DevelopersTier 1 source: primary documentation or a standards document
  4. Authoritative Sources in a Hyperlinked Environment (Kleinberg, 1999)Journal of the ACMTier 1 source: primary documentation or a standards document

Cite this page

Hassan. "The PageRank Algorithm: The Mathematics of Link Analysis." Search Engine Basics, 10 September 2026, https://searchenginebasics.dev/ranking/pagerank-algorithm/

BibTeX
@misc{hassan:2026:pagerank-algorithm, author = {Hassan}, title = {The PageRank Algorithm: The Mathematics of Link Analysis}, howpublished = {Search Engine Basics}, year = {2026}, url = {https://searchenginebasics.dev/ranking/pagerank-algorithm/}}

About the author

Hassan, Editor, Search Engine Basics

Hassan

Editor, Search Engine Basics

  • 8 years of hands-on SEO and technical search work
  • Runs original crawl and log-file experiments on live sites

Hassan has worked in SEO and digital marketing since 2018, running technical audits, content programs and log-file analysis across law, logistics, medical billing and software client sites. He writes Search Engine Basics from first-hand search data rather than from secondary commentary, and every claim on the site is traced back to a primary source.

Back to the ranking guide