Reduction, and what a model is for

A model that is a rational function

A state matrix has a hundred thousand rows and the thing anyone wants from it is a function of one complex variable. The number that says how much of that size was ever the complexity is a rank — and the rank a derivation writes down cannot be computed, while one built from samples alone can.

Worth reading first: The bound that is known in advance · Rank is a decision · A block nobody can call sparse.

Every object this site has drawn so far has been a matrix, a matrix polynomial or a tensor, and the question asked of it has been solve or decompose. A linear time-invariant model is none of those. It is

ẋ = Ax + Bu,   y = Cx,

and what anybody actually wants from it is not x. It is the map from the input to the output, which in the Laplace variable is

H(s) = C(sI − A)⁻¹B.

A is n × n, and n is whatever the discretisation happened to produce — a hundred thousand for a finite-element model of a beam, or a few million for a circuit. H is a scalar function of one complex variable. The gap between those two numbers is the whole of this field, and the first thing worth establishing is that it is a real gap rather than an artefact of how the model was written down.

The transfer function of a 24-state model, by a solve and by a formula|H(iω)| for the second-difference operator on 24 points with one actuator and one sensor. The curve is C(iωI − A)⁻¹B, one factorisation of a complex 24 × 24 matrix per frequency, and the crosses are Σ(cᵀvₖ)(vₖᵀb)/(iω − λₖ) with the eigenvalues and eigenvectors written down in closed form. The two share the coefficient matrices and no code. Below ω = 100 they agree to 1.05·10⁻¹⁴ relatively; above it the modal sum is computing a number far below its own largest term, because the residues sum to cᵀb and the sensor is not at the actuator, so the relative comparison stops meaning what it looks like. Measured against the size of the terms being added, the two agree to 3.85·10⁻¹⁵ at every frequency. A state dimension of 24 and a function of one variable: the gap between those is what the field is about.10⁻¹110¹10²10³10⁻¹¹10⁻¹⁰10⁻⁹10⁻⁸10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹frequency ω|H(iω)|one function, two routesstates24relative, ω ≤ 10010⁻¹⁴against the terms3.9·10⁻¹⁵‖H‖∞0.0924 statesone function of one variable
Fig. 1 A model of twenty-four states, and the one function anybody wants from it. The slider refines the grid and the function barely moves.

Two routes, so the picture means something

The curve above is computed by factorising a complex matrix sI − A at every frequency, which is what a code does. The crosses are a closed form: the state matrix here is the second-difference operator this site has used since its foundation phase, so its eigenvalues are 4(n+1)²sin²(kπ/2(n+1)) and its eigenvectors are the discrete sine basis, both written down rather than computed. In that basis

H(s) = Σₖ (cᵀvₖ)(vₖᵀb) / (s − λₖ),

a sum of n terms with no factorisation anywhere. The two routes share the coefficient matrices and no code, and they agree to 8·10⁻¹⁵ across the range where the comparison means what it looks like. That is the standing an answer that is known insists on, and this field needs it more than most: almost every claim below is about how far an approximation is from an answer, and an approximation compared against a better approximation is not a measurement.

The qualification is worth a paragraph, because it is the first thing this model teaches. Past about ω = 10³ the two routes stop agreeing relatively — 1.4·10⁻⁹ at the top of the range — and neither of them is wrong. The residues of this system sum to cᵀb, and the sensor is not at the actuator, so they sum to zero: the leading 1/s term of the modal expansion cancels exactly, and the sum is computing a number fifteen orders below its own largest term. Measured against the size of the terms being added, which is the backward question rather than the forward one, both routes sit at 3·10⁻¹⁵ at every frequency tried. It is a small residual is not a small error read backwards: here the comparison is the thing losing digits, and the computation is fine.

The number that is the complexity

Refine the grid and the curve above barely moves. That is not a coincidence and it is not smoothness. The modes a finer grid adds are stiff — their λ is of order n² — and an actuator with a physical extent hardly excites them, so their contribution divides by a large number twice over. The function is a property of the problem; n is a property of the discretisation.

The quantity that says how much of n was ever the complexity is the McMillan degree: the number of poles H actually has. It is a property of the input–output map and not of the coordinates, and it can be arbitrarily far below n. lowDegreeModel makes the gap explicit — the state matrix is the same second-difference operator, and the actuator and sensor are combinations of the first r sine modes only, so the remaining n − r modes are neither driven nor seen and H has exactly r poles however large n is.

That is not a trick played on the measurement. It is the ordinary situation. An actuator with a physical extent cannot excite a mode whose wavelength is shorter than it is, and it is the reason a model of a hundred thousand states can have a transfer function that six poles reproduce.

The definition, and the algorithm

Every derivation defines the degree the same way: it is the rank of the Hankel matrix of Markov parameters CAᵏB, the Taylor coefficients of H at infinity. The definition is correct. As an algorithm it does not survive contact with floating point, and the way it fails is the kind this site keeps finding.

The Markov parameters of a 24-state model: 10 exact zeros, then thirty orders|CAᵏB| against k. The first 10 are exactly zero — not small, zero, with no rounding in them — because A is a three-point stencil and information takes one step per grid point to travel the 10 points from the actuator to the sensor. After that they grow like ‖A‖ᵏ with ‖A‖ = (n+1)² = 625, reaching a ratio of 2.37·10³³ across the run. A Hankel matrix of these numbers has a dynamic range no rank decision can see through, which is why the textbook route to the McMillan degree returns the wrong integer while the route that reads only samples of H returns the right one.02468101214161810²⁹10³³10³⁷10⁴¹10⁴⁵10⁴⁹10⁵³10⁵⁷10⁶¹k|CAᵏB|10 exact zerosa definition that will not computestates24exact zeros10‖A‖, as (n+1)²625range across the run2.4·10³³zero for the travel timethen ‖A‖ᵏ
Fig. 2 The Markov parameters of a twenty-four-state model. Ten exact zeros, and then thirty orders.

Two things are visible and neither is about the transfer function. The first ten parameters are exactly zero — not small, zero, with no rounding in them — because A is a three-point stencil and information takes one step per grid point to travel the ten points from the actuator to the sensor. Then they grow like ‖A‖ᵏ with ‖A‖ = (n+1)² = 625, reaching a ratio of 1.9·10³⁷ across the run.

A Hankel matrix built from those numbers has a dynamic range no rank decision can see through. Rank is a decision about where to place a gap, and a matrix whose entries span thirty-seven orders has no gap to place: the answer comes back two where it is six.

Two rank decisions for one integer: the McMillan degree of a 40-state modelSingular values, each divided by the largest of its own set. The Loewner matrix is built from 32 samples of H on the imaginary axis and never touches A: its 6th singular value stands 9.46·10⁴ above the next, so the rank decision is not a close call. The Hankel matrix of Markov parameters CAᵏB is built from A, B and C — strictly more information — and has no cliff, because ‖A‖ is (n+1)² and its entries span 3·10³⁷. It returns 2 where the answer is 6. The definition is not the algorithm, and the route with less information is the one that works.1357911131510⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1indexsingular value ÷ the largestdegree 6from samples of Hfrom A, B and Cone integer, two routesstates40Loewner rank6its gap9.5·10⁴Markov rank2its dynamic range3·10³⁷the rank of a divided differenceand the rank that cannot be seen
Fig. 3 Two rank decisions for one integer. One of them has a cliff and the other has nothing.

The route with less information

The other route reads samples of H and nothing else. Pick two interleaved sets of points on the imaginary axis and form the Loewner matrix

L[i][j] = (H(μᵢ) − H(λⱼ)) / (μᵢ − λⱼ),

a divided difference of the function between two points. Its rank is the McMillan degree of whatever rational function produced the samples. A is never touched. The samples could have come from an instrument.

Measured on the same model, that rank is six, and the sixth singular value stands 10⁵ above the seventh at n = 20 and 2.9·10⁴ at n = 80. That is not a close call, and calling it a rank decision is not a hedge — it is a decision with a cliff to make it on, which is exactly what the cheap rank and what it cannot see says a rank needs.

So there are two routes to one integer. The first reads A, B and C — strictly more information — and returns the wrong answer. The second reads samples of a function and returns the right one with four orders to spare. The definition is not the algorithm, and this is the field’s first instance of a pattern that will recur: the object a derivation names and the object worth computing are different objects, and knowing more can be worse.

Why the Loewner route is well conditioned and the other is not

Both are ranks of matrices built from the same function, so the difference has to be in what the entries are made of.

A Markov parameter is a coefficient of the expansion of H at infinity, and that expansion has a radius of convergence set by the largest pole. Its coefficients therefore grow geometrically at a rate given by ‖A‖ — which is a property of the grid, not of the function, since a finer discretisation of the same operator has a larger norm. Every one of the six directions the Hankel matrix ought to carry is present in it; they are just scaled apart by thirty orders, and a numerical rank is blind to a direction thirty orders below the largest.

A Loewner entry is a divided difference of H between two points where H is of order one. Nothing in it grows. The matrix has six directions of size 10⁻¹ to 10⁻¹⁰ and the rest at rounding, which is precisely the shape a rank decision can read.

This is the same argument as the road that squares the problem: two constructions that are algebraically equivalent, one of which puts a large number where the other does not, and the arithmetic is decided entirely by that. It is worth noticing that here the losing construction does not square anything — it exponentiates, which is worse, and the essay’s lesson generalises past its own algebra.

Two rank decisions for one integer: the McMillan degree of a 12-state modelSingular values, each divided by the largest of its own set. The Loewner matrix is built from 32 samples of H on the imaginary axis and never touches A: its 6th singular value stands 9.53·10⁵ above the next, so the rank decision is not a close call. The Hankel matrix of Markov parameters CAᵏB is built from A, B and C — strictly more information — and has no cliff, because ‖A‖ is (n+1)² and its entries span 2.7·10³⁶. It returns 2 where the answer is 6. The definition is not the algorithm, and the route with less information is the one that works.1357911131510⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1indexsingular value ÷ the largestdegree 6from samples of Hfrom A, B and Cone integer, two routesstates12Loewner rank6its gap9.5·10⁵Markov rank2its dynamic range2.7·10³⁶the rank of a divided differenceand the rank that cannot be seen
Fig. 4 The same comparison on a coarse grid, where ‖A‖ is smaller and the Markov route is merely bad.

What a rank of six is worth knowing

A degree is not by itself a reduced model. What it is, is the answer to the question this field opens on: how large would a model have to be to reproduce this function? Six, on a system with twenty-four states or eighty; and the number is available from samples, before any reduction is attempted, without the state matrix.

That has three consequences worth carrying into the rest of the field, and it is the same shape as an eigenvalue count that cannot be slightly wrong: an integer, computed by a route that cannot be slightly wrong about it, standing in for a measurement that can.

A reduced model of order below the degree cannot be exact, and one at the degree can. So the whole question of how wrong is a reduction only becomes interesting below r = 6, and above it the answer is “not at all, up to rounding”. The essays that follow are about the region below.

The degree bounds nothing about how easy the reduction is. A function with six poles spread over four decades and a function with six poles in a cluster have the same degree and very different behaviour under approximation. What decides that is the decay of a different sequence of numbers entirely — the same distinction the best approximation there is draws between a rank and the singular values below it — and the bound that is known in advance is the essay about them.

The exact degree is almost never the number wanted. Real models have no exact degree: their Loewner singular values decay rather than falling off a cliff, and where the cut falls is a decision with the same shape as every other rank decision on this site. The clean cliff drawn above is a property of a model built to have one, and it is drawn that way so that the comparison between the two routes is not itself a judgement call.

The sampled route, and what it costs

Nothing above is free. The Loewner matrix needs 2p samples of H, and each sample is a factorisation of a complex n × n matrix — so on a model with a hundred thousand states, thirty-two samples is thirty-two large sparse solves. That is not nothing, and it is exactly the same operation every method in this field is built out of: a shifted solve, which is what restarting is a filter spends its budget on for a different reason entirely.

What it is not is a function of the degree. The number of samples decides how large a degree the rank can resolve, and the samples themselves cost what they cost whatever comes back. So a code that wants to know whether a model is worth reducing pays thirty-two solves to find out, and if the answer is six it has also — as exact at the points that were named will show — nearly paid for the reduced model itself.

Where the frequencies have to be

One decision is buried in the Loewner construction and it is the same decision this whole phase turns on: where the samples are taken.

The rank result is exact for any distinct points, in exact arithmetic. In floating point the sampling has to cover the region where H varies, or the divided differences are all nearly equal and the matrix is numerically rank one. Sampled on the real axis over the same range, this model’s Loewner singular values decay by a factor of about fifty per index rather than dropping off a cliff, and the sixth-to-seventh gap falls from 10⁵ to about 20.

The reason is worth stating because it recurs: on the imaginary axis the samples sit between the poles and each one sees a different combination of them; on the positive real axis they all sit on the same side of every pole and the resulting matrix is Cauchy-like and graded. Same theorem, same number of samples, and one is a measurement while the other is a judgement call.

The three counts, and which of them is a property of the problem

It is worth listing them together, because a reader arriving from another field will expect the first to matter and it is the only one that does not.

  • n, the state dimension. A property of the discretisation. Doubling the grid doubles it and changes the function in the fifth digit.
  • The McMillan degree. A property of the input–output map. It is what a reduced model has to carry, and it is invariant under any change of coordinates.
  • The number of samples. A property of the question being asked. It sets how large a degree can be resolved and nothing else.

Every remaining essay in this field is about a fourth number that is none of the three: the order r at which somebody chooses to truncate, which is smaller than the degree and is a decision about accuracy rather than about the model. What makes that decision possible to make well is that, uniquely in this field, there is a bound on the error before the reduced model exists.

One more thing the degree is not

A reader arriving from the sparsity field will want to know whether a low McMillan degree means the state matrix has low rank, and it does not. A is the second-difference operator: full rank, well conditioned relative to nothing, and entirely ordinary. What is low rank is the Hankel operator that maps past inputs to future outputs, which is an object built from A, B and C together and is nowhere in the model as written.

That is worth one sentence of caution because it is the natural analogy and it points the wrong way. Every other kind of smallness on this site — sparsity, off-diagonal rank, a tensor format — is a property of a matrix’s entries or its blocks, visible by looking at it. This one is a property of a triple, invisible in any of the three, and computable only by asking the triple a question.

At other settings

The transfer function of a 8-state model, by a solve and by a formula|H(iω)| for the second-difference operator on 8 points with one actuator and one sensor. The curve is C(iωI − A)⁻¹B, one factorisation of a complex 8 × 8 matrix per frequency, and the crosses are Σ(cᵀvₖ)(vₖᵀb)/(iω − λₖ) with the eigenvalues and eigenvectors written down in closed form. The two share the coefficient matrices and no code. Below ω = 100 they agree to 3.48·10⁻¹⁵ relatively; above it the modal sum is computing a number far below its own largest term, because the residues sum to cᵀb and the sensor is not at the actuator, so the relative comparison stops meaning what it looks like. Measured against the size of the terms being added, the two agree to 7.17·10⁻¹⁶ at every frequency. A state dimension of 8 and a function of one variable: the gap between those is what the field is about.10⁻¹110¹10²10³10⁻¹⁰10⁻⁹10⁻⁸10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹frequency ω|H(iω)|one function, two routesstates8relative, ω ≤ 1003.5·10⁻¹⁵against the terms7.2·10⁻¹⁶‖H‖∞0.0748 statesone function of one variable
Fig. 5 Eight states, where the modal sum has eight terms and the two routes still agree to rounding.
The transfer function of a 60-state model, by a solve and by a formula|H(iω)| for the second-difference operator on 60 points with one actuator and one sensor. The curve is C(iωI − A)⁻¹B, one factorisation of a complex 60 × 60 matrix per frequency, and the crosses are Σ(cᵀvₖ)(vₖᵀb)/(iω − λₖ) with the eigenvalues and eigenvectors written down in closed form. The two share the coefficient matrices and no code. Below ω = 100 they agree to 4.67·10⁻¹⁴ relatively; above it the modal sum is computing a number far below its own largest term, because the residues sum to cᵀb and the sensor is not at the actuator, so the relative comparison stops meaning what it looks like. Measured against the size of the terms being added, the two agree to 1.44·10⁻¹⁴ at every frequency. A state dimension of 60 and a function of one variable: the gap between those is what the field is about.10⁻¹110¹10²10³10⁻¹¹10⁻¹⁰10⁻⁹10⁻⁸10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹frequency ω|H(iω)|one function, two routesstates60relative, ω ≤ 1004.7·10⁻¹⁴against the terms1.4·10⁻¹⁴‖H‖∞0.09260 statesone function of one variable
Fig. 6 Sixty, where the curve has barely moved and every added mode divides by a larger λ.
Two rank decisions for one integer: the McMillan degree of a 20-state modelSingular values, each divided by the largest of its own set. The Loewner matrix is built from 32 samples of H on the imaginary axis and never touches A: its 6th singular value stands 3.51·10⁵ above the next, so the rank decision is not a close call. The Hankel matrix of Markov parameters CAᵏB is built from A, B and C — strictly more information — and has no cliff, because ‖A‖ is (n+1)² and its entries span 1.4·10³⁷. It returns 2 where the answer is 6. The definition is not the algorithm, and the route with less information is the one that works.1357911131510⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1indexsingular value ÷ the largestdegree 6from samples of Hfrom A, B and Cone integer, two routesstates20Loewner rank6its gap3.5·10⁵Markov rank2its dynamic range1.4·10³⁷the rank of a divided differenceand the rank that cannot be seen
Fig. 7 Twenty states, where the Markov route’s dynamic range is smaller and it is still wrong.
Two rank decisions for one integer: the McMillan degree of a 80-state modelSingular values, each divided by the largest of its own set. The Loewner matrix is built from 32 samples of H on the imaginary axis and never touches A: its 6th singular value stands 2.91·10⁴ above the next, so the rank decision is not a close call. The Hankel matrix of Markov parameters CAᵏB is built from A, B and C — strictly more information — and has no cliff, because ‖A‖ is (n+1)² and its entries span 3.7·10³⁷. It returns 2 where the answer is 6. The definition is not the algorithm, and the route with less information is the one that works.1357911131510⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1indexsingular value ÷ the largestdegree 6from samples of Hfrom A, B and Cone integer, two routesstates80Loewner rank6its gap2.9·10⁴Markov rank2its dynamic range3.7·10³⁷the rank of a divided differenceand the rank that cannot be seen
Fig. 8 Eighty, where the Loewner cliff has narrowed to 2.9·10⁴ and is still a cliff.
The Markov parameters of a 8-state model: 4 exact zeros, then thirty orders|CAᵏB| against k. The first 4 are exactly zero — not small, zero, with no rounding in them — because A is a three-point stencil and information takes one step per grid point to travel the 4 points from the actuator to the sensor. After that they grow like ‖A‖ᵏ with ‖A‖ = (n+1)² = 81, reaching a ratio of 4.59·10²³ across the run. A Hankel matrix of these numbers has a dynamic range no rank decision can see through, which is why the textbook route to the McMillan degree returns the wrong integer while the route that reads only samples of H returns the right one.02468101210⁸10¹²10¹⁶10²⁰10²⁴10²⁸10³²k|CAᵏB|4 exact zerosa definition that will not computestates8exact zeros4‖A‖, as (n+1)²81range across the run4.6·10²³zero for the travel timethen ‖A‖ᵏ
Fig. 9 Four exact zeros on a coarse grid: the travel distance is a number of grid points.
The Markov parameters of a 48-state model: 20 exact zeros, then thirty orders|CAᵏB| against k. The first 20 are exactly zero — not small, zero, with no rounding in them — because A is a three-point stencil and information takes one step per grid point to travel the 20 points from the actuator to the sensor. After that they grow like ‖A‖ᵏ with ‖A‖ = (n+1)² = 2401, reaching a ratio of 2.82·10⁴⁰ across the run. A Hankel matrix of these numbers has a dynamic range no rank decision can see through, which is why the textbook route to the McMillan degree returns the wrong integer while the route that reads only samples of H returns the right one.024681012141618202224262810⁶⁹10⁷³10⁷⁷10⁸¹10⁸⁵10⁸⁹10⁹³10⁹⁷10¹⁰¹10¹⁰⁵10¹⁰⁹k|CAᵏB|20 exact zerosa definition that will not computestates48exact zeros20‖A‖, as (n+1)²2401range across the run2.8·10⁴⁰zero for the travel timethen ‖A‖ᵏ
Fig. 10 And twenty of them on a fine one, with the growth rate up by a factor of thirty-six.
Singular values of a rank-4 matrix with noise of relative size 10⁻⁴Ten singular values on a logarithmic axis. The first four sit near one; the rest sit at the noise level, and the vertical distance between the two groups is the evidence for the rank.1234567891010⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1indexsingular valuecutoff, σ₁ · 10⁻¹⁰numerical rank 10gap 820decisivetrue rank 410×10, built with 4 nonzero valuesrank is a decision
Fig. 11 The decision every rank on this site is, and the gap it is made on.
A randomised rank-k solve, 4 seeds a rankRelative error against the rank kept, on a logarithmic vertical axis, with a vertical bar at each rank spanning the seeds. The band is 1.68 wide at rank 8, where the method is at its worst, and 1.004 wide at rank 20, where it is at its best. The same computation on the same data returns a different answer each time.0481216202428321rank keptrelative errormedianthe answer movesspread at rank 81.7spread at rank 201best median error0.15widest where the method is worstand the bound does not say so
Fig. 12 Where a rank decision stops being a decision and starts being an opinion.
What a rank-10 approximation can achieve, by spectrumA semi-logarithmic plot of singular value against index for three spectra — geometric decay, algebraic decay, and flat — with the rank-ten approximation error marked on each.1112131415110⁻³10⁻²10⁻¹1index jσⱼσ11geometric, 0.85ʲalgebraic, j^−0.00flatmeasured, and equal to σ₁₁rank-10 error, geometric0.2rank-10 error, algebraic1rank-10 error, flat160×60, spectrum chosen rather than the entriesthe matrix decides, not the method
Fig. 13 A spectrum with nothing to truncate, for contrast with one that falls off a cliff.
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. 14 The habit this field inherits: an answer known independently of the arithmetic being tested.
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⁵00.250.50.751amplification of the input perturbationfraction of directions at or belowκ = 10000worst found 76206×6, 200 directionsmedian reaches 0.29 of κ
Fig. 15 The amplifier every measurement in this field is eventually about.
Error of the best rank-k approximation to a 14×14 matrixApproximation error against k on a logarithmic axis, with the measured error and the next singular value drawn as separate curves lying exactly on top of one another.1234567891011121310⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1rank k of the approximation‖A − Aₖ‖measured, 2-normσₖ₊₁, from theorymeasured, Frobeniusthe first two agreeto 3.1·10⁻⁸worst |‖A−Aₖ‖₂ − σₖ₊₁| / σₖ₊₁3.1·10⁻⁸worst Frobenius discrepancy3.1·10⁻⁸κ = 10⁹; 30 random rank-3 matrices, none closerthe error is σₖ₊₁
Fig. 16 What a rank decision buys when the singular values do fall.
Four candidate singularity tests on three matrices, at n = 120A table of four quantities on three matrices. 0.1·I at n = 120 has a condition number of exactly 1 and a determinant of 10⁻¹²⁰; a matrix with κ = 10¹⁰ normalised to |det| = 1 has a determinant of one. The determinant and its nth root give the wrong verdict on both, the smallest singular value gives the wrong verdict on the normalised matrix because it carries the units, and only σ_min/σ_max is right on all three. A test is read as saying *singular* when its number is below 10⁻⁶; green cells agree with the true verdict and red ones do not.does this matrix look nearly singular?green: the test agrees with the truth · red: it does not · the bar under each number is its magnitude, over sixty-two decades|det A||det A|^(1/n)σ_min1/κ = σ_min/σ_max0.1·I at n = 120perfectly conditioned10⁻¹²⁰0.10.11κ = 10¹⁰, |det| = 1nearly singular1110·10⁻⁶10·10⁻¹¹Hilbert at n = 8nearly singular2.7·10⁻³³8.5·10⁻⁵1.1·10⁻¹⁰6.6·10⁻¹¹the two counterexamplesκ of the scaled identity1its determinant10⁻¹²⁰κ of the normalised matrix10¹⁰its determinant1det(cA) = cⁿ det(A)so a determinant carries the units n times over
Fig. 17 Deciding that a number is zero, which is what a McMillan degree is.
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: κ · u30×30, 20 seeds per κ; dashed is the worstthe problem worsens, not the method
Fig. 18 The gap this whole field is about, in the form it takes for a linear system.
The 16 eigenvalues of a circulant, two waysA circulant matrix of size 16 has its eigenvalues in closed form: they are the discrete Fourier transform of its first column. Plotted against an eigensolver's answer for the same matrix, the two curves lie on top of each other to 2.6·10⁻¹⁵ relative. The eigenvectors are the same for every circulant of this size and are known before any entry is looked at.024681012141610⁻¹1index kλthe transformthe eigensolverC = F* Λ F is a factorisationworst relative disagreement2.6·10⁻¹⁵‖Cx − b‖/‖b‖ from the transform solve4.7·10⁻¹⁶imaginary part of a real spectrum1.2·10⁻¹⁶n = 16, and the whole matrix is 16 numberseigenvectors known in advance
Fig. 19 A model whose transfer function is a formula in its own eigenvalues.
The running estimate of a diagonal 200×200 matrix's trace, from the two probe distributionsTwo curves of the running average against the number of probes. The ±1 probe returns 498.5 — the exact trace — from its first draw and never moves, because zᵀAz is Σ a_ii z_i² and every z_i² is 1. The normal probe starts at 620.39 and is still 0.0086 away after 60 of them.11121314151489517.279545.557573.836602.114probes takenrunning estimate of the tracenormal±1one probe, no errorthe exact trace499±1 variance, this matrix0±1 variance, rotated297normal variance2785the same spectrum in a general basiscosts the ±1 probe its whole advantage
Fig. 20 The one case where a state matrix is its own modal form.
How far a perturbation of size ε moves an eigenvalue, 10×10A log–log plot of eigenvalue movement against perturbation size. The symmetric case lies on a line of slope one; the non-symmetric case lies on a line of slope one eighth, and at a perturbation of ten to the minus sixteen it has already moved by a hundredth.10⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹size of the perturbation ‖δA‖how far the eigenvalues moveJordan block, ε^(1/10)symmetric, ≤ ‖δA‖rounding error alone moves it to 10⁻²six seeds per symmetric point; Jordan is closed formsymmetry beats precision
Fig. 21 The poles of H are eigenvalues of A, and they have condition numbers.
sep(A, B) and the smallest |λᵢ(A) + μⱼ(B)| as the departure from normality grows, n = 6A and B are upper triangular with diagonals 1, 2, …, 6 and μ above them, so every eigenvalue sum is at least 2 at every point on the axis and the flat line is exact rather than nearly flat. sep — the smallest ‖AX + XB‖_F over ‖X‖_F = 1, and the reciprocal of the amplification a perturbation of C receives — starts equal to the gap at μ = 0, where the matrices are normal, and falls to 9.47·10⁻⁴ at μ = 8. The number a reader is invited to consult is the one that does not move.01234567810⁻⁵10⁻⁴10⁻³10⁻²10⁻¹110¹μ, the entry above the diagonalsep, and the eigenvalue gapmin |λᵢ + μⱼ|sep(A, B)the spectra never moveeigenvalue gap, throughout2sep at μ = 02sep at μ = 89.5·10⁻⁴amplification there1056solvability is the eigenvaluesand conditioning is not
Fig. 22 The quantity that governs the Lyapunov equations the next essay solves.
The two 3×3 matrices of a Sylvester equation, and the 9×9 matrix it meansA and B are 3×3 with 5 nonzeros each. The coefficient matrix of the map X ↦ AX + XB is 9×9 with 21 nonzeros, drawn at the same scale so the ratio is visible rather than quoted. Bartels and Stewart's algorithm never forms it: two Schur reductions and a back-substitution give the same X to 5.5·10⁻¹⁷, and that X satisfies AX + XB = C to 8.8·10⁻¹⁷.A3×3B3×3I ⊗ A + Bᵀ ⊗ I9×9one equation, two objectsentries in A and B18entries in the coefficient matrix81two routes, relative gap5.5·10⁻¹⁷‖AX + XB − C‖/‖C‖8.8·10⁻¹⁷the small squares are the problemand the large one is the notation
Fig. 23 And the equation itself, whose unknown is a matrix.
The residual basis of conjugate gradients, at κ = 104A semi-logarithmic plot against iteration count showing the loss of orthogonality among the residual vectors rising while the relative residual falls.05101520253010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹iteration‖RᵀR − I‖ and ‖r‖/‖b‖step n‖RᵀR − I‖residual30×30, run for exactly n stepsexact arithmetic would end here
Fig. 24 The basis every sampled method in this field eventually needs.
GMRES on the Laplacian and on the cyclic shift, both 12×12A semi-logarithmic plot of relative residual against iteration. One curve falls steadily; the other is flat at one for every step until the last, where it drops to zero.02468101210⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1iteration‖r‖ / ‖b‖Laplaciancyclic shiftno progress at allevery eigenvalue of the shift is on the unit circleand it predicts nothing
Fig. 25 A spectrum that predicts nothing, for a method that reads one.
The transfer function of a 12-state model, by a solve and by a formula|H(iω)| for the second-difference operator on 12 points with one actuator and one sensor. The curve is C(iωI − A)⁻¹B, one factorisation of a complex 12 × 12 matrix per frequency, and the crosses are Σ(cᵀvₖ)(vₖᵀb)/(iω − λₖ) with the eigenvalues and eigenvectors written down in closed form. The two share the coefficient matrices and no code. Below ω = 100 they agree to 2.96·10⁻¹⁵ relatively; above it the modal sum is computing a number far below its own largest term, because the residues sum to cᵀb and the sensor is not at the actuator, so the relative comparison stops meaning what it looks like. Measured against the size of the terms being added, the two agree to 1.23·10⁻¹⁵ at every frequency. A state dimension of 12 and a function of one variable: the gap between those is what the field is about.10⁻¹110¹10²10³10⁻⁸10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹1frequency ω|H(iω)|one function, two routesstates12relative, ω ≤ 1003·10⁻¹⁵against the terms1.2·10⁻¹⁵‖H‖∞0.1212 statesone function of one variable
Fig. 26 Twelve states, where every mode is still visible in the response.
The transfer function of a 40-state model, by a solve and by a formula|H(iω)| for the second-difference operator on 40 points with one actuator and one sensor. The curve is C(iωI − A)⁻¹B, one factorisation of a complex 40 × 40 matrix per frequency, and the crosses are Σ(cᵀvₖ)(vₖᵀb)/(iω − λₖ) with the eigenvalues and eigenvectors written down in closed form. The two share the coefficient matrices and no code. Below ω = 100 they agree to 2.18·10⁻¹⁴ relatively; above it the modal sum is computing a number far below its own largest term, because the residues sum to cᵀb and the sensor is not at the actuator, so the relative comparison stops meaning what it looks like. Measured against the size of the terms being added, the two agree to 9.62·10⁻¹⁵ at every frequency. A state dimension of 40 and a function of one variable: the gap between those is what the field is about.10⁻¹110¹10²10³10⁻¹¹10⁻¹⁰10⁻⁹10⁻⁸10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹frequency ω|H(iω)|one function, two routesstates40relative, ω ≤ 1002.2·10⁻¹⁴against the terms9.6·10⁻¹⁵‖H‖∞0.09340 statesone function of one variable
Fig. 27 Forty, and the two routes have not parted below ω = 100.
The Markov parameters of a 16-state model: 6 exact zeros, then thirty orders|CAᵏB| against k. The first 6 are exactly zero — not small, zero, with no rounding in them — because A is a three-point stencil and information takes one step per grid point to travel the 6 points from the actuator to the sensor. After that they grow like ‖A‖ᵏ with ‖A‖ = (n+1)² = 289, reaching a ratio of 2.01·10²⁹ across the run. A Hankel matrix of these numbers has a dynamic range no rank decision can see through, which is why the textbook route to the McMillan degree returns the wrong integer while the route that reads only samples of H returns the right one.0246810121410¹⁵10¹⁹10²³10²⁷10³¹10³⁵10³⁹10⁴³k|CAᵏB|6 exact zerosa definition that will not computestates16exact zeros6‖A‖, as (n+1)²289range across the run2·10²⁹zero for the travel timethen ‖A‖ᵏ
Fig. 28 Sixteen, where the growth is already twenty orders across the run.
The Markov parameters of a 32-state model: 12 exact zeros, then thirty orders|CAᵏB| against k. The first 12 are exactly zero — not small, zero, with no rounding in them — because A is a three-point stencil and information takes one step per grid point to travel the 12 points from the actuator to the sensor. After that they grow like ‖A‖ᵏ with ‖A‖ = (n+1)² = 1089, reaching a ratio of 9.6·10³⁵ across the run. A Hankel matrix of these numbers has a dynamic range no rank decision can see through, which is why the textbook route to the McMillan degree returns the wrong integer while the route that reads only samples of H returns the right one.0246810121416182010³⁷10⁴¹10⁴⁵10⁴⁹10⁵³10⁵⁷10⁶¹10⁶⁵10⁶⁹10⁷³k|CAᵏB|12 exact zerosa definition that will not computestates32exact zeros12‖A‖, as (n+1)²1089range across the run9.6·10³⁵zero for the travel timethen ‖A‖ᵏ
Fig. 29 And thirty-two, where a rank decision has nothing left to read.
Two rank decisions for one integer: the McMillan degree of a 60-state modelSingular values, each divided by the largest of its own set. The Loewner matrix is built from 32 samples of H on the imaginary axis and never touches A: its 6th singular value stands 7.4·10⁴ above the next, so the rank decision is not a close call. The Hankel matrix of Markov parameters CAᵏB is built from A, B and C — strictly more information — and has no cliff, because ‖A‖ is (n+1)² and its entries span 3.5·10³⁷. It returns 2 where the answer is 6. The definition is not the algorithm, and the route with less information is the one that works.1357911131510⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1indexsingular value ÷ the largestdegree 6from samples of Hfrom A, B and Cone integer, two routesstates60Loewner rank6its gap7.4·10⁴Markov rank2its dynamic range3.5·10³⁷the rank of a divided differenceand the rank that cannot be seen
Fig. 30 Sixty states and a degree of six, which is the sentence this field opens on.
Three routes to the error of a rank-k approximation of one block, at q = 0.5The upper line is q^(p+1)/(1 − q), which used four numbers about two intervals and no entry of the matrix. The middle line is the truncated expansion actually evaluated — a rank p + 1 matrix written down as a table of powers, with no decomposition anywhere in it — and it falls at -0.36 decades a column, close to the log₁₀ q = -0.30 the bound predicts. The lower line is the decomposition, which is optimal by construction, and it falls at -1.74 — 4.8 times as fast. Two of these curves share no arithmetic. What they agree on is that the error is geometric in the rank; what they disagree on is the base, by a factor in the exponent rather than a constant, and the disagreement is why a partition allocated from the bound is safe and wasteful at the same time.0246810121410⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹rank of the approximationrelative errorthe boundthe expansion, evaluatedthe decompositiontwo routes, one shapebound at rank 50.063expansion at rank 50.0048decomposition at rank 52.8·10⁻⁹written, decades a column0.36best, decades a column1.7one route used the matrixand the other used four numbers
Fig. 31 Two routes to a rank in another field, which agree.
What the black-box construction costs: the rank has to be chosen before anything is knownThe compression route is handed an accuracy and returns whatever rank that costs. This one is handed a rank and returns whatever accuracy that buys, because the random matrix has to be drawn before a single entry of the block has been seen. The curve is a straight line at -0.90 decades a column — from 0.0328 at k = 2 to 3.43·10⁻¹¹ at k = 12 — so the guess is a guess about a number of digits, and being two columns short costs about a decade and a half. The lower line is the best representation of the same rank, so the vertical gap is what never seeing the matrix costs: 2.9, 3.9, 5.3, 4.7, 5.8, 3.6 times, widening slowly as the rank grows, because a sample of a block whose spectrum has already fallen off a cliff is sampling noise.0246810121410⁻¹¹10⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹rank asked of every block‖A − A_H‖ ⁄ ‖A‖built from productsthe best of the same rankan accuracy for a rankerror at k = 20.033error at k = 123.4·10⁻¹¹decades a column0.9products at the top184excess over the optimum3.6one route asks for digitsand the other asks for columns
Fig. 32 Guessing a rank instead of computing it, and what that costs.
Every column's 1-norm on a 12×12 matrix built to stop Hager's walk one column short12 bars, one per column, each the sum of the absolute values in that column — the quantity the estimator maximises, whose largest is the matrix's 1-norm. The walk visits 1 of them and returns 12.00; column 2 has 1-norm 114.00 and is never visited, because its entries alternate in sign and cancel against every sign vector the walk stands on.the estimator maximises this quantity over the columns it visitscolumn 1 ‹visited›12column 2 ‹the answer›114column 311.4column 411.4column 511.4column 611.4column 711.4column 811.4column 911.4column 1011.4column 1111.4column 1211.4estimate 12.0a walk that stopped earlythe estimate returned12the true 1-norm114columns visited1products with the matrix5the walk's own stopping test firedand every column it could see was smaller
Fig. 33 An estimate of a quantity that is never formed, which is what a sampled degree is.
Two trace estimators against their budget, on a 80×80 matrix whose spectrum decays at 0.7Two curves of relative error against the number of products with A, both axes logarithmic, as medians over 32 seeds. Hutchinson's fitted exponent is -0.31 and Hutch++'s is -5.07. The deflation changes the exponent rather than the constant, which is what makes it worth two thirds of the budget.10¹10²10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹1products with Arelative errorHutchinsonHutch++measured at equal costfitted rate, Hutchinson-0.31fitted rate, Hutch++-5.1error at 96, Hutchinson0.051error at 96, Hutch++2.1·10⁻⁶both axes count products with Aso the sketch is paid for in the picture
Fig. 34 Reading a matrix through probes rather than through its entries.
Relative error of each singular value of a bidiagonal matrix graded over 11 decades, by four routesThe matrix is 8×8, bidiagonal, and every entry is a power of two times a small integer, so the matrix the float routines are handed and the matrix the exact routine reasons about are the same matrix. The reference is a Sturm bisection in BigInt rationals, which never rounds. σ_min is 1.934·10⁻¹¹. One-sided Jacobi holds every value to 7.1·10⁻¹⁶ relative and the zero-shift bidiagonal sweep to 4.41·10⁻¹⁶; the eigenvalues of BᵀB are wrong by 14.5 — not a rounding error but the whole number — and the damage is entirely at the small end.1234567810⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹singular value, largest firstrelative errorone-sided Jacobizero-shift QRshifted QReigenvalues of BᵀBagainst a rational bisectionσ_min, exactly1.9·10⁻¹¹worst, one-sided Jacobi7.1·10⁻¹⁶worst, zero-shift QR4.4·10⁻¹⁶worst, eigenvalues of BᵀB15a relative error is a ratioand the denominator is the answer
Fig. 35 A spectrum spanning ten decades, which is what makes the Markov route hopeless.
The worst relative error over the whole spectrum, against how many decades the matrix is graded over, n = 12Each point is one bidiagonal matrix and the worst relative error any of its singular values suffers, measured against a Sturm bisection in exact rationals. The route through BᵀB is as good as anything at 3.3 decades — 9.14·10⁻¹³ — and by 10 decades it is at 2.02, which is not an error in the answer, it is the answer. One-sided Jacobi and the zero-shift bidiagonal sweep are flat at about the unit roundoff across the whole range, which is the claim this site's own SVD has been making in a source comment since it was written and had never measured.0102030405010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹10⁴10⁷decades of gradingworst relative errorthe answer is gonevia BᵀBone-sided Jacobizero-shift QRone axis, four routesBᵀB at the narrowest grading9.1·10⁻¹³and at the widest1Jacobi, worst over the sweep1.5·10⁻¹⁵zero shift, worst1.8·10⁻¹⁵the definition is not a methodand squaring buries what it squares
Fig. 36 Grading, measured: the property that decides whether a rank can be read.
Two condition numbers of one 8×8 system, as its rows are put into different unitsFour curves against the spread of the row units, in decades. κ_∞ of the scaled matrix rises from 9.83 to 1.9·10¹⁰ while the componentwise condition number stays at 6.98 throughout — the same system, the same solution, and one of the two numbers is a fact about the units. Hilbert's two numbers are drawn flat beside them at 3.4·10¹⁰ and 1.2·10¹⁰: a matrix whose sensitivity no scaling repairs.0246810110²10⁴10⁶10⁸10¹⁰10¹²spread of the row units (decades)condition numberκ_∞(DA)cond(DA)Hilbert κ_∞Hilbert condone system, two numbersκ_∞ at no spread9.8κ_∞ at 10 decades1.9·10¹⁰cond, either end7Hilbert, equilibrated1.3·10¹⁰the solution is the same at every spreadand one of these curves knows it
Fig. 37 And the change of units that removes it, where one is available.

What links here

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

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

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

Condition numberExact ground truthLoewner matrixMarkov parameterMcMillan degreeNumerical rankRankSingular valuesTransfer function