Structure, and the solver that cannot see it

The size of the data, not its rank

A Lyapunov equation with rank-one data reopened a gap of thousands between a Sylvester solution's backward error and its residual, where random equations had shown under a dozen. Its data had two unusual features, low rank and a small size against the operator. Separated, the size does all of it. Rank-one data as large as AX can be keeps the ratio under 2.3 at every spread of the coefficients' eigenvalues; rank-one data along their smallest directions, at a size of 10⁻⁶ against the operator, puts it at 1 to 2·10⁵; and full-rank data of the same small size opens the gap just as wide. On every equation of these kinds, the Gramian's included, the ratio is between 0.07 and 0.5 times one over that size, and one plus one over the size is a ceiling no equation can pass. The earlier commuting family sits far under it, which says what else the gap needs. The forward error does not notice any of it.

Worth reading first: An equation whose unknown is a matrix · The exact answer to a nearby problem · Orthogonal is a number.

What the commuting family was hiding closed a gap and found another. A family of Sylvester equations AX+XB=CAX + XB = C, built so that the solution commutes with the coefficients, had shown the normwise backward error of a computed solution climbing 26,000 times above its scaled residual while the forward error stayed where it was. Replace the solution by a random matrix of the same singular values and the gap shrinks to under a dozen everywhere. Then a controllability Gramian’s equation, AX+XAT=−bbTAX + XA^{\mathsf T} = -bb^{\mathsf T} with AA’s eigenvalues spread over six decades, reopened it to thousands, and that essay found that what tracked the gap was the spread, not the solution’s condition number.

Its last section named the two features of the Gramian’s data that a random equation lacks. The right-hand side has rank one, and it is small against the operator: bbTbb^{\mathsf T} is of order one while AA is of order 10610^6. It signed a prediction that separated them. A rank-one CC “scaled to the size of AXAX” would keep the ratio under 20 at any spread, and the same CC “scaled down by 10−610^{-6}” would put it above a thousand, “so that it is the size and not the rank that opens the gap”.

That is what happens, with one adjustment to what “scaled” can mean, and the measurement goes one step further than the prediction: once the data’s size is measured properly, every equation tried lies on a single line.

What it means for data to be small

The equation is one whose unknown is a matrix, and the elimination the matrix does not need explained why it is solved through two Schur forms rather than as a linear system of n2n^2 unknowns. Scaling CC alone cannot make it small against the operator. The equation is linear, so multiplying CC by 10−610^{-6} multiplies the solution by 10−610^{-6} too, and every ratio between them is unchanged. What makes data small is where it points. The operator X↦AX+XBX \mapsto AX + XB multiplies a component of XX along an eigenvector of AA and an eigenvector of BB by the sum of their eigenvalues, so data along the large eigenvectors produces a solution of size ∥C∥/(2λmax⁡)\|C\|/(2\lambda_{\max}), and data along the small ones a solution of size ∥C∥/(2λmin⁡)\|C\|/(2\lambda_{\min}). The natural measure is

γ=∥C∥(∥A∥+∥B∥) ∥X∥,\gamma = \frac{\|C\|}{(\|A\| + \|B\|)\,\|X\|},

which is near one when CC is as large as AXAX could make it, and near λmin⁡/λmax⁡\lambda_{\min}/\lambda_{\max} when it points along the smallest directions. The Gramian’s bbTbb^{\mathsf T} has components along every direction, and its solution is dominated by the smallest: so its γ\gamma is small, about the reciprocal of the spread. That domination is also why a Gramian can be truncated at all: the same few small directions that make the data small against the operator carry almost all of the solution.

The equations here are of order 8. A=Qdiag⁡(λ)QTA = Q\operatorname{diag}(\lambda)Q^{\mathsf T} and B=Rdiag⁡(λ)RTB = R\operatorname{diag}(\lambda)R^{\mathsf T} share eigenvalues spread geometrically over dd decades, from zero to six, with independent random eigenvectors, so that nothing commutes. Four right-hand sides of unit norm are tried at each spread: rank one along the largest eigenvectors of AA and BB, rank one along their smallest, a random rank-one uvTuv^{\mathsf T}, and a random full-rank matrix. In the two eigenbases the exact solution is one division per entry, so it is known to rounding. Each equation is solved by Bartels and Stewart’s Schur method, and three draws are taken at each setting.

The data's size against the operator, γ = ‖C‖/((‖A‖ + ‖B‖)‖X‖), against the spread of the eigenvalues, for four kinds of right-hand side and for the Lyapunov equation, median of three drawsrank one, largest directions: 3.5e-1, 7.0e-1, 8.6e-1, 9.3e-1, 9.6e-1, 9.8e-1, 9.9e-1; rank one, smallest directions: 3.5e-1, 7.0e-2, 8.6e-3, 9.3e-4, 9.6e-5, 9.8e-6, 9.9e-7; rank one, random: 3.5e-1, 1.5e-1, 3.1e-2, 4.8e-3, 6.4e-4, 8.0e-5, 9.6e-6; full rank, random: 3.5e-1, 1.5e-1, 2.8e-2, 3.5e-3, 3.9e-4, 4.1e-5, 4.2e-6; Lyapunov: 3.5e-1, 1.7e-1, 3.7e-2, 6.4e-3, 9.8e-4, 1.4e-4, 2.0e-5, at spreads of 0 to 6 decades.012345610⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹1spread of the eigenvalues, decadesγrank one, largest directionsrank one, smallest directionsrank one, randomfull rank, randomLyapunov, −bbᵀunit ‖C‖ in every casewhere C points sets its size
Fig. 1 The data’s size against the operator, γ, against the spread of the eigenvalues, for four kinds of right-hand side and for the Lyapunov equation, median of three draws.

Rank-one data along the largest directions has γ\gamma between 0.35 and 0.99 at every spread, rising toward one as the spread makes the largest eigenvalue dominate the norm. Rank-one data along the smallest has γ\gamma falling exactly a decade per decade of spread, to 9.9⋅10−79.9 \cdot 10^{-7} at six. The random rank-one and full-rank data fall nearly as fast, to between 2.5⋅10−62.5 \cdot 10^{-6} and 1.1⋅10−51.1 \cdot 10^{-5}, because a random vector has a component along the smallest directions and that component dominates the solution. The Gramian’s equation falls more slowly and less regularly, to between 5⋅10−65 \cdot 10^{-6} and 3⋅10−43 \cdot 10^{-4} over its three draws, depending on how much of bb happens to lie along AA’s smallest eigenvectors.

Rank one, at both ends of the size

For AX + XB = C of order 8 with A and B of the same eigenvalues spread over d decades and independent eigenvectors, and C of unit norm, rank one, smallest directions: the normwise backward error of the Bartels–Stewart solution over its scaled residual, and one over the data's size against the operator, against the spread, median of three draws0 decades: ratio 2.3, 1/γ 2.8; 1 decades: ratio 3.3, 1/γ 14.4; 2 decades: ratio 27.9, 1/γ 116.9; 3 decades: ratio 223.3, 1/γ 1077.7; 4 decades: ratio 2879.4, 1/γ 10380.5; 5 decades: ratio 38882.6, 1/γ 101917.6; 6 decades: ratio 191289.2, 1/γ 1009795.6.0123456110¹10²10³10⁴10⁵10⁶spread of the eigenvalues, decadesratio, and 1/γ1/γbackward error over residualorder 8 · unit ‖C‖ · three drawsthe ratio follows the size
Fig. 2 The backward error over the scaled residual, and one over γ, against the spread, for one kind of right-hand side. The dial sets the kind.

At the dial’s first stop, rank-one data along the largest directions, the ratio is 2.2 with no spread and 1.7 from three decades on: under 2.3 at every spread and every draw. The prediction’s first half asked for under 20 and holds with a factor of nine to spare. At the second stop, rank-one data along the smallest directions, the ratio climbs with the spread: 3.3 at one decade, 28 at two, 223 at three, 2,879 at four, 38,883 at five and 191,289 at six. At six decades, where γ\gamma is 9.9⋅10−79.9 \cdot 10^{-7}, the three draws give between 105,000 and 223,000. The prediction’s second half asked for above a thousand at a size of 10−610^{-6} and holds by two decades.

Both kinds are rank one, both produce a rank-one solution, and both are of unit norm. They differ only in where they point. So rank one on its own does nothing, and the first half of the prediction’s conclusion stands.

Full rank, at the same small size

The third and fourth stops of the dial are random data, rank one and full rank. Their γ\gamma falls with the spread at nearly the same rate, and their ratios climb at nearly the same rate: at six decades 6,886 to 49,231 for the random rank-one data and 24,834 to 31,425 for the full-rank data. A random full-rank right-hand side of unit norm, solved on coefficients of six decades’ spread, has a backward error thirty thousand times its residual. Nothing about its rank is unusual. Its size is.

That settles the second half of the conclusion, and it also corrects the earlier essay’s account of the random family. There, XX was chosen and CC formed from it, C=AX+XBC = AX + XB, which for a random XX makes CC comparable to ∥A∥∥X∥\|A\|\|X\|: its γ\gamma is about 0.1 at every setting of that family, and its ratio sat between 3.5 and 4.8, at half of one over γ\gamma, on the same line. The random family had large data because of how it was built, not because random equations are benign.

One line for every equation

The backward error over the scaled residual against γ, the data's size against the operator, for four kinds of right-hand side at seven spreads and for the Lyapunov equation with rank-one data, median of three drawsrank one, largest directions: 2.3 at γ 3.5e-1, 1.9 at γ 7.0e-1, 1.7 at γ 8.6e-1, 1.7 at γ 9.3e-1, 1.7 at γ 9.6e-1, 1.7 at γ 9.8e-1, 1.7 at γ 9.9e-1; rank one, smallest directions: 2.3 at γ 3.5e-1, 3.3 at γ 7.0e-2, 27.9 at γ 8.6e-3, 223.3 at γ 9.3e-4, 2879.4 at γ 9.6e-5, 38882.6 at γ 9.8e-6, 191289.2 at γ 9.9e-7; rank one, random: 2.2 at γ 3.5e-1, 3.1 at γ 1.5e-1, 11.5 at γ 3.1e-2, 45.2 at γ 4.8e-3, 251.0 at γ 6.4e-4, 2096.4 at γ 8.0e-5, 17897.9 at γ 9.6e-6; full rank, random: 2.9 at γ 3.5e-1, 4.5 at γ 1.5e-1, 12.3 at γ 2.8e-2, 66.7 at γ 3.5e-3, 287.9 at γ 3.9e-4, 3456.9 at γ 4.1e-5, 27301.5 at γ 4.2e-6; Lyapunov: 2.3 at γ 3.5e-1, 2.5 at γ 1.7e-1, 11.8 at γ 3.7e-2, 48.3 at γ 6.4e-3, 102.7 at γ 9.8e-4, 1214.1 at γ 1.4e-4, 5154.8 at γ 2.0e-5. Below γ = 10⁻², ratio times γ lies between 0.07 and 0.51 on every draw.10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹1110¹10²10³10⁴10⁵10⁶γ = ‖C‖ / ((‖A‖ + ‖B‖)‖X‖)backward error over residualrank one, largest directionsrank one, smallest directionsrank one, randomfull rank, randomLyapunov, −bbᵀ0.2/γevery kind on one linesize, not rank
Fig. 3 The backward error over the scaled residual against γ, for four kinds of right-hand side at seven spreads and for the Lyapunov equation with rank-one data, median of three draws.

Plotted against γ\gamma instead of the spread, the four kinds of data and the Gramian’s equation fall on one line. Below γ=10−2\gamma = 10^{-2}, the ratio times γ\gamma lies between 0.07 and 0.51 on every one of their draws: 0.10 to 0.51 for rank-one data along the smallest directions, 0.08 to 0.30 for random rank-one data, 0.07 to 0.27 for full-rank data, and 0.08 to 0.46 for the Lyapunov equation. Above γ=0.1\gamma = 0.1 every kind sits near two. So the ratio is, to within a factor of seven across all of them, a fifth of one over the data’s size, and nothing else about the data enters.

The reason is visible in the two quantities’ definitions. The scaled residual divides the residual by (∥A∥+∥B∥)∥X∥+∥C∥(\|A\| + \|B\|)\|X\| + \|C\|, which is dominated by the first term when γ\gamma is small. The backward error is the size of the smallest perturbation of AA, BB and CC, each measured against its own norm, that makes X^\hat X an exact solution. A perturbation of AA or BB moves the equation by an amount proportional to X^\hat X, so it can only cancel the part of the residual that lies along X^\hat X’s large directions; the rest has to be bought with a perturbation of CC, at a price of ∥R∥/∥C∥\|R\|/\|C\|. When γ\gamma is small that price is 1/γ1/\gamma times the scaled residual. The fifth is the share of the residual that AA and BB cannot absorb.

A ceiling, and a family that stays under it

The line has an exact upper edge, and it is worth deriving because it says what the line cannot be. Putting the whole backward perturbation on CC is always possible: change CC by the residual and X^\hat X solves the changed equation exactly, at a relative cost of ∥R∥/∥C∥\|R\|/\|C\|. The backward error is the cheapest perturbation, so it is never more than that. The scaled residual is ∥R∥\|R\| over (∥A∥+∥B∥)∥X^∥+∥C∥(\|A\| + \|B\|)\|\hat X\| + \|C\|. Dividing one by the other,

ηρ≤(∥A∥+∥B∥)∥X^∥+∥C∥∥C∥=1+1γ,\frac{\eta}{\rho} \le \frac{(\|A\| + \|B\|)\|\hat X\| + \|C\|}{\|C\|} = 1 + \frac{1}{\gamma},

on every equation, whatever its structure. The measurements here sit between a fifteenth and a half of that ceiling once γ\gamma is below a hundredth.

The earlier essays’ commuting family shows that the ceiling need not be approached. Its data is C=δXC = \delta X, so its γ\gamma is set by δ\delta alone: at δ=10−6\delta = 10^{-6} it is 3.5⋅10−83.5 \cdot 10^{-8}, and the ceiling is about thirty million. With the solution’s singular values all equal, its ratio is 4.0. As the singular values spread, it rises: 7.4 at two decades, 32 at four, 700 at six and 51,000 at eight. So small data is necessary for a large gap and not sufficient. The other requirement is that the residual lie where the computed solution is small, so that a perturbation of AA or BB, which acts through X^\hat X, cannot reach it. A solution with all its singular values equal can absorb any residual through AA at a cost of ∥R∥/∥X^∥\|R\|/\|\hat X\|, and then the data’s size never enters. In the four kinds of data here, and in the Gramian, the solution is dominated by the operator’s smallest directions, which is exactly what makes the data small, so the two requirements arrive together and the ratio rides close to its ceiling.

That reconciles the three essays. The commuting family’s gap needed both its small δ\delta and its spread of singular values, and a backward error the answer does not feel varied the second; the random family had neither; and the Gramian has both for one reason, its spread. The prediction’s “size and not rank” is right about rank and incomplete about size: size sets the ceiling, and the solution’s shape decides how much of it is used.

Where the perturbation falls

The share of the smallest backward perturbation that falls on C, against the spread, for four kinds of right-hand side, median of three drawsrank one, largest directions: 0.66, 0.79, 0.81, 0.82, 0.81, 0.86, 0.82; rank one, smallest directions: 0.63, 0.82, 1.00, 1.00, 1.00, 1.00, 1.00; rank one, random: 0.61, 0.79, 0.82, 0.98, 0.98, 0.98, 0.96; full rank, random: 0.79, 0.74, 0.71, 0.92, 0.95, 0.86, 0.94, at spreads of 0 to 6 decades.01234560.50.60.70.80.91spread of the eigenvalues, decadesshare of the perturbation on Crank one, largest directionsrank one, smallest directionsrank one, randomfull rank, randomminimum-norm perturbation of A, B and Csmall data takes the whole of it
Fig. 4 The share of the smallest backward perturbation that falls on C, against the spread, for four kinds of right-hand side, median of three draws.

The minimum-norm perturbation’s share on CC confirms it. For rank-one data along the smallest directions the share is 0.82 at one decade of spread and 1.00 from two decades on: all of the backward perturbation is on the data. For the random kinds it climbs past 0.9 by three decades. For rank-one data along the largest directions it stays between 0.66 and 0.86, with the rest on the coefficients, and that is the case where the ratio stays near two. A backward error the answer does not feel first measured this share, on the commuting family, and found it near one where the gap was large; the earlier essay predicted it would fall below a half without commuting and found it did not. Both readings are the same fact: the share on CC is near one whenever CC is small against the operator, and whether XX commutes was never the variable.

The forward error does not care

The relative forward error of the Bartels–Stewart solution against the spread, for four kinds of right-hand side, median of three drawsrank one, largest directions: 1e-15, 2e-15, 3e-15, 2e-14, 1e-13, 5e-13, 5e-12; rank one, smallest directions: 2e-15, 2e-15, 3e-15, 1e-14, 1e-13, 2e-12, 5e-12; rank one, random: 1e-15, 3e-15, 4e-15, 1e-14, 6e-14, 2e-12, 5e-12; full rank, random: 1e-15, 3e-15, 4e-15, 1e-14, 8e-14, 2e-12, 6e-12, at spreads of 0 to 6 decades.012345610⁻¹⁶10⁻¹⁵10⁻¹⁴10⁻¹³10⁻¹²10⁻¹¹10⁻¹⁰spread of the eigenvalues, decadesrelative forward errorrank one, largest directionsrank one, smallest directionsrank one, randomfull rank, randomagainst X known in the eigenbasesthe gap is not an accuracy
Fig. 5 The relative forward error of the Bartels–Stewart solution against the spread, for four kinds of right-hand side, median of three draws.

All of this is a statement about two measures of the same computed solution, and the solution itself is equally good on all four kinds. The relative forward error is 10−1510^{-15} with no spread and rises to about 5⋅10−125 \cdot 10^{-12} at six decades, the same on rank-one data along the largest directions, where the ratio is 1.7, as on data along the smallest, where it is 190,000. It grows with the spread because the operator’s conditioning grows with it, as the residual knew the error found when it fitted the forward error to the residual times ∥P−1∥\|P^{-1}\|. So a backward error two hundred thousand times its residual is not a warning about the answer. It is a warning about the measure, which has been asked to perturb data that was too small to perturb cheaply.

That is the practical content. A program that reports the normwise backward error of a Sylvester or Lyapunov solution, as a certificate that it solved a nearby problem, will report a value that depends on the data’s size against the operator, and on a Gramian with any spread at all that value will look alarming while the solution is as accurate as the conditioning allows. The scaled residual, together with an estimate of the separation, describes the forward error on every equation here, and the separation can be estimated cheaply from the Schur factors, with the caveats an estimate that can be fooled attaches to any such estimate. The bound that is known in advance is what balanced truncation promises from a Gramian’s singular values, and those singular values come from solutions whose backward errors, on this measure, look like failures.

A number a program can print

γ\gamma costs three norms, all of which a solver has in hand after the solve, and it turns the backward error from an alarm into a reading. A program that reports both the backward error and γ\gamma tells its user, in effect, how much of the backward error was the data’s size: if the ratio of the backward error to the scaled residual is near 1/γ1/\gamma, the perturbation is on the data and the coefficients were never in question, and if it is near one, the perturbation is on the coefficients and is the more informative of the two numbers. On every equation here one of those two descriptions applies, and the forward error is the scaled residual times the operator’s conditioning in both.

The same accounting runs through the subject wherever a backward error has more than one place to put its perturbation. The exact answer to a nearby problem is the definition, and it does not say which part of the problem the nearby one differs in. For a linear system the right-hand side is usually given a weight, as it is here, and the share that lands on it is rarely printed. For a matrix equation the share is the whole story of the gap: printed beside the backward error, it would have told the earlier essays at once that their alarming numbers were statements about CC.

What eight unknowns and seven spreads do not settle

The order is 8, the spreads geometric, AA and BB symmetric with the same eigenvalues, and three draws at each setting. A nonsymmetric pair, whose eigenvectors are not orthogonal, adds a separation below the eigenvalue gap, and whether the line holds there is a question the earlier essay already left open. The fifth in the law is fitted from these cases, not derived, and its spread across them, a factor of seven, is wide enough that a law of the form c/γc/\gamma should be read as the shape and not the constant. The backward error is the normwise one with each coefficient perturbed against its own norm; a structured backward error that perturbed CC only within rank one, as a Gramian’s data would be perturbed in practice, could be larger still, and is not computed.

Still open: a nonsymmetric pair, and perturbations that keep the rank

A nonsymmetric pair. With AA and BB nonnormal, the separation falls below the eigenvalue gap and the operator’s small directions are no longer eigenvectors. The prediction with a sign is that the ratio still lies within a factor of ten of 0.2/γ0.2/\gamma for γ\gamma below 10−210^{-2}, with γ\gamma defined exactly as here, and that γ\gamma itself then falls faster than the spread by the same factor the separation falls below the gap.

A backward error that keeps the data’s rank. If the perturbation of CC is required to keep it rank one, the share that cannot fall on AA and BB has fewer places to go. The prediction is that for rank-one data along the smallest directions this structured backward error exceeds the normwise one by at least a factor of three at six decades of spread, and that for rank-one data along the largest directions the two agree within ten per cent at every spread.

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.

Backward errorForward errorGramianMatrix equationResidualStructured perturbation