VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Why Mathematics? | Search Engines, PageRank and Network Centrality

eduKate Secondary small-group study for How Super Intelligence Works: Parameters and Weights.

Why do search engines return a useful page near the top when the web contains billions of documents? The answer is not one magic formula and it is certainly not “the computer reads everything like a person.” Search systems combine many signals. One historically important signal, PageRank, treats the web as a network and asks a beautifully mathematical question: if pages link to one another, which pages receive endorsements from other well-connected pages?

That question brings together graph theory, fractions, matrices, probability, iteration and careful interpretation. It also shows why mathematics is important in computing. A numerical model can turn a tangled network into a ranking, but only after people decide what a link means, how to handle dead ends and what behaviour the score should represent. This article builds a small PageRank model by hand, explains where it helps, shows where it can fail and gives students a practical path from school algebra to network science.


A quick map of the mathematics

  • A graph represents pages as vertices and hyperlinks as directed edges.
  • Out-degree counts links leaving a page; in-degree counts links arriving there.
  • A transition matrix divides a page's vote among its outgoing links.
  • A probability vector records where a modelled random visitor may be.
  • Iteration repeatedly applies the transition rule until the scores stabilise.
  • Damping mixes link-following with a jump to another page.
  • An eigenvector captures a distribution that the transition leaves unchanged.
  • Ranking orders scores, but relevance, quality and fairness require additional evidence.

The same habits appear in route planning and maps, where places become vertices and roads become edges, and in data compression, where probabilities guide efficient codes. The mathematics transfers because each problem begins by choosing a useful representation.

A useful way to read the article is to keep asking three questions: what is being counted, what is being conserved, and what does the final score actually mean? Those questions prevent a tidy calculation from becoming a vague claim about quality, truth or fairness.


The web becomes a directed graph

Suppose page A links to B and C, page B links to C, and page C links back to A. We draw three vertices and arrows A→B, A→C, B→C and C→A. Direction matters. A link from A to B does not automatically create a link from B to A. The graph records connectivity, not the wording, truth or beauty of the pages.

This abstraction is powerful because it removes details that are irrelevant to the first question. The colour of a page, its server location and its paragraph count are not needed to trace links. Yet abstraction also creates limits. Two links may look identical in the graph even if one is an enthusiastic recommendation and the other says “this claim is wrong.” A good mathematical model is deliberately incomplete, not secretly complete.

Degrees are useful but not enough

The in-degree of a page is the number of incoming links. It is tempting to rank pages simply by this count. That would treat every incoming link as equally informative. PageRank adds a recursive idea: a link from a page that is itself strongly connected should usually contribute more than a link from an isolated page. It also divides a page's contribution among the links it sends.

If A has four outgoing links, each destination receives one quarter of A's transferable score in the simplest model. If B has one outgoing link, that destination receives all of B's transferable score. This is not a moral judgement about generosity. It is a conservation rule that keeps the total probability equal to one.

Did You Know? A map and a matrix tell the same story

A graph is visual; a matrix is numerical. For n pages, an n×n matrix can store every permitted move. The drawing helps humans see structure, while the matrix lets a computer repeat the same update millions of times. Moving fluently between a picture, a table and an equation is one of the benefits of learning mathematics.


Let Mij mean the probability of moving from page j to page i when a visitor follows one of j's outgoing links uniformly. Each column represents a starting page. If page j has dj outgoing links, then an allowed destination receives 1/dj and every other destination receives zero. For a page with at least one outgoing link, its column sums to one.

Using pages A, B and C in that order, the link-following matrix is:

Destination from sourceABC
A001
B1/200
C1/210

Read the first column: from A, half the probability goes to B and half to C. Read the second: B sends everything to C. Read the third: C sends everything to A. Every column totals one.

Let r be a column vector containing the current probabilities [rA, rB, rC]ᵀ. One link-following step is r(next) = Mr. Matrix multiplication performs all “collect contributions from linking pages” calculations at once. The first component becomes rC, the second becomes rA/2, and the third becomes rA/2 + rB.

Start with equal probability

If r0 = [1/3, 1/3, 1/3]ᵀ, then after one step:

  • r1(A) = 1/3;
  • r1(B) = 1/6; and
  • r1(C) = 1/2.

The values still sum to one. Page C rises because both A and B point to it, while B receives only half of A's score. Another multiplication changes the distribution again. Repeating the update lets the effect of distant links travel through the network.

A hand calculation is a model audit

Before trusting code, calculate one update by hand. Check that no probability is negative and the total remains one. If a column sums to 1.5, the model creates probability; if it sums to 0.7, probability disappears. These simple checks catch transposed matrices, wrong degrees and missing links. Mathematics is not only the algorithm—it is the discipline of verifying the algorithm.


Why iteration is necessary

The importance of a page depends on the importance of pages linking to it, whose importance depends on other pages, and so on. This circular definition looks impossible if we expect a one-way calculation. Iteration resolves it. Begin with a reasonable distribution, apply the rule, feed the output back as the next input and observe whether the sequence settles.

For many suitable transition systems, repeated multiplication approaches a stationary vector r* satisfying r* = Mr*. Such a vector is an eigenvector with eigenvalue 1. In probability language, it is a distribution unchanged by another step. In ranking language, every page receives exactly the score that the network sends it under the model.

Convergence is not the same as stopping after many steps

A program should measure change. One common test uses the L1 distance:

r(next) − r(current)₁ = Σiri(next) − ri(current).

Stop when this value is below a stated tolerance, such as 10⁻⁸, or after a safe maximum number of iterations. A tolerance defines numerical closeness; it does not prove that the underlying ranking is socially meaningful. Reporting both the tolerance and iteration count makes the computation reproducible.

Oscillation can prevent naive convergence

Consider two pages that link only to each other. If all probability starts on A, the next step puts it all on B, then back on A. The sequence oscillates forever. A stationary distribution exists—half on each—but simple iteration from that starting point does not approach it. The graph is periodic.

This example matters because it separates “an equation has a solution” from “my chosen numerical procedure reaches that solution.” Computational mathematics studies both the object and the method used to approximate it.


Dangling pages and rank sinks

A dangling page has no outgoing links. Its transition column would contain only zeros, so a visitor arriving there has no next link to follow. If we multiply using that column, total probability leaks away. A standard repair replaces the empty column with a probability distribution, often a uniform jump across all pages.

A rank sink is a closed group of pages that link among themselves but not outward. In the undamped link-only model, probability can flow into the group and never leave. The group eventually absorbs most or all rank even if it is a tiny corner of the web. This is mathematically consistent with the rule but often unhelpful for ranking.

Damping adds a way out

PageRank's random-surfer interpretation says that at each step a visitor follows a link with probability d and jumps according to a teleportation distribution v with probability 1−d. The update is:

r(next) = dMr + (1−d)v.

When v is uniform across n pages, each page receives a baseline (1−d)/n at every step. A widely discussed example uses d = 0.85, but the number is a modelling choice, not a law of nature. A lower d gives more influence to teleportation; a higher d gives more influence to the link graph.

Worked update with damping

Return to r0 = [1/3, 1/3, 1/3]ᵀ and the three-page graph. Link-following gave Mr0 = [1/3, 1/6, 1/2]ᵀ. With d = 0.8 and uniform v, the teleportation part contributes 0.2/3 = 1/15 to every page.

Therefore r1 is:

  • A: 0.8(1/3) + 1/15 = 1/3;
  • B: 0.8(1/6) + 1/15 = 1/5; and
  • C: 0.8(1/2) + 1/15 = 7/15.

The scores total one. Page C remains strongest, but every page has positive probability. Damping reduces traps, breaks simple periodicity and usually makes the stationary distribution unique under broad conditions.


Solving the three-page example exactly

An exact solution helps us check iteration. Let the stationary scores be a, b and c for pages A, B and C. With d = 0.8 and uniform teleportation, each baseline is 1/15. The equations are:

  • a = 0.8c + 1/15;
  • b = 0.4a + 1/15;
  • c = 0.4a + 0.8b + 1/15; and
  • a + b + c = 1.

Substitute b into c and both into a. From b = 0.4a + 1/15, c = 0.4a + 0.8(0.4a + 1/15) + 1/15 = 0.72a + 0.12. Then a = 0.8(0.72a + 0.12) + 1/15 = 0.576a + 0.162666…. Thus 0.424a = 0.162666…, giving a ≈ 0.38365. Then b ≈ 0.22013 and c ≈ 0.39623.

Page C ranks narrowly above A; B is lower. Substituting the rounded values back into the equations produces small rounding differences. Using more digits reduces the residual. This is a concrete bridge between simultaneous equations and a real network calculation.

Why scale changes the method

For three pages, algebra is comfortable. For billions of pages, storing a dense n×n matrix is impossible: almost every pair of pages has no link, so most entries are zero. Practical systems use sparse representations that store only existing edges. Iterative methods multiply using those edges without forming every zero.

If there are m links, one iteration can be organised around roughly m contributions rather than n² possible pairs. The mathematical structure suggests the data structure. This is a recurring theme in algorithms: efficiency comes from noticing what is absent as well as what is present.


PageRank is a centrality measure

Network centrality tries to express how structurally prominent a vertex is. Degree centrality counts neighbours. Closeness centrality considers distances to other vertices. Betweenness centrality counts how often a vertex lies on shortest paths. Eigenvector-style measures reward connections to other high-scoring vertices. PageRank belongs to this family but includes direction, out-degree normalisation and teleportation.

No centrality is universally correct. In a transport network, a station with many lines may be important by degree, while a modest transfer station may be crucial by betweenness. In a citation network, older papers have had more time to accumulate citations. In a social network, popularity does not equal trustworthiness. The right measure depends on the question.

Rankings can disagree without arithmetic error

Suppose page X has 100 incoming links from low-score pages, while Y has ten incoming links from high-score pages that each link to few destinations. In-degree may rank X above Y; PageRank may reverse them. Neither calculation is necessarily wrong. They operationalise “importance” differently.

This is why students should always write a sentence defining what a score represents. “Y has greater PageRank in this graph and parameter setting” is precise. “Y is the best page” overreaches.

Random-walk and eigenvector methods have been adapted to citation networks, biological interaction networks, recommendation systems and sports comparisons. The interpretation changes each time. Reusing an equation does not automatically transfer its validity; the new edges must plausibly carry the meaning assigned to them.


What the original search-engine work claimed

Sergey Brin and Lawrence Page's Stanford paper The Anatomy of a Large-Scale Hypertextual Web Search Engine described a prototype search engine that used hypertext structure and PageRank. The paper explains that links are not counted equally and that contribution is normalised by outgoing links. It is a historical primary source for the mechanism discussed here.

It would be inaccurate to claim that a current search engine simply sorts the modern web by the 1990s formula. Search systems use many signals, change over time and must address language, freshness, location, spam, safety and query intent. PageRank is best taught as an important network-ranking idea, not as a complete or current recipe for any company's results.

Query relevance and global authority differ

A PageRank-like score can be computed mostly from the link graph before a user types a query. Relevance asks whether a page matches the specific information need. A highly central page about astronomy should not top a search for bicycle tyre pressure merely because it receives many links.

Search therefore needs both query-dependent evidence and broader signals. Text retrieval may examine terms, meanings, fields and context. Freshness may matter for a timetable but less for a proof. Location may matter for a nearby clinic. Mathematics helps combine evidence, but people must specify objectives and monitor unintended effects.


Personalised teleportation

The teleportation vector v does not have to be uniform. If it concentrates probability on a chosen set of pages, the stationary distribution becomes biased toward regions reachable from that set. This is often called personalised PageRank. It can model interest in a topic, proximity to trusted seeds or relevance to a starting context.

For four pages, a uniform vector is [0.25, 0.25, 0.25, 0.25]ᵀ. A topic-focused vector might be [0.7, 0.1, 0.1, 0.1]ᵀ. The entries must be non-negative and sum to one. With the same link matrix and damping factor, these choices produce different scores.

Personalisation exposes a value choice

A uniform jump says every indexed page is equally likely at teleportation. A seeded jump says some starting pages deserve more prior weight. Neither is neutral. The vector may improve usefulness for a defined task, but it can also narrow exposure or amplify a biased seed list.

Writing v explicitly is valuable because it turns an invisible preference into an inspectable quantity. Mathematical transparency does not settle the ethical question, but it helps people ask it clearly.


Once a score affects visibility, people have an incentive to influence it. A link farm creates or coordinates pages to manufacture endorsements. Reciprocal-link schemes and purchased links try to imitate organic structure. This is an adversarial system: the data-generating process reacts to the ranking rule.

Pure PageRank is not automatically immune. A group may circulate rank internally and arrange selected incoming or outgoing links. Damping limits some traps but does not distinguish honest endorsement from strategic linking. Real systems therefore need spam detection, policy enforcement, content analysis and continual evaluation.

Goodhart's law as a mathematical warning

When a measure becomes a target, it may cease to be a good measure. The slogan is not a theorem that every metric fails, but it captures an important feedback loop. Test scores, follower counts, citation counts and rankings can all shape behaviour once rewards depend on them.

Students should learn to ask who knows the metric, what actions can change it and whether optimisation changes the relationship between score and goal. Mathematics education is stronger when it includes these system effects, not only the clean equation.


Bias, coverage and missing pages

PageRank ranks the graph it is given. If a crawler never discovers a page, that page has no vertex. If important communities link less often, use different platforms or block crawlers, their structure may be underrepresented. A perfectly calculated score can still reflect incomplete data.

Coverage also depends on decisions about duplicate pages, redirects, canonical URLs, nofollow-like link attributes and inaccessible content. These are not minor housekeeping details. They determine the graph on which the mathematics operates.

Correlation is not endorsement

Many incoming links may correlate with visibility or established reputation, but they do not prove accuracy. Controversial, harmful or amusing pages may attract links for many reasons. Likewise, a new high-quality page may have few links simply because people have not encountered it.

Compare evidence fairly, as in comparing percentages fairly: identify denominators, time windows and selection rules before making a broad claim. A ranking score is evidence about a modelled network, not a certificate of truth.


Sensitivity and robustness

A robust ranking should not change wildly when one unimportant link is added. Sensitivity analysis perturbs inputs or parameters and measures the output change. We might vary the damping factor, remove one edge, alter the teleportation vector or compare crawl snapshots.

If pages P and Q have almost equal scores, a tiny perturbation may swap their order. Reporting only ordinal ranks hides that near-tie. The underlying scores, uncertainty and stability matter, especially when decisions attach large consequences to small differences.

Worked damping comparison

At d = 0, the link matrix has no influence and the answer equals v. As d approaches 1, the network dominates and mixing becomes slower or less stable around traps and periodic structure. Between these extremes, the selected value controls how far influence travels before a jump is expected.

The expected number of consecutive link-following steps before a teleport has a geometric structure. With continuation probability d, the expected run length is d/(1−d) if counting followed links before the jump. At d = 0.8, that is 4; at d = 0.9, it is 9. This gives the parameter an intuitive scale.


PageRank and Markov chains

The random-surfer model is a Markov chain: the next state depends on the current page and transition probabilities, not on the full earlier path. A transition matrix is stochastic because its probabilities sum appropriately. The stationary distribution is a long-run occupancy distribution under the model.

Markov does not mean the real person has no memory. It describes the simplified process used for this score. A human may backtrack, type a new address or stop browsing. The model chooses a memoryless walker because it is tractable and captures a useful aspect of link flow.

Conditions matter

Finite Markov chains have rich theory. A chain that is irreducible can reach every state from every other state. Aperiodicity prevents rigid cycling. Positive teleportation to every page generally supplies both properties, leading to a unique stationary distribution and convergence from any starting distribution.

Students do not need advanced proofs to appreciate the lesson: add assumptions, then state what they guarantee. “The iteration converges” should come with conditions, not confidence alone.


A practical spreadsheet investigation

Create a network of five pages labelled A to E. Draw at least seven directed links, ensuring every page has an outgoing link. Then build a 5×5 matrix with sources in columns and destinations in rows. Divide each source column by its out-degree. Confirm every column sums to one.

In another column, enter the starting vector with five values of 0.2. Use matrix multiplication to compute Mr, multiply by d = 0.85 and add 0.15/5 to each entry. Copy the calculation across 30 iterations. Graph each page's score against iteration number.

Questions that make it an investigation

  • Which page has greatest in-degree, and is it also highest by PageRank?
  • How many iterations are needed before the largest change is below 0.000001?
  • What happens when one page removes all outgoing links?
  • How do results change at d = 0.5, 0.85 and 0.95?
  • Can you design a graph where in-degree and PageRank give different leaders?
  • Which single added link changes the ranking most, and why?

Keep an untouched copy of the original graph. Change one condition at a time. Record the matrix, parameter, result and interpretation. This turns clicking around a spreadsheet into a controlled experiment.

A coding extension

Store outgoing neighbour lists rather than a dense matrix. At each iteration, begin with the teleportation baseline, distribute d times each page's score across its neighbours, repair dangling pages and compute the L1 difference. Assert that the new scores sum to one within floating-point tolerance.

Test the program on the three-page example whose answer you solved by algebra. Known small cases are essential. Code that runs without crashing may still put sources in rows when the mathematics expected columns.


How this connects to school mathematics

Fractions and ratio

Dividing one page's score among its outgoing links is proportional reasoning. If a page with score 0.24 has three links, each receives 0.08 before damping. Fractions are not a preliminary exercise here; they maintain conservation across a network.

Algebra

Stationary equations such as a = 0.8c + 1/15 form simultaneous linear equations. Substitution and elimination produce an exact small solution. Variables make the recursive definition manageable.

Matrices

A matrix organises many linear relationships and lets one operation update every page. Order matters: Mr and rᵀM represent different conventions. Dimensions are a built-in error check.

Probability

Scores sum to one and can be interpreted as long-run visit probabilities in the random-surfer model. Conditional moves, mixtures and geometric waiting times give the algorithm meaning.

Computing

Sparse data structures, iteration, tolerances and complexity turn the equation into a scalable procedure. This is why mathematics in careers is rarely isolated from programming, communication and domain knowledge.


Common misconceptions worth correcting

Incoming-link count ignores where links come from and how outgoing score is divided. It may correlate with PageRank in some graphs, but it is a different measure.

“PageRank measures truth”

It measures structural prominence under a model. Links can reflect criticism, manipulation, fashion or missing coverage. Factual reliability requires content evidence and source evaluation.

“A current search result is just sorted PageRank”

Modern search involves many changing signals and query-specific processes. The historical algorithm is instructive, but presenting it as a complete current system would be unsupported.

“Iteration is guessing”

Iteration is a controlled numerical method. It applies a defined transformation, measures error and approaches a fixed point under stated conditions.

“The matrix is the web”

The matrix is a representation of a selected crawl and link policy. It omits text, people, time and unobserved pages. Models should never be confused with the entire system they describe.


Guidance for students

Begin with a four- or five-node graph that you can draw and audit. Label source and destination conventions on the matrix. Check column sums, vector sums and one manual iteration before using a spreadsheet. Explain each number in words. If 0.12 enters page C, state which source sent it and why.

Then change one feature at a time. Build examples that challenge your intuition: a page with many weak incoming links, a page with one strong incoming link, a closed pair, a dangling page and a personalised seed. The aim is not to memorise d = 0.85. It is to predict how structure changes flow.

Keep claims modest. Say “under this graph and model” rather than “on the internet.” When reading about algorithms, identify the date and primary source. The Stanford paper is historically important, while a company's present implementation may be different and partly private.


Guidance for parents and educators

Use PageRank to connect familiar school topics without turning the lesson into a lecture about search-engine companies. A strong sequence is drawing → fractions → table → matrix → iteration → critique. Students who are not ready for matrices can still distribute tokens along arrows and compare repeated rounds.

Ask explanation questions: Why divide by out-degree? Why must the probabilities total one? What problem does teleportation solve? What cannot the score tell us? These questions reveal understanding better than copying a finished spreadsheet.

Encourage ethical and media literacy alongside calculation. Students should see that ranking systems shape attention and can be manipulated. Mathematics gives them tools to inspect those systems, not permission to treat every numerical order as objective truth.


Frequently asked questions

Is PageRank named after web pages?

The name is associated with co-founder Larry Page as well as the idea of ranking pages. For learning, the more important point is the recursive network score.

Must the damping factor be 0.85?

No. It is a modelling parameter. Different values change the balance between network structure and teleportation, the speed of mixing and sensitivity to traps.

Does a larger score mean a page is relevant to every query?

No. Global structural prominence and query relevance are different. A search system must consider the user's information need and other evidence.

Can PageRank be calculated without a matrix?

Yes. A program can distribute contributions along adjacency lists. The matrix is a compact mathematical description; sparse edge processing is more practical at scale.

Why do scores sum to one?

The random-surfer interpretation treats them as a probability distribution. Normalisation also makes scores comparable within the same graph and parameter setting.

With uniform teleportation and damping below one, it still receives the baseline jump probability. Its score may remain low unless the link graph sends it more.

Is the highest-ranked page automatically trustworthy?

No. Trustworthiness requires evidence about authorship, claims, methods and sources. Network rank alone cannot establish those qualities.

What is the best first extension?

Compare in-degree, PageRank and a personalised PageRank on the same small graph. The disagreements make each definition visible.


Useful next reading


The larger lesson

PageRank matters because it turns relationship into quantity. A link graph, a conservation rule and repeated probability updates create a score that would be difficult to infer by inspection. The calculation is elegant, scalable and transferable.

Its limits are equally educational. A high score is not truth, relevance or fairness. The graph may be incomplete, links may be strategic, parameters embody choices and close rankings may be unstable. Mathematics does not remove judgement; it makes assumptions, consequences and checks visible.

That is a powerful benefit of learning mathematics. Students learn to move from a messy system to a model, calculate carefully, test edge cases, interpret the result at the right level and refuse conclusions the model cannot support. Search engines are one application. The reasoning belongs everywhere decisions are influenced by networks and rankings.

Discover more from eduKate Singapore

Subscribe now to keep reading and get access to the full archive.

Continue reading