Two errors, and whose fault they are

The middle eigenvectors come back exact

The Sylvester–Kac matrix's eigenvectors are known exactly, and the middle ones were predicted to be lost before their eigenvalues, since the gap between neighbouring eigenvalues is only two. Started from the all-ones vector, inverse iteration seems to confirm it: half the middle eigenvectors are wholly wrong at order 80 while their eigenvalues keep five digits. But the all-ones vector has, in exact arithmetic, no component at all along every other eigenvector. From a random start the middle eigenvectors come back exact to fourteen digits at every order measured, while their eigenvalues lose up to eleven. What is lost is at the ends of the spectrum, in the smallest entries of eigenvectors whose entries span twenty decades — and never by more than three units of roundoff times that span.

Worth reading first: The eigenvalues that are not there · A backward-stable answer to a problem nobody asked.

Balanced is not symmetric computed the eigenvalues of the Sylvester–Kac matrix, a tridiagonal matrix of small integers whose eigenvalues are the integers from −(n−1)-(n-1) to n−1n-1 in steps of two, and measured every digit an eigensolver lost against those integers. The losses followed first-order perturbation theory, the middle of the spectrum lost the most, and at order 112 the solver returned complex eigenvalues for a spectrum of integers. It ended with three questions, and the last was about eigenvectors. They are known exactly too — the matrix’s own three-term recurrence produces them in integers, as Krawtchouk polynomials — and the prediction was that “the eigenvectors of the middle eigenvalues are lost before the eigenvalues are, since an eigenvector’s sensitivity carries the gap to the neighbouring eigenvalue as well as the non-normality, and the gap here is only two.”

The reasoning is the textbook one, and the gap decides the eigenvector measured it on a symmetric matrix: an eigenvector’s perturbation is a sum over the other eigenvalues of terms divided by the distance to each, so a small gap makes a sensitive eigenvector. A non-normal matrix multiplies each term by how far its left and right eigenvectors are from parallel. On the Kac matrix both are bad in the middle of the spectrum.

Measured, it is not the middle that is lost, and the first measurement that seems to say it is was measuring the starting vector.

Exact eigenvectors in integers

The matrix of order nn has zeros on its diagonal, 1,2,…,n−11, 2, \ldots, n-1 above it and n−1,…,1n-1, \ldots, 1 below. For an eigenvalue λ\lambda, row kk of Ax=λxAx = \lambda x reads (n−k) xk−1+(k+1) xk+1=λxk(n-k)\,x_{k-1} + (k+1)\,x_{k+1} = \lambda x_k, so the eigenvector can be written down from x0=1x_0 = 1 and x1=λx_1 = \lambda one entry at a time. In BigInt arithmetic, with the factorials cleared, every entry is an exact rational, and each is rounded to a double once, at the end. That is the reference: for every eigenvalue at every order from 16 to 80, a vector correct to the last bit.

The computed eigenvectors are made the way an eigensolver makes them once it has the eigenvalues: inverse iteration with the shifted matrix A−λ^IA - \hat\lambda I, where λ^\hat\lambda is the Francis iteration’s own eigenvalue — wrong by whatever it is wrong by — three solves from a starting vector, normalised. Two errors are measured against the exact vector: the componentwise one, the worst relative error of any entry after matching the scale at the largest, and the normwise one, the distance between the two unit vectors.

The all-ones start, and what it seems to show

The obvious starting vector is the vector of ones, and from it the prediction looks right.

The middle pair of the Sylvester–Kac spectrum, λ = ±1, by order: the eigenvector the all-ones start reaches, the one it misses, and the eigenvalue error, from three steps of inverse iterationλ = ±1, ones misses it: 8e-17, 1e-16, 1e-16, 1e-15, 1e-11, 4e-8, 4e-3, 8e-4, 5e-1; λ = ±1, ones reaches it: 1e-16, 2e-16, 2e-16, 1e-16, 1e-16, 3e-16, 6e-16, 1e-16, 1e-16; λ = ±1, eigenvalue error: 1e-14, 2e-13, 1e-12, 1e-10, 3e-9, 4e-8, 9e-7, 1e-6, 6e-6 at n = 16, 24, 32, 40, 48, 56, 64, 72, 80.16243240485664728010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹order nerrorλ = ±1, ones misses itλ = ±1, ones reaches itλ = ±1, eigenvalue errornormwise eigenvector error, from the all-ones vectorbuilt from rounding
Fig. 1 The middle pair, λ = ±1, by order, from the all-ones start: the normwise error of the eigenvector the ones vector reaches, of the one it misses, and the eigenvalue’s own error.

At order 80 one of the two middle eigenvectors comes back wrong by half normwise — not an eigenvector of anything nearby — while the middle eigenvalues are wrong by 6⋅10−66 \cdot 10^{-6}, five digits still correct against a gap of two. At order 64 it is wrong by 4⋅10−34 \cdot 10^{-3} against an eigenvalue error of 9⋅10−79 \cdot 10^{-7}. The eigenvector is going faster than the eigenvalue, as predicted.

But only one of the pair. The other middle eigenvector is correct to 10−1610^{-16} at every order, including 80. A perturbation argument cannot produce that: λ=1\lambda = 1 and λ=−1\lambda = -1 have the same condition number, the same gaps on both sides and, by the matrix’s symmetry, errors of the same size. Something in the computation treats them differently, and the only thing the computation contains besides the matrix and the eigenvalue is the starting vector.

Every eigenvector of the Sylvester–Kac matrix of order 80 computed by inverse iteration from the all-ones vector, normwise error against the exact vector, marked by whether the all-ones vector has any component along itThe all-ones vector has a component along exactly the eigenvectors with λ ≡ n − 1 (mod 4), every other one: their errors are 1e-16 to 2e-15. Along the other half it has none, and those eigenvectors come back wrong by 3e-16 to 2e+0.-64-48-32-160163248648010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹eigenvalue λeigenvector error, normwiseones has a componentones has noneorder 80, three steps from the all-ones vectora start that misses every other vector
Fig. 2 Every eigenvector of the order-80 matrix from the all-ones start, normwise error, marked by whether the all-ones vector has any component along it. Every other eigenvector comes back exact; the rest are wrong by up to two in the middle.

Across the whole spectrum at order 80 the eigenvectors alternate: one exact to 10−1510^{-15}, the next wrong — wholly wrong in the middle, a little wrong further out, exact again near the ends. The alternation is in the starting vector, and it can be checked exactly. The component of the ones vector along the eigenvector of λ\lambda is proportional to the sum of the entries of the left eigenvector of λ\lambda, which satisfies its own recurrence and is also exact in rationals. That sum is zero, exactly, for every eigenvalue with λ≡n−3(mod4)\lambda \equiv n - 3 \pmod 4, and nonzero for every eigenvalue with λ≡n−1(mod4)\lambda \equiv n - 1 \pmod 4 — every other eigenvalue, checked in rational arithmetic at orders 16, 40 and 64.

So for half the spectrum, inverse iteration from the ones vector is asked to grow a direction the start does not contain. It can, because rounding puts a trace of it in at about 10−1610^{-16}, and each solve multiplies that trace by 1/∣λ^−λ∣1/|\hat\lambda - \lambda| against everything else. When the eigenvalue is accurate to fourteen digits, three solves are plenty. When it is accurate to six, the trace has grown by 101810^{18} and the neighbours’ components, which the start does contain and which each solve shrinks only by a factor of about two, are still competitive. The eigenvector that comes back is a mixture, and how wrong it is tracks the eigenvalue’s error — not because the eigenvector is sensitive but because the starting vector was blind to it.

That account makes a number, and the number can be checked. If the trace starts at about 10−1610^{-16} and each of three solves multiplies it by 1/δ1/\delta, where δ\delta is the eigenvalue’s error, while multiplying the nearest neighbours’ components by about a half, the missed eigenvector should come back wrong by about 1016(δ/2)310^{16}(\delta/2)^3 normwise, until that reaches one and the vector is simply something else. For the missed middle eigenvectors, ∣λ∣≤9|\lambda| \le 9, wherever that estimate lies between 10−1210^{-12} and a tenth, the measured error is within a factor of a hundred of it, on all twenty such eigenvectors at orders 48 to 72: 9⋅10−89 \cdot 10^{-8} measured against 2⋅10−82 \cdot 10^{-8} estimated at order 56, 4⋅10−34 \cdot 10^{-3} against 8⋅10−48 \cdot 10^{-4} at 64, 8⋅10−48 \cdot 10^{-4} against 10−310^{-3} at 72. A cube is a steep function. Halve the eigenvalue’s error and the miss falls eightfold; add a fourth solve and it falls by another factor of 2/δ2/\delta, which at order 80 is three hundred thousand. The same three solves that are plenty at order 40 are not enough at 80, and the eigenvalue’s accuracy decides which, though not in the way the prediction said: through the speed at which inverse iteration can build a direction it was not given, not through the eigenvector’s sensitivity.

The ones vector is not an exotic choice; it is what a program reaches for when it has no reason to prefer a direction, and for the Kac matrix it is itself a left eigenvector — every column sums to n−1n - 1 — which is the first sign that it carries the matrix’s structure rather than none. The exact sums say which structure: a parity that splits the spectrum in two.

From a random start, the middle is the best of the spectrum

The Sylvester–Kac matrix's computed eigenvalues and eigenvectors against exact ones, by order: the middle eigenvalues' worst error, the middle eigenvectors' worst error, and the worst eigenvector over the spectrum, componentwise and normwisemiddle eigenvalues, error: 2e-14 at 16, 2e-13 at 24, 3e-12 at 32, 2e-10 at 40, 3e-9 at 48, 4e-8 at 56, 1e-6 at 64, 1e-6 at 72, 3e-5 at 80; middle eigenvectors: 8e-15 at 16, 3e-15 at 24, 1e-15 at 32, 3e-15 at 40, 1e-14 at 48, 1e-14 at 56, 1e-14 at 64, 2e-14 at 72, 5e-12 at 80; worst eigenvector, componentwise: 2e-12 at 16, 8e-13 at 24, 6e-9 at 32, 3e-7 at 40, 4e-5 at 48, 2e-2 at 56, 2e+0 at 64, 1e+3 at 72, 2e+5 at 80; worst eigenvector, normwise: 8e-16 at 16, 7e-16 at 24, 2e-15 at 32, 1e-15 at 40, 1e-15 at 48, 2e-15 at 56, 1e-15 at 64, 3e-15 at 72, 2e-13 at 80. Middle means |λ| ≤ 5; eigenvectors by three steps of inverse iteration from a random start with the computed eigenvalue as shift.16243240485664728010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹10⁴order nerrormiddle eigenvalues, errormiddle eigenvectorsworst eigenvector, componentwiseworst eigenvector, normwisefloored at 10⁻¹⁷the middle is the best of the spectrum
Fig. 3 By order: the largest error of the middle eigenvalues (|λ| ≤ 5), of the middle eigenvectors from a random start, and of the worst eigenvector anywhere in the spectrum, componentwise and normwise.

Started from a vector of independent normal entries, which has a component along every eigenvector, the picture inverts. The middle eigenvalues lose digits at the rate the earlier essay measured — 2⋅10−142 \cdot 10^{-14} at order 16, 10−610^{-6} at 64, 3⋅10−53 \cdot 10^{-5} at 80. The middle eigenvectors, componentwise, are exact to 10−1410^{-14} at every order through 72 and to 5⋅10−125 \cdot 10^{-12} at 80. At the order where the middle eigenvalues have lost eleven digits, the middle eigenvectors have lost none that matter.

That is not a contradiction of perturbation theory; it is perturbation theory applied to the right perturbation. The eigenvalue error is the Francis iteration’s: it applied an orthogonal similarity whose rounding is a backward error of order u∥A∥u\|A\|, and a backward error that size moves a sensitive eigenvalue by up to its condition number times it. Inverse iteration does not inherit that backward error. It works with the exact matrix — the Kac matrix’s integers are held exactly — and asks for the null vector of A−λ^IA - \hat\lambda I, which for any shift nearer λ\lambda than its neighbours is the eigenvector of λ\lambda itself. The eigenvalue error enters only as the shift, and a shift wrong by 10−510^{-5} still picks out the right eigenvector by a factor of 2⋅1052 \cdot 10^{5} per solve. What remains is the solve’s own rounding, and the next figure says how big that is.

Lost at the ends, in the smallest entries

Every eigenvector of the Sylvester–Kac matrix of order 64, computed by inverse iteration from a random start, against its exact Krawtchouk vector componentwise, beside the eigenvalue errors and the unit roundoff times the exact vector's dynamic rangeThe worst eigenvector is λ = 61, wrong by 2.5e+0 in its smallest components and 8.7e-16 normwise, its entries spanning 16.8 decades. The middle eigenvectors are exact to 1e-14 while the middle eigenvalues are wrong by up to 1.0e-6.-64-48-32-1601632486410⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹10⁴eigenvalue λerroru × rangeeigenvectorseigenvaluesorder 64, random startmiddle eigenvectors, worst10⁻¹⁴middle eigenvalues, worst10⁻⁶worst eigenvector, componentwise2.5dots: eigenvectors · line: eigenvalues · dashed: u times the rangelost at the ends, not the middle
Fig. 4 Every eigenvector of one order, from a random start: componentwise error against the exact vector (dots), the eigenvalue errors (line), and the unit roundoff times ten to the number of decades the exact vector’s entries span (dashed). The dial sets the order.

The dial shows each order’s whole spectrum, and the shape is the same at every order: eigenvalue errors peak in the middle, eigenvector errors climb towards the ends. At order 64 the worst eigenvector is λ=61\lambda = 61, wrong by 2.5 in its smallest entries and by 9⋅10−169 \cdot 10^{-16} normwise. At 80, λ=−77\lambda = -77, wrong by 1.5⋅1051.5 \cdot 10^{5} componentwise and 10−1510^{-15} normwise. Normwise, every eigenvector of every order is correct to 2⋅10−132 \cdot 10^{-13} or better.

The dashed line is the explanation. A Krawtchouk vector near the end of the spectrum has entries that rise from one at the first coordinate to something like a binomial coefficient in the middle and fall back to one at the last. For λ=61\lambda = 61 at order 64 they span 16.8 decades; for λ=−77\lambda = -77 at order 80, 21.6. A solve that is normwise backward stable returns every entry with an absolute error of about uu times the largest, and an entry twenty decades below the largest has a relative error of 1020u10^{20}u. The middle eigenvectors’ entries span only one and a half decades at order 16 and eleven at order 80, so their smallest entries keep five or more digits even by that accounting, and in fact keep almost all of them.

The componentwise error of every computed eigenvector of the Sylvester–Kac matrix at nine orders from 16 to 80, against the unit roundoff times ten to the number of decades the exact eigenvector's entries span432 eigenvectors. No error exceeds 3 times the unit roundoff times the range; the dashed line is equality and the dotted line a thousand times it.10⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²10⁵10⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹10⁴u × 10^(decades the exact vector spans)componentwise errordashed: equal · dotted: a thousand timesthe error is the range
Fig. 5 Every eigenvector at every order, 432 of them: componentwise error from a random start against the unit roundoff times ten to the exact vector’s span in decades. The dashed line is equality.

Over all 432 eigenvectors the componentwise error is at most three times u⋅10spanu \cdot 10^{\text{span}}. The span is a property of the exact answer, computed before any floating-point arithmetic is done, and it predicts the loss to within a factor of three in the worst case and bounds it in every case. Nothing about the eigenvalue’s condition number or its gap enters. The end eigenvectors are lost because they are the hardest vectors to write down in floating point, not because they are hard to compute; an answer that is known met the same distinction on the Hilbert matrix, where most of the error was the conversion of the data into doubles before any algorithm ran.

The extreme eigenvectors, λ=±(n−1)\lambda = \pm(n-1), are exceptions that prove it. Their entries are binomial coefficients, all of one sign or alternating, and they span the most decades of all — 22.7 at order 80 — yet they come back exact. Their eigenvalues are the best-conditioned in the spectrum, and their entries are all of one sign or strictly alternating, so no entry is formed by cancellation; why the solve keeps their smallest entries to full relative accuracy, when it does not for their neighbours, is not established here.

What the prediction should have been about

The prediction treated “the eigenvector” as one quantity with one sensitivity. There are at least three, and on this matrix they part company completely. The eigenvalue’s error is a property of the eigenvalue algorithm’s backward error and the eigenvalue’s condition number. The eigenvector’s normwise error, given an exact matrix and a reasonable shift, is a property of the solve and is at rounding level for every eigenvector here. The eigenvector’s componentwise error is a property of the exact vector’s dynamic range. The middle of the Kac spectrum is the worst place for the first and the best place for the third.

A condition number for one eigenvalue is the right instrument for the first, and the condition number is an amplifier the general statement behind it: it amplifies a backward error, and only the computations that commit that backward error pay for it. Inverse iteration on the exact matrix does not commit it. A route that computed eigenvectors from the Schur form instead — back substitution in the triangular factor, then the orthogonal transformation — would inherit the Francis iteration’s backward error, and on that route the prediction might well hold; that is the comparison this page does not make.

The trap with the ones vector is worth a sentence of its own because it looked like confirmation. An experiment that reproduces a prediction for a reason other than the predicted one is worse than one that fails, because nothing prompts a second look. Here the prompt was an asymmetry the theory could not produce: two eigenvalues with identical conditioning, one eigenvector exact and one destroyed. An estimate that can be fooled and columns that steer a random start are the condition-estimation versions of the same lesson — a structured start sees only what its structure allows — and a random start is the cheap repair in both.

Restarting is a filter measured the eigenvalue side of a starting vector’s role, where the start’s components along each eigenvector decide what a Krylov method finds first. Inverse iteration is the extreme case: one direction amplified, everything else suppressed, and a direction with a zero coefficient is found only through rounding, at a speed set by the shift.

The practical consequence is a rule that costs nothing. Inverse iteration should never start from a vector chosen for its simplicity on a structured matrix, because simplicity is itself structure, and the matrix may share it. A random start is not a refinement; it is the assumption the convergence argument for inverse iteration makes, written into the computation. On this matrix the reason is visible in one picture: the comb of the all-ones figure, where every second eigenvector is computed from nothing but rounding.

The second consequence is about reporting. A computed eigenvector of a non-normal matrix should come with two accuracies, not one. Normwise, every eigenvector here is good to 2⋅10−132 \cdot 10^{-13}; componentwise, the worst at order 80 has not one correct digit in its smallest entry. Which of the two matters depends on what the vector is for — a direction, a mode shape, a probability distribution — and on the Kac matrix, whose eigenvector for the largest eigenvalue is the binomial distribution of the Ehrenfest urn, the small entries are the probabilities of the rare states.

What nine orders do not settle

Every eigenvector here comes from three steps of inverse iteration with a dense LU solve; a production code that computes eigenvectors from the Schur form, or by inverse iteration on the reduced Hessenberg matrix rather than on AA, starts from a matrix that already carries the eigenvalue algorithm’s rounding, and the results above would not transfer. The orders stop at 80 because the eigenvalue computation at the larger orders the earlier essay reached is slow in this setting and produces complex eigenvalues past 104. Every order measured is a multiple of eight, so the spectrum never contains zero; at an odd order the middle eigenvalue is zero itself, its eigenvector’s parity class is fixed by the order, and whether the all-ones start sees it is a question the parity rule above answers but the measurements here do not check. And the random start is one draw per order, not repeated.

Still open: the Schur-form route, and left eigenvectors

Eigenvectors from the Schur form. Back substitution in the computed quasi-triangular factor and multiplication by the accumulated orthogonal transformation is how LAPACK computes eigenvectors, and it inherits the similarity’s backward error. The prediction with a sign is that on that route the middle eigenvectors’ normwise error grows like the middle eigenvalues’ error divided by the gap — about 10−510^{-5} at order 80 — so that the earlier essay’s prediction holds there and fails here, and the difference between the two routes is the whole of the answer.

The left eigenvectors. The left eigenvectors satisfy the transpose’s recurrence and are exact rationals too, and they are what an eigenvalue’s condition number is built from. The prediction is that their componentwise errors from a random start are bounded by the same three units of roundoff times their own span, and that the product of the left and right spans — not either alone — predicts the eigenvalue condition numbers the earlier essay computed, to within a factor of ten.

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.

Eigenvalue condition numberExact ground truthForward errorInverse iterationNon-normalityRational arithmeticRelative errorTridiagonal