The QR algorithm of Section 5 is a sequence of matrices, each similar to the last,
drifting towards triangular form. Nothing in it looks
like a differential equation. This section shows that it
is one: there is a curve of matrices, all
with the same eigenvalues, that passes through the QR
iterates at the integer times. The bridge is a class of
matrix differential equations whose solutions cannot
change their spectrum, and the proof that they cannot is
a page of pure algebra. It is the one place in the
chapter where nothing is computed and nothing is
rounded.
Throughout, is an open interval and matrix-valued
functions of are differentiated entrywise, as in Definition 16.6.1.
In this section the letter names the matrix being
flowed, following the universal notation for
it; the graph Laplacian of Section 11 carries the same
symbol and never appears here.
Which
matrix differential equations preserve the
spectrum?
Start from the answer we want and read the equation
off it. Suppose is a curve of
matrices, all similar to by a similarity
that also moves with : with differentiable and everywhere
invertible. Differentiate. By the product rule (Lemma 16.6.4) and the
derivative of the inverse (Theorem 16.6.5), where the second line inserts in the
first term and recognizes in
both. So with the curve satisfies .
The commutator is not a clever choice: it is what a
moving similarity is forced to satisfy.
A Lax pair is a matrix that moves, together with
the infinitesimal similarity that moves it.
Definition
24.8.1 (Lax Pair)
Let be an open interval. A Lax
pair on
is a pair of functions , with differentiable, such
that The equation itself is called a Lax
equation, and is said to
flow under it.
Clause by clause. The two matrices are square
of the same size , or the
bracket is not defined. Only is required to be
differentiable; may be any function of
whatsoever, and
in the interesting cases it is built out of itself, which makes
the equation nonlinear. The bracket is the
commutator of the notation list, and the order
matters: , so swapping the two letters runs the
flow backwards.
Examples.
- . Then , so is constant. The
degenerate case, and it matters: it is the sanity check
that the definition does not force motion.
- Constant . Put for a fixed . By Theorem 10.9.4 (b)
and Lemma 16.6.4, the last step because commutes with , again by Theorem 10.9.4
(b). So is
a Lax pair on all of . Corollary 24.8.2 below
says these are the only solutions when is constant.
A third example is worth a block of its own, because
it is the one to hold in mind.
Example
(A curve of matrices with a frozen spectrum)
Take and . Since
, Definition 10.9.2
gives , and the recipe of the previous example
produces Three of the four entries move — only the
corner stands still — and yet and , so for every . The curve stays inside
one similarity class the whole time.
A nonexample, by dropping the second
term. Replace the Lax equation by with . The unique
solution with is (Theorem 10.9.6,
applied to each column). Its eigenvalues are , which
move. What was lost is precisely the second term: alone is not a
commutator, and a commutator is what the differentiation
of a similarity produced.
Warning. Isospectral does
not mean constant. In Example (A curve of matrices with a frozen spectrum)
the matrix
changes at every instant; what stays put is its list of
eigenvalues. The eigenvectors move, and they
must, since they are the columns of up to scale. A flow
that fixed the eigenvectors as well would fix . The whole use of a
Lax pair — in Section 5’s language, in this section’s,
and in the theory of integrable systems generally — is
that something moves while something else does not.
The
isospectral theorem
The derivation above suggests the proof: manufacture
and conclude
by similarity. That route runs into an obstacle the book
cannot clear. The natural is the solution of
,
, and
for a constant that is by Chapter
10 §09. For a
that depends on —
the only case of interest here — the existence of such
an is a theorem
about linear differential equations with variable
coefficients, and this book does not prove it. So we
take a different route, which needs no flow at all.
Theorem
24.8.1 (Lax Pairs Are Isospectral)
Let be
a Lax pair on an open interval . Then the
characteristic polynomial of does not depend on
: In particular has the same
eigenvalues as , with the same
algebraic multiplicities, and and are
constant.
Idea. Freeze and watch the
single number . Jacobi’s formula turns its
derivative into a trace against the adjugate, and the
adjugate is the one matrix that turns into the scalar from either side.
Writing the bracket in terms of rather than
— which is
legitimate, because commutes with
everything — makes the two halves of the trace cancel,
because a trace is unchanged by a cyclic shift. So , and a
polynomial identity valid for every is an identity of
polynomials.
Proof. Fix and put ,
which is differentiable with
(Definition 16.6.1). Let
By Jacobi’s formula (Theorem 16.6.6), is differentiable on
with
Rewrite the bracket in terms of . Since and commutes with , so . Writing
and
using the linearity of the trace (Theorem 0.9.6 (1)),
A cyclic shift (Theorem 0.9.6 (3))
moves to the
front of the first trace, so By Theorem 7.6.2, , so the two traces are the same
number and for every .
A differentiable function on an interval with
vanishing derivative is constant — the mean value
theorem, fact (A6) of Chapter 16’s introduction, applied
to the real and imaginary parts of . (Chapter 10 §09’s fact
(A4) says this for functions defined on all of , which is not the
hypothesis here.) So for all .
Finally, was arbitrary, so the two polynomials and define the same
function ; since is infinite, Theorem 6.1.5 (b)
gives as polynomials. The eigenvalues are
their roots and the multiplicities the multiplicities of
those roots, and and are two of the
coefficients up to sign (Theorem 7.10.2). This
proves the theorem.
When
is constant, the similarity is available and
the theorem can be sharpened: the flow is completely
determined.
Corollary
24.8.2 (Constant : the flow is
conjugation by the exponential)
Let be a fixed matrix and let be differentiable with . Then
so
is similar to
for every .
Proof. Put , a product of three
differentiable matrix functions. By Lemma 16.6.4 and Theorem 10.9.4
(b), which also gives , By fact (A4) of Chapter 10 §09, every entry of
is constant, so
. Multiplying on the left by and on the right
by , and
using from Theorem 10.9.4
(c), gives the formula. This proves the corollary.
Quick check. Prove directly from
the Lax equation, without Theorem 24.8.1, that is constant.
The Toda
flow
Now for the flow that matters. Take real symmetric and
tridiagonal, and take to be the
skew-symmetric matrix built from the off-diagonal
entries of .
There are two sign conventions, differing by and so
running the flow in opposite directions; we fix the one
that drives the largest eigenvalue towards the top-left
corner, as Example (The flow, twice)
will confirm.
Definition
24.8.2 (The Toda Flow)
For write for its
strictly upper triangular part and
for its
strictly lower triangular part, so that
is the sum of
, its
diagonal part, and , and set The Toda flow is the Lax
equation for a differentiable
taking symmetric tridiagonal values.
Two clauses need checking. First, is
skew-symmetric when is symmetric:
transposing turns the strictly upper part into the
strictly lower part of , so . Second, the
equation is nonlinear: depends on , and the right-hand
side is quadratic in the entries of . That is what makes it
a genuine dynamical system rather than a rewriting of Corollary 24.8.2.
Writing the equation out shows what it does.
Proposition
24.8.3 (The Toda Flow in Coordinates)
Let be symmetric and tridiagonal, with
diagonal entries and off-diagonal entries , so
. Put . Then is again
symmetric and tridiagonal, with Consequently the Toda flow is the system
(24.8.1)
Proof. Write , so that
,
,
and every other entry of is . Then for all , with the convention that a term with an index
outside
is ; this is just
the two nonzero entries in row of , respectively in
column of . Write , so
is symmetric:
since
and ,
so it is enough to compute for .
Case . Every appearing in is then an
off-diagonal neighbor: , ,
, . So
Case . Now
and , while and
because is
tridiagonal. So .
Case . Here
and , while . So
Case . Each of the four entries , , , has its two
indices differing by at least , so all four are and .
Hence is
symmetric tridiagonal with the stated entries, and
equating
with entry by
entry gives Eq. 24.8.1. This proves
the proposition.
Read Eq. 24.8.1 for what it is.
The off-diagonal entries feed the diagonal — mass flows from up to — and the diagonal
drives the off-diagonal, each growing or shrinking
according to the sign of . Summing
the first family gives , the
constancy of the trace, with the terms canceling in
pairs. And an
that vanishes at some time has at that same
time. It is tempting to read off that such an stays for ever — that the
flow never re-couples two blocks which have already
separated, the continuous shadow of deflation in Section
5 — but that is a statement about the solutions
of the system, and getting it from the instantaneous one
needs a uniqueness theorem for differential equations of
the sort this section declined to assume above. Only the
instantaneous statement is claimed here.
Example
(The
flow, twice)
Let , so
and Eq. 24.8.1 reads
- (a) Verify by hand
that and
are constant
along the flow.
- (b) Solve the flow
explicitly for .
Solution.
(a) . For the determinant,
by (D1) of Chapter 16 §06. Substituting, So both coefficients of are constant, which is Theorem 24.8.1 for , got by
hand.
(b) Put and At ,
gives and , which is . Differentiating,
with ,
so the first equation holds; the second then
holds because . For the third, while ,
which is the same. Two checks: , so for every
, matching ; and as
, and , so .
The flow sorts the eigenvalues onto the diagonal,
largest first.
The last sentence of that example is the whole point
of the section. Sorting the eigenvalues onto the
diagonal in decreasing order, with the off-diagonal
entries dying away, is exactly what the QR algorithm
does. The next theorem says the resemblance is an
identity.
The QR
algorithm is the Toda flow at integer times
One piece of algebra first. The skew-symmetric
matrices and the upper triangular matrices fill between them,
without overlap.
Lemma
24.8.4 (Skew plus upper triangular,
uniquely)
Every is for exactly one skew-symmetric and one upper
triangular . If
is symmetric
then .
Proof. Uniqueness. It
suffices to show that a matrix that is both
skew-symmetric and upper triangular is . Its transpose is lower
triangular and upper triangular at once, hence diagonal;
so is diagonal
with , giving . If then
is such an .
Existence for symmetric , which is the
only case we use. Put , skew-symmetric by the
computation after Definition 24.8.2, and
, whose
strictly lower part is , so
it is upper triangular. For a general , take
and ;
the entries of
below the diagonal are for
. This
proves the lemma.
Theorem
24.8.5 (One QR Step Is One Unit of Toda
Time)
Let be symmetric and let be the unshifted QR iterates of Definition 24.5.1 started
at , with the factorizations normalized so that each has positive
diagonal entries, and write , with . Then for every
:
- (a) the
factorizations exist and are unique, and ;
- (b) is the orthogonal
factor in the QR factorization of ;
- (c) ,
where is symmetric and has the
same eigenvalues as .
Idea. Each QR step is a similarity
by the orthogonal factor, so after steps the matrix has
been conjugated by the accumulated product . Conjugating an
exponential is exponentiating the conjugate, which turns
the statement about into a statement about
. The only thing
left to identify is , and Section 5 has
already done the work: Theorem 24.5.2 supplies
the telescoping identity . A product of
orthogonal matrices is orthogonal, a product of upper
triangular matrices with positive diagonal is again one,
so uniqueness of the QR factorization names for us.
Proof. Step 1: the
factorizations exist and are unique. By Theorem 10.9.4
(c), is invertible, so its columns are
independent and Theorem 11.8.1
applies, giving a unique with orthonormal
columns — here square, hence orthogonal — and a unique
upper triangular with positive
diagonal. Every is similar to
by Proposition 24.5.1, hence
invertible, so the same argument runs at every step.
This positive-diagonal normalization is the choice Definition 24.5.1
deliberately left open, and it is the only ingredient
here that Section 5 does not already supply.
Step 2: (a), and the telescoping
identity. Every matrix here is real and each
is
orthogonal, so the conjugate transpose in Theorem 24.5.2 is a
transpose. With and
, that
theorem — whose and are our and — gives, for every
, and for the two read and
, since
.
The first is (a).
Step 3: (b). Since commutes with
itself, Theorem 10.9.4 (d)
gives , so .
Each is
orthogonal, so
is orthogonal. Each is upper
triangular with positive diagonal, and a product of such
matrices is upper triangular with diagonal entries the
products of the diagonal entries, hence positive; so
is upper
triangular with positive diagonal. By the uniqueness in
Theorem 11.8.1,
is the QR factorization of .
Step 4: (c). is orthogonal, so
, and Theorem 10.9.4 (a)
gives Finally , and is similar to , so the two have the
same characteristic polynomial (Theorem 7.10.3) and
hence the same eigenvalues. This proves the theorem.
So the QR algorithm, applied to the exponential of a
symmetric matrix, is a sequence of orthogonal
conjugations of whose -th term is read off the
QR factorization of . That last
description makes sense for every real , not only for integers,
and it is the missing curve.
Warning. The interpolation
is of , not of
, and it needs
the starting matrix to be an exponential. Theorem 24.8.5 starts from
, so it says nothing directly about the
QR algorithm run on an arbitrary matrix. The matrices it
does cover are exactly the symmetric positive definite
ones. On the one hand
is symmetric with positive eigenvalues , writing
by
Corollary 12.5.2
and using Theorem 10.9.4 (a)
together with Corollary 10.9.5;
on the other, a symmetric with eigenvalues is for the
symmetric , the
logarithm being the one built in Chapter 18 §11 (Lemma 18.11.1). A
symmetric matrix with a negative eigenvalue is therefore
out of reach. The right reading is not “QR is Toda” but
“QR on is
Toda on ”.
What this
buys
Nothing in this section makes a computation faster.
What it does is change what the QR algorithm
is. As an algorithm it is a rule: factor,
multiply back, repeat, and hope the subdiagonal shrinks.
As a flow it is a curve in a bounded set — every entry
of a symmetric matrix is at most its largest eigenvalue
in absolute value, and the spectrum is frozen — and the
questions one asks about it change accordingly. Why does
the largest eigenvalue surface at the top left? Because
at all times. Why do the off-diagonal entries
die away geometrically once the diagonal has almost
settled? Because , which near a diagonal limit
is decay at the rate of the gap — the same
eigenvalue gap that governs the QR algorithm’s rate in
Section 5. Neither reading is a proof, and neither is
visible at all in the discrete language.
That is the general lesson, and it is worth naming as
one of this chapter’s moves: an algorithm and a
differential equation can be the same object at two
resolutions, and which resolution to use is a choice.
Similar correspondences are known for other iterations,
including the shifted QR algorithm; none of them is
proved here. The subject they belong to is the theory of
integrable systems, and it is the one place where this
computational chapter touches pure mathematics.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define a Lax
pair, and say which of the two functions is required to
be differentiable.
- (b) State Theorem 24.8.1, and name
the two results from earlier chapters its proof
uses.
- (c) Determine
whether the following statement is correct, and justify
your answer: if then for all .
- (d) Explain in one
sentence why the proof of Theorem 24.8.1 does not
construct the conjugating matrix .
- (e) Write down the
Toda equations Eq. 24.8.1 for , and check that the
sum of the three diagonal equations is .
Solution.
(a) A pair with differentiable and
for all . Only must be
differentiable.
(b) The
characteristic polynomial of is independent of
. The proof uses
Jacobi’s formula (Theorem 16.6.6) and the
adjugate identity (Theorem 7.6.2),
together with (Theorem 0.9.6
(3)).
(c) Incorrect. Example (A curve of matrices with a frozen spectrum)
has , which is nonconstant
while its characteristic polynomial is constant.
Isospectral is much weaker than constant.
(d) Because for a
depending on
that matrix is
the solution of a linear differential equation with
variable coefficients, whose existence this book does
not prove; differentiating the determinant avoids
needing it at all.
(e) With : The three diagonal right-hand sides sum to
, which is the constancy of the
trace.
B. Practice
Exercise
(B1: A Lax pair verified)
Let and .
- (a) Verify directly
that .
- (b) Compute and confirm Theorem 24.8.1 in this
case.
- (c) Determine
whether and
are similar
for every , and
exhibit the similarity.
Solution.
(a) . On
the other side, so .
(b) and
, so for every . The spectrum is at all
times.
(c) Yes. Since
is constant, Corollary 24.8.2 applies,
and because . So which one checks by multiplying out.
(Similarity is also forced by (b) alone here: both
matrices are nonzero and nilpotent of size , hence both similar to
.)
Exercise
(B2: The bracket by hand)
Let Compute and directly,
and check the answer against Proposition 24.8.3.
Solution. Here and . The strictly
upper and lower parts give Multiplying, so Against Proposition 24.8.3: ; ; ;
; . All five agree, the matrix is
symmetric tridiagonal, and its trace is , as it must
be.
Exercise
(B3: One QR step on an exponential)
Let and .
- (a) Show that with and .
- (b) Find the QR
factorization of with positive
diagonal, and hence .
- (c) Compare your
with Example (The flow, twice)
(b).
Solution.
(a) , so and .
Splitting Definition 10.9.2
into even and odd terms, and the two scalar series are the even and odd
halves of , namely and by fact (A1) of
Chapter 10 §09.
(b) Write . Gram–Schmidt on the columns, as in Theorem 11.8.1: the
first column
normalizes to ; the second column has , and because . That vector has length , so . Hence , whose determinant is , and has positive diagonal. Then Since and , multiplying numerator and denominator
by gives
(c) This is
exactly the solution written down in Example (The flow, twice)
(b). At it is
and . One QR step on has moved one unit of Toda time,
and the off-diagonal entry has already fallen from to about .
C. Going deeper
Exercise
(C1: The power sums are constants of the motion)
Let be
a Lax pair on .
- (a) Prove that is constant for every
integer .
Hint: the product rule, then Theorem 0.9.6
(3).
- (b) Deduce, for
, that the
characteristic polynomial of is constant,
without using Theorem 24.8.1.
Solution.
(a) By Lemma 16.6.4 and induction,
is differentiable with The trace is linear (Theorem 0.9.6 (1)) and
unchanged by a cyclic shift (Theorem 0.9.6 (3)), so
each summand contributes , and
Now by a cyclic
shift, and as well, so the bracket
contributes . By
fact (A6) of Chapter 16’s introduction the function is
constant on .
(b) For , with and . By Cayley–Hamilton (Theorem 9.6.1), ; taking traces gives , that is Part (a) with makes constant and with
makes constant, so
is constant
too. Hence is
constant.
Exercise
(C2: How far is
from being determined)
Let be
a Lax pair on and
let satisfy for
every .
- (a) Prove that is also a
Lax pair.
- (b) Give an example
with , and
conclude that a Lax equation does not determine .
- (c) Prove, using Lemma 24.8.4, that there
is nevertheless exactly one
skew-symmetric
for which
(upper triangular) equals a given symmetric — that is, the of Definition 24.8.2 is the
only natural candidate once “skew-symmetric” and “upper
triangular” are the two slots.
Solution.
(a) .
(b) Take for any
scalar , or
for any polynomial , since a polynomial in
commutes with
. So can always be altered
by a multiple of
without changing the flow, and the Lax equation
determines at
most up to the commutant of .
(c) Lemma 24.8.4 says for exactly
one skew-symmetric and one upper
triangular , and
computes for symmetric . So the pair of slots
(skew, upper triangular) picks out uniquely, up to
the sign convention, and the remaining freedom found in
(a) and (b) is freedom in a different
decomposition, not in this one.
Exercise
(C3: Symmetry constrains )
Let be
a Lax pair of real matrices on with symmetric for every
.
- (a) Prove that for every .
- (b) Deduce that
is also a Lax pair, so that may always be taken
skew-symmetric.
- (c) Determine
whether the Toda of Definition 24.8.2
satisfies the hypothesis of (a). Justify your
answer.
Solution.
(a) Transposing
and using — so that
, differentiation being entrywise —
gives Adding this to gives
, while subtracting gives .
(b) Put . By (a), , so , and Exercise (C2: How far is from being
determined) (a) says is a Lax
pair. But ,
which is skew-symmetric. So the skew part of already drives the
flow, and the symmetric part is inert.
(c) Yes, and
trivially:
is skew-symmetric for symmetric , so ,
which commutes with everything. Part (b) says that this
is not a lucky feature of the Toda choice but the normal
form of any Lax pair with symmetric .