The matrix that is a graph

A chain with no stationary vector

A page with no outgoing links loses forty per cent of the walker's probability in six hundred steps. A directed cycle never converges at all. And on a graph whose links only run one way, the entire rank of half the vertices is exactly one minus the teleportation parameter.

Worth reading first: A ranking that is an eigenvector · An eigenvector that must not change sign.

The definition of PageRank asks for the stationary distribution of a Markov chain. Perron–Frobenius guarantees one exists and is unique — provided the chain is irreducible and aperiodic, and provided its transition matrix is stochastic.

A link graph satisfies none of those three. This essay measures what each failure does, and what the standard repair for it is actually assuming.

The published rate is α, and it is α because the graph is in piecesThe PageRank power iteration on a link graph in two closed pieces, at α = 0.85, plotted as the change between successive iterates. The upper dashed line is αᵏ, the rate every account of the method quotes. The lower one is (α·λ₂(P))ᵏ, which is what the second eigenvalue of the Google matrix actually is: λ₂(P) = 1 here. The measured contraction over the run is 0.84123. The two agree exactly when λ₂(P) = 1, which happens exactly when the link graph has more than one closed communicating class — which every real one does, and which is why a statement that is false of connected graphs has never been noticed to be. The answer is checked against one elimination of I − αP̃, which agrees to 1.39·10⁻¹⁶.02244668811013215417610⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²iterationchange between iteratestwo rates, one curveα0.85λ₂(P)1predicted rate0.85measured0.84iterations176against the solve1.4·10⁻¹⁶the upper dashed line is αᵏthe curve is on the other one
Fig. 1 The power iteration on a link graph in two closed pieces, which is the shape a real one has. The folk convergence rate is exact here for a reason that is about the graph rather than about the method.

The matrix is not stochastic

A page with no outgoing links contributes a column of zeros. Its column does not sum to one, so the matrix is sub-stochastic, and a walker that arrives there disappears.

Measured directly — the total probability remaining after six hundred steps of the unrepaired iteration on an eighty-page graph:

dangling pages    mass remaining after 600 steps
 0                   1.000
 2                   0.860
 6                   0.672
12                   0.521
20                   0.402

Six dead ends out of eighty cost a third of the probability. Twenty cost sixty per cent. And the loss is not a transient — the iteration is a contraction towards zero, so the vector goes on shrinking for as long as it is run, and every entry shrinks with it.

The rank ratios survive, which is why this can go unnoticed for a long time: a vector shrinking uniformly gives the same ordering. What does not survive is any comparison against a threshold, any sum over a subset, and any statement of the form “this page has 0.4% of the total rank” — because the total is 0.402 and falling.

What the repair assumes

Every implementation repairs it, and almost all of them the same way: a dangling page’s mass is redistributed according to the teleport vector, which amounts to replacing its empty column with v.

That is a modelling assumption dressed as a bug fix. It says: a walker at a dead end behaves exactly as a bored walker does. It might; it might equally be assumed to stay where it is (replace the column with an indicator, making the page absorbing), or to go back where it came from, or to be removed from the graph before the computation and reattached afterwards.

Those give different answers. They are not close variants of one method; they are four different chains, and which one is being solved is decided by a line in an implementation that usually has no comment on it. The repaired iteration conserves mass exactly — measured at 1.000000000000 for every dangling count above — so nothing downstream reports that a choice was made.

This is the shape the regularisation field is about, arriving in a place where nobody calls it that. The data does not determine the answer, something outside it has to, and the choice is the computation rather than a preliminary to it.

The chain is periodic

A chain is periodic when its states can be partitioned into groups the walker cycles through in order. On a directed cycle that is the whole graph: from vertex k the walker goes to k + 1 and nowhere else, so its position at time t is determined modulo the cycle length by where it started.

Such a chain has no limiting distribution. Its transition matrix is a permutation matrix, every eigenvalue is on the unit circle, and the iterate rotates forever without settling.

Teleportation is supposed to fix this, and it does, at a rate that is exactly α:

α           iterations to a change below 10⁻¹²
0.85            163
0.99            did not converge in 2,000 — change still 3.4·10⁻¹¹
0.999999        did not converge in 2,000 — change still 1.8·10⁻⁶

At α = 0.85 the chain converges in a hundred and sixty steps. At α = 0.999999 it does not converge in two thousand, because the contraction is 0.999999 a step and two thousand steps buy a factor of 0.998.

So the repair works and its strength is exactly the parameter. As α approaches one — which is the direction “use more of the graph and less of the prior” points in — the repair weakens, and in the limit it is not there at all. That is not a numerical difficulty to be worked around; it is the statement that the object being approached does not exist.

The chain is reducible, and this is the important one

A chain is reducible when some states cannot be reached from others. Every real link graph is: there is a large strongly connected core, a set of pages that link into it and are not linked back, and a set that it links to and which link nowhere.

The consequence is not subtle, and it is best seen on a graph built to have it. Sixty pages in two halves, with links from the first half into the second and none back:

α          rank in the source half     rank in the sink half
0.500            0.333333                  0.666667
0.850            0.130435                  0.869565
0.990            0.009901                  0.990099
0.999            0.000999                  0.999001

The last column is 1 − α to every digit shown.

The entire rank of half the graph is the teleportation parameter. Not approximately, not asymptotically — the total probability the walker spends in the upstream half is exactly the probability that it teleported there recently, because that is the only way to be there. The link structure of that half contributes nothing to its total, and as α rises towards the value that is supposed to mean “trust the links more”, the upstream half’s rank goes to zero.

That is the case where reading PageRank as “importance according to the link structure” fails completely. Half the graph’s importance is a constant somebody typed, and the graph’s own structure decides only how that constant is divided within the half.

The three failures are not equally visible

It is worth ranking them by how likely each is to be noticed, because the ordering is the reverse of how much attention each gets.

Dangling pages are noticed. The mass falls, and any implementation that prints a total sees it immediately. They are also the failure every account of the method mentions, and the repair is in every implementation.

Periodicity is almost never noticed, because it is almost never present. A real link graph has short cycles everywhere and is aperiodic without any help; the directed cycle above is a constructed object. The repair is free, so nobody minds, but the emphasis it receives in expositions is out of proportion to how often it matters.

Reducibility is present in every real graph and is not noticed at all, because there is no symptom — in the way an undetermined ranking has none either. The iteration converges, the mass is one, the vector is positive, the ordering looks sensible, and every diagnostic reports success. The only way to see it is to compute the strongly connected components — which nobody does, because the method does not require it.

So the failure that is universal and consequential is the one with no symptom, and the two with symptoms are the ones that get the attention. That is a pattern this site has seen: the gate that found fifty-two orphaned pages found them because it asked whether something existed rather than whether something was correct, and every other check asked the second question.

An undirected graph, whose Laplacian is the object this field started from, cannot be reducible in this way — if there is an edge from A to B there is one from B to A, so every connected component is strongly connected, and a walk restricted to one component has a perfectly good stationary distribution, which is its degree distribution.

Directedness is what creates the sink, and a link is directed. So this failure mode is not an awkward special case of the theory; it is the ordinary structure of the object the method was invented for. The convergence-rate measurement two essays ago is the other side of the same fact: λ₂(P) = 1 exactly because the graph has more than one closed class, and the published convergence rate is right for that reason.

One phenomenon, two consequences. The rate quoted everywhere is correct because the graph is reducible, and the answer for a large part of the graph is meaningless for the same reason.

14 of 14 places survive the arithmetic and 3 survive one missing linkThe top 15 of a PageRank ranking on an eighty-page link graph, and how many of its 14 adjacent comparisons keep their order under three kinds of doubt. Perturbing the teleport vector at the rounding level moves every entry by at most 4.05·10⁻¹¹ and settles 14 of them. Moving α across the range everybody uses moves entries by 0.00123 and settles 11. Removing a single arc — one link that might or might not have been crawled — moves entries by 0.00443 and settles 3. The gaps between consecutive entries run from 6.28·10⁻⁵ to 0.00241, so the ordering is decided by the data at a scale ten orders above anything the arithmetic does. This is the one field on the site where the computation is not the weakest part of the answer.places settled, of 14the arithmetic14 of 14one missing link3 of 14α from 0.80 to 0.9011 of 14entries move by 4.05·10⁻¹¹entries move by 0.00443entries move by 0.00123three kinds of doubtcomparisons14smallest gap6.3·10⁻⁵largest gap0.0024arithmetic band4.1·10⁻¹¹one-link band0.0044α band0.0012the arithmetic settles nearly all of themthe data settles three
Fig. 2 What decides the places of a leaderboard on a graph with dead ends in it. The parameter is one of the three sources of doubt, and it is not the largest.

The three repairs are one repair

It is worth noticing that teleportation fixes all three problems and is the only thing that does.

Replacing a dangling column with v makes the matrix stochastic. Mixing in (1 − α)v1ᵀ makes every entry positive, which makes the chain irreducible — every page is reachable from every other in one step — and aperiodic, since a positive matrix has no periodic structure. Perron’s theorem then applies in its strongest form: the leading eigenvalue is simple, its eigenvector is strictly positive, and the power iteration converges from any start. The Collatz–Wielandt bracket comes with it — a two-sided enclosure of the eigenvalue from one matrix–vector product, which for the Google matrix says only that the answer is one, and which on an adjacency matrix is the rarest thing on this site.

That economy is the reason the construction is so widely used and it is also why the assumption inside it is so easy to miss. One parameter buys existence, uniqueness, convergence and a rate, and the price is that the answer is a mixture of the graph and a prior in a proportion nobody derived.

What a run should report

Four numbers, none of which is expensive, and all of which are missing from a typical output.

The number of dangling pages and how they were handled. It is a line of the input’s statistics and a line of the implementation’s, and together they say which of four chains was solved.

The fraction of rank in each closed class. If the graph has a sink that absorbs 99% of the rank at α = 0.99, that is worth knowing before the top ten is read. It costs one strongly-connected-components pass, which is linear.

α, and the error converted. The previous essay makes the case for the first; the second is that the change between iterates underestimates the distance to the answer by 1/(1 − α), which at α = 0.99 is a factor of a hundred.

And whether the iteration converged at all. The α = 0.999999 row above did not, and the only symptom is a change between iterates that is small because the contraction is slow. A run that stops on a change threshold cannot distinguish “converged” from “barely moving”, and the two look identical in every diagnostic the iteration produces.

A note on what “converged” is being measured against

One more quiet failure belongs here, because it is the one that makes the periodic row of the table above hard to read from inside a run.

The stopping test compares successive iterates. On a chain that is converging slowly the successive iterates are close together because it is converging slowly, so the test’s quantity is small for the same reason the answer is far away. The relationship is exact: for a contraction of factor r, the distance remaining is the change divided by 1 − r.

At α = 0.85 that factor is about seven and nobody is misled. At α = 0.999999 it is a million, so a run stopped when the change falls below 10⁻¹² is 10⁻⁶ from the answer — which is precisely the row of the table that says the iteration did not converge, seen from a stopping test that would have said it had.

The repair is a division, and it needs a number the run already has: the observed contraction over the last several steps. Reporting the change alone is the default because it is what the loop computes, and converting it costs nothing.

What the refusals are for

Three assertions in this field are fed cases they must reject, and they are the three failures above.

The first is handed α = 1 — the chain itself, with no teleportation — and must refuse, because the chain has no unique stationary distribution on any graph with more than one closed class. The second is handed the directed cycle at α = 0.999999 and required to declare convergence, which it must refuse because the iterate is still 1.8·10⁻⁶ from settled. The third is handed an unrepaired link matrix and required to conserve probability, which it must refuse because forty per cent of it has gone.

Each of those runs on every build. That matters more here than in most of this collection, because the failures are all quiet: an unrepaired matrix returns a plausible ranking, a periodic chain returns a plausible vector, and a reducible one returns a ranking whose upstream half is a constant. None of them throws, and an assertion that has never been fed the case it must refuse would not have noticed any of them.

What a sink does to the top of the list

The reducibility measurement above is about totals, and a reader who only looks at the top ten might reasonably ask whether it matters to them.

It does, and in a direction that is easy to get backwards. The rank mass concentrates in the sink, so the top of the list is drawn from the sink — pages that are linked to and link nowhere. Those are, in a web graph, exactly the terminal documents: a PDF, an image page, a redirect target, a page whose outgoing links were never crawled.

So the highest-ranked pages under a large α are systematically the pages the crawl knows least about. That is not a bug in the arithmetic and it is not a bug in the definition; it is what “spends the most time here” means for a walker on a graph with sinks in it. A ranking read as importance has acquired a bias towards terminality, and the size of the bias is set by α.

The usual repairs are outside the linear algebra: treat uncrawled pages as dangling and redistribute them, restrict the computation to the strongly connected core, or damp more heavily. Each changes the answer. None of them is more principled than the others, and the choice between them is made in the same place as every other choice in this essay — an implementation detail with no comment on it.

What survives

The reassuring half, stated last because it is genuinely reassuring: the repaired computation is correct, well conditioned and cheap, and the two routes to it agree at 4·10⁻¹⁷.

Nothing in this essay is about the arithmetic. Every measurement here would come out the same in exact arithmetic, because every one of them is about which chain was solved rather than about how well it was solved. That is unusual for this site and it is the field’s characteristic shape: when the answer is discrete, or is read as an order, or is a probability whose total is checked, the questions that matter move from the arithmetic to the model, and the arithmetic is the part that works.

At other settings

Contracting by 0.4509 where the folk rate says 0.5The PageRank power iteration on a connected fifty-vertex graph, at α = 0.5, plotted as the change between successive iterates. The upper dashed line is αᵏ, the rate every account of the method quotes. The lower one is (α·λ₂(P))ᵏ, which is what the second eigenvalue of the Google matrix actually is: λ₂(P) = 0.90238 here. The measured contraction over the run is 0.45086. The two agree exactly when λ₂(P) = 1, which happens exactly when the link graph has more than one closed communicating class — which every real one does, and which is why a statement that is false of connected graphs has never been noticed to be. The answer is checked against one elimination of I − αP̃, which agrees to 3.82·10⁻¹⁷.0510152025303510⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²iterationchange between iteratestwo rates, one curveα0.5λ₂(P)0.9predicted rate0.45measured0.45iterations36against the solve3.8·10⁻¹⁷the upper dashed line is αᵏthe curve is on the other one
Fig. 3 The iteration at α = 0.5, where teleportation is strong and every pathology is mild.
Contracting by 0.8933 where the folk rate says 0.99The PageRank power iteration on a connected fifty-vertex graph, at α = 0.99, plotted as the change between successive iterates. The upper dashed line is αᵏ, the rate every account of the method quotes. The lower one is (α·λ₂(P))ᵏ, which is what the second eigenvalue of the Google matrix actually is: λ₂(P) = 0.90238 here. The measured contraction over the run is 0.89332. The two agree exactly when λ₂(P) = 1, which happens exactly when the link graph has more than one closed communicating class — which every real one does, and which is why a statement that is false of connected graphs has never been noticed to be. The answer is checked against one elimination of I − αP̃, which agrees to 2.84·10⁻¹⁶.032649612816019222410⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²iterationchange between iteratestwo rates, one curveα0.99λ₂(P)0.9predicted rate0.89measured0.89iterations253against the solve2.8·10⁻¹⁶the upper dashed line is αᵏthe curve is on the other one
Fig. 4 At α = 0.99, where the repair is weak and the iteration is slow.
Contracting by 0.7668 where the folk rate says 0.85The PageRank power iteration on a connected fifty-vertex graph, at α = 0.85, plotted as the change between successive iterates. The upper dashed line is αᵏ, the rate every account of the method quotes. The lower one is (α·λ₂(P))ᵏ, which is what the second eigenvalue of the Google matrix actually is: λ₂(P) = 0.90238 here. The measured contraction over the run is 0.76683. The two agree exactly when λ₂(P) = 1, which happens exactly when the link graph has more than one closed communicating class — which every real one does, and which is why a statement that is false of connected graphs has never been noticed to be. The answer is checked against one elimination of I − αP̃, which agrees to 1.04·10⁻¹⁶.01428425670849810⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²iterationchange between iteratestwo rates, one curveα0.85λ₂(P)0.9predicted rate0.77measured0.77iterations108against the solve10⁻¹⁶the upper dashed line is αᵏthe curve is on the other one
Fig. 5 And at the usual value, on a connected graph, where the two rates separate.
1002 steps to forget where it started, and λ₂ said 1055A random walk on a sixty-vertex graph with two blocks joined at a density of 0.005, started at one vertex, measured as the total variation distance from its stationary distribution. It reaches 10⁻⁶ after 1002 steps. The dashed line is |λ₂|ᵏ with λ₂ = 0.986994 from the walk matrix, and the number of steps that predicts is 1055. The distance is not the eigenvalue: for the first several steps the walk is leaving one block and the decay is faster than the asymptote, and the two curves become parallel only once the slowest mode is all that is left. The eigenvalue is a rate, not a schedule, and the difference between them is 53.3 steps.0143286429572715858100110⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹1steps of the walkdistance from stationarya rate read as a timeλ₂ of the walk0.99steps measured1002steps predicted1055ratio0.95the dashed line is the eigenvaluethe curve is the walk
Fig. 6 A walk that takes a thousand steps to forget where it started, which is what a weak repair produces.
16 steps to forget where it started, and λ₂ said 17A random walk on a sixty-vertex graph with two blocks joined at a density of 0.2, started at one vertex, measured as the total variation distance from its stationary distribution. It reaches 10⁻⁶ after 16 steps. The dashed line is |λ₂|ᵏ with λ₂ = 0.450568 from the walk matrix, and the number of steps that predicts is 17. The distance is not the eigenvalue: for the first several steps the walk is leaving one block and the decay is faster than the asymptote, and the two curves become parallel only once the slowest mode is all that is left. The eigenvalue is a rate, not a schedule, and the difference between them is 1.33 steps.0246810121416182010⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹1steps of the walkdistance from stationarya rate read as a timeλ₂ of the walk0.45steps measured16steps predicted17ratio0.92the dashed line is the eigenvaluethe curve is the walk
Fig. 7 And one that takes sixteen.
4 entries of a strictly positive vector are negativeThe Perron eigenvector of a twelve-vertex clique with a tail of 24, normalised to its largest entry, plotted as absolute values on a logarithmic axis. Perron–Frobenius says every entry of this vector is strictly positive, and it is a theorem about a connected nonnegative matrix rather than a statement about a good day. Each step along the tail divides the entry by about the Perron root 11.0077, so the entries fall by a decade a step and reach the rounding level after sixteen. Beyond it 4 of them are negative — the smallest at -1.507·10⁻²⁰ — and they are drawn as open circles. The bracket printed beside it is Collatz–Wielandt: for any strictly positive x, the Perron root lies between the smallest and largest of (Ax)ᵢ/xᵢ, so it is a two-sided bound that is proved, from one product, and after forty steps it is 1.2·10⁻⁴ wide.1611162126313610⁻²²10⁻¹⁹10⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹vertex, clique first then tail|entry| relative to the largestone rounding of the largest entrya bound that is provedPerron root11bracket, low11bracket, high11bracket width1.2·10⁻⁴smallest entry-1.5·10⁻²⁰entries below zero4every entry is positiveand the picture disagrees
Fig. 8 The strict positivity teleportation buys, measured where the arithmetic loses it anyway.
2 components: 32 vertices, 31 edges, and a matrix built from themThe 2 components laid out at its own second and third Laplacian eigenvectors, so the picture is the same object the measurements are about. The Laplacian L = D − A is built by subtraction of integers, so every row sums to exactly zero — measured at 0, not at the rounding level — and L·1 is the zero vector with no arithmetic error anywhere in it. Its 2 zero eigenvalues count the connected components, which breadth-first search also puts at 2; the smallest non-zero eigenvalue is 0.03843 and the largest computed zero is 1.67·10⁻¹⁶, a gap of 2.3·10¹⁴. The quadratic form xᵀLx is Σ over edges of (xᵢ − xⱼ)², which at the alternating vector is 124.the matrix, measuredvertices32edges31‖L·1‖∞0zero eigenvalues2components, by search2λ₂6.1·10⁻¹⁷laid out at its own eigenvectorsand the row sums are exactly zero
Fig. 9 An undirected graph in two pieces, which is the symmetric analogue of a reducible chain.
The count says 2 pieces and the graph has 1The Laplacian spectrum of two ten-vertex paths joined by a single edge of conductance 10⁻¹⁰, plotted on a logarithmic axis so the zero end is visible. The dashed line is the threshold 10⁻¹⁰‖L‖ = 1.02·10⁻⁹, and the number of eigenvalues below it is the spectral count of connected components: 2. Breadth-first search, which performs no arithmetic on any weight, says 1. The largest computed zero is 2·10⁻¹¹ and the smallest eigenvalue above the threshold is 0.09789. A count of components is therefore a rank decision at a threshold, and the bridge's conductance decides which side of it λ₂ falls on — at nine orders above the rounding level, not at it.13579111315171910⁻¹⁹10⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹indexeigenvalue of L10⁻¹⁰‖L‖, the thresholda count that is a thresholdeigenvalues below it2components, by search1largest computed zero2·10⁻¹¹smallest above it0.098ratio4.9·10⁹the graph is connectedat every stop of the slider
Fig. 10 A graph that is connected and is reported as two pieces, which is the same failure in a threshold.
What the regularisation costs, and what 6 steps of refinement take backSolving [[H + δI, Aᵀ], [A, −δI]] instead of K gives the exact answer to a different problem, so its error is proportional to δ: measured at 1489·δ across six decades, which is a slope of one and not a trend. Refining against the unregularised matrix — the residual formed with K and the correction solved with the regularised factorisation — removes that term entirely, because the perturbation was never in the residual. It works while δ is below σ_min(K) = 6.797·10⁻⁴, marked on the axis, and stops working above it: the iteration's contraction factor is δ/σ_min and a fixed point needs that under one. So the trade-off curve every regularisation essay on this site has drawn — a term falling in δ against a term rising in it — has, here, a left branch that can simply be removed.-14-12-10-8-6-4-210⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹log₁₀ δrelative error against the exact answerδ = σ_min(K)no refinement6 stepsa left branch that can be removederror ÷ δ, unrefined1489σ_min(K)6.8·10⁻⁴refined at δ = 10⁻⁶3.6·10⁻¹⁶refined at δ = 10⁻²0.62the perturbation is known exactlybecause the code chose it
Fig. 11 A parameter deciding an answer the data does not, in the field named after it.
The L-curve, and where four rules put λThe norm of the solution against the norm of its residual, on logarithmic axes, as λ sweeps eight decades. The curve has a corner: to the left of it the noise is being amplified and to the right the signal is being thrown away. Four points are marked — the three rules that use only the data, and the oracle, which requires the exact answer and is not a method.10⁻¹110¹10²10³10⁴10⁵‖Ax − b‖‖x‖the oraclediscrepancyL-curvegeneralisedscored against a truth none hasoracle, relative error0.14discrepancy principle, as a multiple1L-curve corner, as a multiple1.3generalised cross-validation, as a multiple1the oracle needs the exact answer and is not a methodit is the reference the others are scored on
Fig. 12 The published rules for choosing such a parameter, scored against a truth.
Conjugate gradients on an ill-posed problem at 0.10% noiseTwo curves against the step count on a logarithmic vertical axis. The relative residual falls at every one of the 120 steps without exception. The error against the true signal falls to 0.1050 at step 44 and then climbs, reaching 0.56 by the end — 5.3 times its best value.015304560759010512010⁻³10⁻²10⁻¹1steprelative sizeleast error: 44discrepancy stop: 27errorresidualthe knob is an integerleast error, at step44error there0.11error at step 1200.56the residual falls at every stepthe error turns and keeps rising
Fig. 13 A step count acting as a regularisation parameter.
Past the cliff: what each method returnsLoss of orthogonality at four condition numbers past κ²u = 1. Cholesky QR returns a factor whose implied Q is 0.37 away from orthogonal at κ = 10⁸ and 1.49 at 10¹² — and at 3·10¹⁰ it refuses outright, on a pivot of -6.5·10⁻¹⁷. The sweep and the tree return a usable factorisation of every one of these matrices.‖QᵀQ − I‖ of the implied Qκ = 10⁸, Cholesky0.37κ = 10⁸, sweep8.5·10⁻⁹κ = 10¹⁰, Cholesky1.3κ = 10¹⁰, sweep3·10⁻⁷κ = 3·10¹⁰, Choleskyrefusedκ = 3·10¹⁰, sweep6.7·10⁻⁶κ = 10¹², Cholesky1.5κ = 10¹², sweep1.4·10⁻⁴the safe run is the one that failsrefusals in the range1wholly non-orthogonal returns2the pivot it refused on-6.5·10⁻¹⁷one of these outcomes is safeand it is the refusal
Fig. 14 A routine that returns something rather than refusing, which every failure here does.
What the solver reported, and what it achievedFinal relative residual and final relative error against the working precision, on a logarithmic vertical axis. The residual sits at the stopping tolerance at every precision — the method converged, by every test available to it. The error runs from 1.4·10⁻¹³ at 53 bits to 0.00597 at 8, tracking the unit roundoff, which is drawn beside it.614223038465410⁻¹³10⁻¹⁰10⁻⁷10⁻⁴working significand bitsrelative sizeerrorresidualuthe gap the solver cannot seeerror ÷ residual at 24 bits1.5·10⁶error ÷ residual at 16 bits2.3·10⁷error ÷ residual at 8 bits2.4·10¹⁰every convergence test passesand the answer is wrong in proportion to u
Fig. 15 A residual that says nothing about the error, which the change between iterates here also does not.
The accuracy asked for, against the accuracy obtained, for two kernels on one partitionε is applied to each block against that block's own largest singular value; the error is then reported against the whole matrix's norm. The two are not the same number and the dashed diagonal is where they would be. For 1/r the obtained error is 29 times smaller than the tolerance asked for; for log r on the identical partition it is 13 times smaller. Both curves are straight and parallel to the diagonal, so the knob does what a knob should — a decade in buys a decade out — and neither of them sits on it. The factor is how much of the matrix's mass lives off the diagonal, which is a property of the kernel; it is not the number of blocks, which is 112 and would put the curves on the other side of the diagonal.10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³ε asked for, per block‖A − A_H‖ ⁄ ‖A‖ obtainedasked = obtainedlog r1 ⁄ rtwo numbers, not one1/r, obtained at 10⁻⁸3.4·10⁻¹⁰log r, obtained at 10⁻⁸7.8·10⁻¹⁰1/r, obtained ⁄ asked0.034log r, obtained ⁄ asked0.078blocks in the partition112the tolerance is per blockand the error is per matrix
Fig. 16 A tolerance asked for against one obtained.
The Arnoldi subdiagonal and the GMRES residual against the width of an eigenvalue cluster, n = 30, 12 clustersA matrix of size 30 whose spectrum is 12 clusters of width η. At η = 0 the Krylov space closes at dimension 12 and the recurrence breaks down there. As η opens up, h_{13,12} rises with a fitted slope of 1.00 and the relative residual at step 12 with a slope of 1.00 — both exactly proportional to η, at a fixed ratio of 82000 between them. The residual at step 11, one short of the breakdown, is 7.576·10⁻⁵ and stays inside a per cent of that across the whole sweep: the step before the event carries no information about it.10⁻¹³10⁻¹¹10⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹10¹10⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²cluster width ηmagnitudeh at step 12residual at 12residual at 11fitted over ten decadesslope of h against η1slope of the residual1h ÷ residual, at every stop8.2·10⁴residual at step 117.6·10⁻⁵the zero arrives in proportionand the step before it learns nothing
Fig. 17 A method that stops because a quantity it needs is zero, in the iterative field.
How close Hager's estimate is to the true κ₁, over 200 seeded 8×8 matricesFive bars. The estimate is exactly the true condition number on 81% of the sample and inside ten per cent on 87%; the worst underestimate in the whole sample returns 38% of the truth. The last bar is the matrix built to defeat it, at 7.7%, well below anything the random sample reached.each bar is a percentage — of the sample, or of the true condition numberexactly right80.5%inside 10%87.0%inside a factor of 287.0%worst in the sample, ×10037.7%the constructed matrix, ×1007.7%usually exactexact share0.81worst of the sample0.38the constructed matrix0.077a routine that is right most of the timeand never wrong in the safe direction
Fig. 18 An estimate reported as a spread rather than as a number.
How much a perturbation of the right-hand side is amplified, κ = 10⁶The cumulative distribution of the amplification factor over two hundred random perturbation directions, with the condition number marked as the upper limit.110¹10²10³10⁴10⁵10⁶10⁷00.250.50.751amplification of the input perturbationfraction of directions at or belowκ = 10·10⁵worst found 7.6·10⁵6×6, 200 directionsmedian reaches 0.29 of κ
Fig. 19 An amplifier belonging to the problem, which 1/(1 − α) is here.
The exact solution of a 13×13 Hilbert system beside the computed oneTwo columns of numbers: the exact answer, which is the integers one to thirteen, and the answer double-precision elimination returns, with the number of correct digits beside each.H13 x = b, b formed exactly so that x = (1, 2, …, 13)12345678910111213exact1.00002.00003.00133.97865.18864.993010.46720.048921.2657-2.575319.21478.906013.5113computed6.6 correct digits4.8 correct digits3.4 correct digits2.3 correct digits1.4 correct digit0.8 correct digitno correct digitsno correct digitsno correct digitsno correct digitsno correct digits0.6 correct digit1.4 correct digitbackward error2.2·10⁻¹⁷κ = 1.7·10¹⁸The algorithm solved a neighbouring problem perfectly. That problem's answer is this one.right-hand side built in BigInt rationalsthe truth is known
Fig. 20 An answer that is known, which none of the chains in this essay has.
Backward and forward error against the condition numberA log–log plot over twelve decades of condition number. The backward error is a flat line at ten to the minus sixteen; the forward error rises in proportion to the condition number.110²10⁴10⁶10⁸10¹⁰10¹²10¹⁴10⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹condition number κ(A)relative errorforward errorbackward errorpredicted: κ · u8×8, 20 seeds per κ; dashed is the worstthe problem worsens, not the method
Fig. 21 The two errors, neither of which is what goes wrong here.
Backward error, forward error and the condition number, with measured valuesTwo boxes at the top — the problem posed and the nearby problem the algorithm answered exactly — and two answers below them, with the distances between all four labelled by numbers from a Hilbert solve.the problem you posedA = H10b = A·(1, 2, …, 10)the problem it answered exactlyA + δA, b + δb‖δ‖ / ‖A‖ = 2.3·10⁻¹⁷the answer you wantedx = (1, 2, …, 10), exactlythe answer you gotx̂, wrong by 2.7·10⁻⁴ relativebackward error 2.3·10⁻¹⁷forward error 2.7·10⁻⁴κ = 1.6·10¹³κ · η = 3.6·10⁻⁴, and the measured forward error is 2.7·10⁻⁴.The algorithm is not at fault. The problem is.H10, LU with partial pivotingresidual and error differ
Fig. 22 The identity every measurement on this site is read against.
One system, one tolerance, and 11 different amounts of workConjugate gradients on a 200 × 200 symmetric positive definite matrix with κ = 10⁴, stopped when the relative residual falls below 10⁻¹⁰, run at each of 13 partition counts. The only thing that differs between the runs is how many pieces the two global inner products were summed in — which on a real machine is the number of workers. Iteration counts run from 674 to 690, 11 of them distinct, a spread of 2.4% of the work. Every run converged and every answer is right to the accuracy asked for; the forward errors span 6.31·10⁻¹¹ to 1.08·10⁻¹⁰, a factor of 1.72. What differs is not a digit at the end of an answer — it is the bill, and it is an integer.110¹670673676679682685688691694pieces the inner products were summed initerations to the tolerance674, the cheapest run690, the dearestthe same solve, pricedpartitionings run13distinct counts11spread, per cent2.4best forward error6.3·10⁻¹¹worst1.1·10⁻¹⁰one matrix, one toleranceand the cost is the machine's
Fig. 23 One solve with several bills, in the field about answers that are not unique.
The same 4096 numbers, added up 26 ways, 21 different answersEach dot is one reduction of one vector of 4096 binary64 numbers whose summation condition number is 1.01·10⁸: the vector is cut into p contiguous pieces, each piece summed left to right, and the pieces combined in a tree. The vertical position is the distance from the exactly rounded sum, relative. Filled dots are the static split a fixed thread count gives; open dots are unequal splits, which is what a work-stealing scheduler produces at the same p. 21 of the 26 runs returned distinct values, spanning 1.55·10⁻¹³ — 2.3·10⁷ ulps of the answer. The dashed line is the classical bound γ₍ₙ₋₁₎Σ|xᵢ|, which every one of them satisfies with 2.58·10⁴ to spare, and which is the same number for all of them: it contains n and Σ|xᵢ| and nothing about the order.110¹10⁻¹¹10⁻⁸10⁻⁵pieces the vector was divided intodistance from the exact sum, relativethe published boundκ · uone vector, one algorithmdistinct answers21runs26spread, in ulps2.3·10⁷κ of the sum10⁸bound ÷ worst error2.6·10⁴nobody chose pand no answer is the answer
Fig. 24 Twenty-one answers from one program, which is a different way for an answer not to be unique.
23 of 23 places survive the arithmetic and 4 survive one missing linkThe top 24 of a PageRank ranking on an eighty-page link graph, and how many of its 23 adjacent comparisons keep their order under three kinds of doubt. Perturbing the teleport vector at the rounding level moves every entry by at most 4.05·10⁻¹¹ and settles 23 of them. Moving α across the range everybody uses moves entries by 0.00123 and settles 15. Removing a single arc — one link that might or might not have been crawled — moves entries by 0.00443 and settles 4. The gaps between consecutive entries run from 3.78·10⁻⁶ to 0.00241, so the ordering is decided by the data at a scale ten orders above anything the arithmetic does. This is the one field on the site where the computation is not the weakest part of the answer.places settled, of 23the arithmetic23 of 23one missing link4 of 23α from 0.80 to 0.9015 of 23entries move by 4.05·10⁻¹¹entries move by 0.00443entries move by 0.00123three kinds of doubtcomparisons23smallest gap3.8·10⁻⁶largest gap0.0024arithmetic band4.1·10⁻¹¹one-link band0.0044α band0.0012the arithmetic settles nearly all of themthe data settles three
Fig. 25 A longer leaderboard, where fewer of the places are settled by anything.
The lower bound is attained and the upper one is out by 37.3×Cheeger's inequality on nine graphs of about 40 vertices each: for the normalised Laplacian's λ₂, λ₂/2 ≤ φ ≤ √(2λ₂), where φ is the conductance the sweep cut actually achieves. Each row shows the two bounds as a bar and the measured conductance as a dot inside it. The lower bound is tight on the complete at a ratio of 1. The upper bound is loosest on the barbell — by a factor of 37.3 — which is the graph in the census with a real bottleneck, and therefore the shape the inequality is always quoted about. The square root is what makes it loose: it is the price of turning a spectral quantity into a combinatorial guarantee, and it is paid where the guarantee is wanted.10⁻³10⁻²10⁻¹110¹12345678910conductance, and the two bounds on itpathcyclegridbarbelltwo blockshypercubepreferentialstarcompletethe bar is the inequalitythe dot is the graph
Fig. 26 The undirected bound that has no directed analogue, which is why this field is harder.
Forward error of a 6×6 Hilbert solve at eight precisionsA bar for each significand width from 12 to 53 bits showing the relative error in the computed solution, with the condition number times the unit roundoff marked as a prediction.κ = 1.5·10⁷ · the exact answer is (1, 2, …, 6)12 bits3.316 bits0.8620 bits4.324 bits0.09330 bits7.6·10⁻⁴36 bits6.2·10⁻⁶43 bits2·10⁻⁷53 bits4.5·10⁻¹¹dashed: κ · unit roundoffone matrix, eight arithmeticsmeasured against a known answer
Fig. 27 The precision knob, which changes nothing in this essay.
Growth factor under partial pivoting to n = 40: the bound, the worst case, and realityGrowth factor against matrix size on a logarithmic vertical axis. The two-to-the-n bound rises as a straight line; Wilkinson's matrix sits exactly on it; random matrices stay near one.0816243240110²10⁴10⁶10⁸10¹⁰10¹²10¹⁴matrix size ngrowth factor max|u| / max|a|the 2ⁿ⁻¹ boundworst of 30 randommedian randomWilkinson's matrix sits on the bound30 Gaussian matrices per sizeat n = 40: bound 5.5·10¹¹, worst 4.8
Fig. 28 A bound never attained, in the field that measured it first.

What links here

Computed from the collection, not written here: the essays that point at this one.

Named objects

A flat tag is an object no other essay names yet.

Collatz wielandtDangling nodeIrreducibilityMixing timePagerankPeriodicityPerron frobeniusRegularisationStationary distributionTeleportation