The Vandermonde Decomposition

In this post, I want to discuss a beautiful and somewhat subtle matrix factorization known as the Vandermonde decomposition that appears frequently in signal processing and control theory. We’ll begin from the very basics, introducing the controls-and-signals context, how the Vandermonde decomposition comes about, and why it’s useful. By the end, I’ll briefly share how we can push the Vandermonde decomposition beyond matrices to the realm of tensors, which will can allow us to separate mixed signals from multiple measurements. This tensorial generalization plays an important role in my paper (L_r,L_r,1)-decompositions, sparse component analysis, and the blind separation of sums of exponentials, joint work with Nithin Govindajaran and Lieven De Lathauwer, which recently appeared in the SIAM Journal of Matrix Analysis and Applications.

Finding the Frequencies

Suppose I give you a short recording of a musical chord consisting of three notes. How could you determine which three notes they were? Mathematically, we can represent such a three-note chord as a combination of scaled and shifted cosine functions

(1)   \[f(t) = a_0 \cos(\omega_0 t - \phi_0) + a_1 \cos(\omega_1 t - \phi_1) + a_2 \cos(\omega_2 t - \phi_2). \]

We are interested in obtaining the (angular) frequencies \omega_1, \omega_2, and \omega_3.

In the extreme limit, when we are given the values of the signal for all t, both positive and negative, the frequencies are immediately given by taking a Fourier transform of the function f(\cdot). In practice, we only have access to the function f at certain times t_0,\ldots,t_{n-1} which we assume are equally spaced

    \[t_j = j\Delta t \quad \textnormal{for} \quad j = 0,1,2,\ldots,n-1.\]

Given the samples

    \[f_j = f(t_j) \quad \textnormal{for} \quad j = 0,1,2,\ldots,n-1\]

we could try to identify \omega_1, \omega_2, and \omega_3 using a discrete Fourier transform.1The discrete Fourier transform can be computed very quickly using the fast Fourier transform, as I discussed in a previous post. Unfortunately, this generally requires a large number of samples to identify \omega_1, \omega_2, and \omega_3 accurately. (The accuracy scales roughly like 1/n, where n is the number of samples.) We are interested in finding a better way to identify the frequencies.

Now that we’ve moved from the function f(\cdot), defined for any real input t, to a set of samples f_0,f_1,\ldots,f_{n-1} it will be helpful to rewrite our formula (1) for f in a different way. By Euler’s identity, the cosines can be rewritten as

    \[\cos \alpha = \frac{\mathrm{e}^{\mathrm{i} \alpha}+\mathrm{e}^{-\mathrm{i} \alpha}}{2}.\]

As a consequence, we can rewrite one of the frequency components in (1) as

    \[a_0 \cos(\omega_0 t - \phi_0) = d_0 \mathrm{e}^{\mathrm{i} \omega_0t} + d_1 \mathrm{e}^{-\mathrm{i} \omega_0t}.\]

Here, d_0 and d_1 are complex coefficients d_0 = a_0 \mathrm{e}^{-\mathrm{i} \phi_0}/2 and d_1 = a_0 \mathrm{e}^{\mathrm{i} \phi_0}/2 which contain the same information as the original parameters a_0 and \phi_0. Now notice that we are only interest in values t_j = j\, \Delta t which are multiples of the spacing \Delta t. Thus, our frequency component can be further rewritten as

    \[a_0 \cos(\omega_0 t_j - \phi_0) = d_0 z_0^j + d_1 z_1^j\]

where z_0 := \mathrm{e}^{\mathrm{i} \omega_0\, \Delta t} and z_1 := \mathrm{e}^{-\mathrm{i}\omega_0\, \Delta t}. Performing these reductions, our samples f_j take the form

(2)   \[f_j = d_0 z_0^j + d_1 z_1^j + \cdots + d_5 z_5^j. \]

We’ve now reformulated our frequency problems in identifying the parameters d_0,\ldots,d_5 and z_0,\ldots,z_5 in the relation (2) from a small number of measurements f_0,f_1,\ldots,f_{n-1}.

Frequency Finding as a Matrix Factorization

We will return to the algorithmic problem of identifying the parameters in the relation (2) from measurements in a little bit. First, we will see that (2) can actually be written as a matrix factorization. Understanding computations by matrix factorization has been an extremely successful paradigm in applied mathematics, and we will see in this post how viewing (2) as a matrix factorization can be very useful.

While it may seem odd at first,2As pointed out to me on math stack exchange, one reason forming the Hankel matrix is sensible is because it effectively augments the sequence of numbers f_0,f_1,\ldots,f_{n-1} into a sequence of vectors given by the columns of H. This can reveal patterns in the sequence which are less obvious when it is represented as given just as numbers. For instance, any seven columns of H are linearly dependent, a surprising fact since the columns of H have length (n-1)/2+1 which can be much larger than seven. In addition, as we will soon effectively exploit later, vectors in the nullspace of H (or related Hankel matrices derived from the sequence) give recurrence relations obeyed by the sequence. This speaks to a general phenomenon where properties of sequence (say, arising from snapshots of a dynamical system) can sometimes become more clear by this procedure of delay embedding. it will be illuminating to repackage the measurements f_0,f_1,\ldots,f_{n-1} as a matrix:

(3)   \[H = \begin{bmatrix} f_0 & f_1 & f_2 & \cdots & f_{(n-1)/2} \\f_1 & f_2 & f_3 & \cdots & f_{(n-1)/2+1} \\f_2 & f_3 & f_4 & \cdots & f_{(n-1)/2+2} \\\vdots & \vdots & \vdots & \ddots & \vdots \\f_{(n-1)/2} & f{(n-1)/2+1} & f{(n-1)/2+2} & \cdots & f_{n-1} \end{bmatrix}. \]

Here, we have assumed n is odd. The matrix H is known as the Hankel matrix associated with the sequence f_0,\ldots,f_{n-1}. Observe that the entry in position ij of H depends only on the sum of the indices i and j, H_{ij} = f_{i+j}. (We use a zero-indexing system to label the rows and columns of H where, for instance, the first row of H is row 0.)

Let’s see how we can interpret the frequency decomposition (2) as a factorization of the Hankel matrix H. We first write out H_{ij} using (2):

(4)   \[H_{ij} = f_{i+j} = \sum_{k=0}^5 d_k z_k^{i+j} = \sum_{k=0}^5 d_k z_k^i \cdot z_k^j. \]

The power z_k^{i+j} was just begging to be factorized as z_k^i\cdot z_k^j, which we did. Equation (4) almost looks like the formula for the product of two matrices with entries z_k^i, so it makes sense to introduce the 6\times (n-1)/2 matrix V with entry V_{ki} = z_k^i. This is a so-called Vandermonde matrix associated with z_0,\ldots,z_5 and has the form

    \[V = \begin{bmatrix}z_0^0 & z_0^1 & z_0^2 & \cdots & z_0^{(n-1)/2} \\z_1^0 & z_1^1 & z_1^2 & \cdots & z_1^{(n-1)/2} \\\vdots & \vdots & \vdots & \ddots & \vdots \\z_5^0 & z_5^1 & z_5^2 & \cdots & z_5^{(n-1)/2}\end{bmatrix}.\]

If we also introduce the 6\times 6 diagonal matrix D = \operatorname{diag}(d_0,d_1,\ldots,d_5), the formula (4) for H can be written as the matrix factorization3In the Vandermonde decomposition H=V^\top D V, the factor V appears transposed even when V is populated with complex numbers! This differs from the usual case in linear algebra where we use the conjugate transpose rather than the ordinary transpose when working with complex matrices. As a related issue, observe that if at least one of the measurements f_0,\ldots,f_{n-1} is a (non-real) complex number, the Hankel matrix H is symmetric but not Hermitian.

(5)   \[H = V^\top D V. \]

This is the Vandermonde decomposition of the Hankel matrix H, a factorization of H as a product of the transpose of a Vandermonde matrix, a diagonal matrix, and that same Vandermonde matrix.

The Vandermonde decomposition immediately tells us all the information d_0,\ldots,d_5 and z_0,z_1,\ldots,z_5 describing our sampled recording f_0,\ldots,f_{n-1} via (2). Thus, the problem of determining d_0,\ldots,d_5 and z_0,z_1,\ldots,z_5 is equivalent to finding the Vandermonde decomposition (5) of the Hankel matrix H.

Computing the Vandermonde Decomposition: Prony’s Method

Computing the Vandermonde decomposition accurately can be a surprisingly hard task, particularly if the measurements f_0,f_1,\ldots,f_{n-1} are corrupted by even a small amount of measurement error. In view of this, I want to present a very classical way of computing this decomposition (dating back to 1795!) known as Prony’s method. This method is conceptually simple and will be a vehicle to continue exploring frequency finding and its connection with Hankel matrices. It remains in use, though it’s accuracy may be significantly worse compared to other methods.

As a first step to deriving Prony’s method, let’s reformulate the frequency finding problem in a different way. Sums of cosines like the ones in our expression (1) for the function f(\cdot) often appear as the solution to a (linear) ordinary differential equation (ODE). This means that one way we could find the frequencies comprising f(\cdot) would be to find a differential equation which f(\cdot) satisfies. Together with the initial condition f(0), determining all the frequencies would be very straightforward.

Since we only have access to samples f_0, f_1,\ldots,f_{n-1} of f(\cdot) at regular time intervals, we will instead look for the “discrete-time” analog of a linear ODE, a linear recurrence relation. This is an expression of the form

(6)   \[f_m = c_{k-1} f_{m-1} + \cdots + c_1f_{m-k+1}+ c_0 f_{m-k} \quad \textnormal{for every} \quad m = k,\,{k+1},\,{k+2},\cdots. \]

In our case, we’ll have k = 6 because there are six terms in the formula (2) for f_j. Together with initial conditions f_0,f_1,\ldots,f_{k-1}, such a recurrence will allow us to determine the parameters z_0,\ldots,z_5 and d_0,\ldots,d_5 in our formula (2) for our sampled recordings f_0,\ldots,f_{n-1} and hence also allow us to compute the Vandermonde decomposition (5).

Observe that the recurrence (6) is a linear equation in the variables c_0,\ldots,c_5. A very good rule of thumb in applied mathematics is to always write down linear equations in matrix–vector notation in see how it looks. Doing this, we obtain

(7)   \[\begin{bmatrix} f_6 \\ f_7 \\ \vdots \\ f_{n-1} \end{bmatrix} = \underbrace{\begin{bmatrix} f_0 & f_1 & f_2 & f_3 & f_4 & f_5 \\ f_1 & f_2 & f_3 & f_4 & f_5 & f_6 \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ f_{n-7} & f_{n-6} & f_{n-5} & f_{n-4} & f_{n-3} & f_{n-2} \end{bmatrix}}_{=F}\begin{bmatrix} c_0 \\ c_1 \\ \vdots \\ c_5 \end{bmatrix}. \]

Observe that the matrix on the right-hand side of this equation is also a Hankel matrix (like H in (3)) formed from the samples f_0,\ldots,f_{n-1}. Call this Hankel matrix F. Unlike H in (3), F is rectangular. If n is much larger than 6, F will be tall, possessing many more rows than columns. We assume n > 12 going forward.4n=12 would also be fine for our purposes, but we assume n > 12 to illustrate this highly typical case.

Let’s write (7) a little more compactly as

(8)   \[f_{6 \, :\, n-1} = F c, \]

where we’ve introduced f_{6\,:\, n-1} for the vector on the left-hand side of (7) and collected the recurrence coefficients c_0,\ldots,c_5 into a vector c. For a typical system of linear equations like (8), we would predict the system to have no solution c: Because F has more rows than columns (if n > 12), the system equations (8) has more equations than unknowns. Fortunately, we are not in the typical case. Despite the fact that we have more equations than unknowns, the linear equations (8) have a unique solution c.5This solution can be computed by solving the 6\times 6 system of linear equations \begin{bmatrix} f_6 \\ f_7 \\ \vdots \\ f_{11} \end{bmatrix} = \begin{bmatrix} f_0 & f_1 & \cdots & f_5 \\ f_1 & f_2 & \cdots & f_6 \\ \vdots & \vdots & \ddots & \vdots \\ f_{5} & f_6 & \cdots & f_{11} \end{bmatrix}\begin{bmatrix} c_0 \\ c_1 \\ \vdots \\ c_5\end{bmatrix}. In particular, the matrix on the right-hand side of this equation is guaranteed to be nonsingular under our assumptions. Using the Vandermonde decomposition, can you see why? The existence of a unique solution is a consequence of the fact that the samples f_0,\ldots,f_{n-1} satisfy the formula (2). As a fun exercise, you might want to verify the existence of a unique c satisfying (8)!

As a quick aside, if the measurements f_0,\ldots,f_{n-1} are corrupted by small measurement errors, then the equations (8) will usually not possess a solution. In this case, it would be appropriate to find the least squares solution to equation (8) as a way of mitigating these errors.

Hurrah! We’ve found the coefficients c_0,\ldots,c_5 providing a recurrence relation (6) for our measurements f_0,\ldots,f_{n-1}. All that is left is to find the parameters z_0,\ldots,z_5 and d_0,\ldots,d_5 in our signal formula (2) and the Vandermonde decomposition (5). Fortunately, this is just a standard computation for linear recurrence relations, nicely paralleling the solution of (homogenous) linear ODEs by means of the so-called “characteristic equation”. I’ll go through fairly quickly since this material is well-explained elsewhere on the internet (like Wikipedia). Let’s guess that our recurrence (6) has a solution of the form f_j = z^j; we seek to find all complex numbers z for which this is a bonafide solution. Plugging this solution into the formula (6) for f_6 gives

(9)   \[z^6 = c_0 z^5 + c_1 z^4 + \cdots + c_6. \]

This is the so-called characteristic equation for the recurrence (6). As a single-variable polynomial equation of degree six, it has six complex solutions z_0,z_1,\ldots,z_5. These numbers z_0,z_1,\ldots,z_5 are precisely those numbers which appear in the sequence formula (2) and the Vandermonde decomposition (5).

Finally, we need to compute the coefficients d_0,\ldots,d_5. But this is easy. Observe that the formula (2) provides the following system of linear equations for d_0,\ldots,d_5:

(10)   \[\begin{bmatrix}f_0 \\ f_1 \\ \vdots \\ f_{n-1}\end{bmatrix} = \begin{bmatrix}1 & 1 & \cdots & 1 \\ z_0 & z_1 & \cdots & z_5 \\ \vdots & \vdots & \ddots & \vdots \\ z_0^{n-1} & z_1^{n-1} & \cdots & z_5^{n-1}\end{bmatrix} \begin{bmatrix}d_0 \\ d_1 \\ \vdots \\ d_{n-1}.\end{bmatrix}. \]

Again, this system of equations will have a unique solution if the measurements f_0,\ldots,f_{n-1} are uncorrupted by errors (and can be solved in the least squares sense if corrupted). This gives d_0,\ldots,d_5, completing our goal of computing the parameters in the formula (2) or, equivalently, finding the Vandermonde decomposition (5).

We have accomplished our goal of computing the Vandermonde decomposition. The approach by which we did so is known as Prony’s method, as mentioned in the introduction to this section. As suggested, this method may not always give high-accuracy results. There are two obvious culprits that jump out about why this is the case. Prony’s method requires solving for the roots of the polynomial equation (9) expressed “in the monomial basis” and solving a system of linear equations (10) with a (transposed) Vandermonde matrix. Both of these problems can be notoriously ill-conditioned and thus challenging to solve accurately and may require the measurements f_0,\ldots,f_{n-1} to be done to very high accuracy. Notwithstanding this, Prony’s method does useful results in some cases and forms the basis for potentially more accurate methods, such as those involving generalized eigenvalue problems.

Separating Signals: Extending the Vandermonde Decomposition to Tensors

In our discussion of the frequency identification problem, the Vandermonde decomposition (5) has effectively been an equivalent way of showing the samples f_j are a combination of exponentials z^j. So far, the benefits of the matrix factorization perspective have yet to really reveal themselves.

So what are the benefits of the Vandermonde decompostions? A couple of nice observations related to the Vandermonde decomposition and the “Hankelization” of the signals H have already been lurking in the background. For instance, the rank of the Hankel matrix H is the number of frequency components z_k needed to describe the samples and the representation of the samples as a mixture of exponentials is uniquely determined only if the matrix H does not have full rank; I have a little more to say about this at the very end. There are also benefits to certain computational problems; one can use Vandermonde decompositions to compute super high accuracy singular value decompositions of Hankel matrices.

The power of the Vandermonde decomposition really starts to shine when we go beyond the basic frequency finding problem we discussed by introducing more signals. Suppose now there are three short recordings f^{(1)}(\cdot), f^{(2)}(\cdot), and f^{(3)}(\cdot). (Here, the superscript denotes an index rather than differentiation.) Each signal is a weighted mixture of three sources s^{(1)}(\cdot), s^{(2)}(\cdot), and s^{(3)}(\cdot), each of which plays a musical chord of three notes (thus representable as a sum of cosines as in (1)). One can think of the sources of being produced three different musical instruments at different places in a room and the recordings f^{(1)}(\cdot), f^{(2)}(\cdot), and f^{(3)}(\cdot) being taken from different microphones in the room.6This scenario of instruments and microphones ignores the finite propagation speed of sound, which also would introduce time delays in the sources in the recorded signals. We effectively treat the speed of sound as being instantaneous. Our goal is now not just to identify the musical notes in the recordings but also to identify how to assign those notes to reconstruct the source signals s^{(1)}(\cdot), s^{(2)}(\cdot), and s^{(3)}(\cdot).

Taking inspiration from earlier, we record samples f_0^{(\ell)},\ldots,f_{n-1}^{(\ell)} for each recording \ell = 1,2,3 and form each collection of samples into a Hankel matrix

    \[H^{(\ell)} = \begin{bmatrix} f_0^{(\ell)} & f_1^{(\ell)} & f_2^{(\ell)} & \cdots & f_{(n-1)/2}^{(\ell)} \\f_1^{(\ell)} & f_2^{(\ell)} & f_3^{(\ell)} & \cdots & f_{(n-1)/2+1}^{(\ell)} \\f_2^{(\ell)} & f_3^{(\ell)} & f_4^{(\ell)} & \cdots & f_{(n-1)/2+2}^{(\ell)} \\\vdots & \vdots & \vdots & \ddots & \vdots \\f_{(n-1)/2}^{(\ell)} & f_{(n-1)/2+1}^{(\ell)} & f_{(n-1)/2+2}^{(\ell)} & \cdots & f_{n-1}^{(\ell)} \end{bmatrix}.\]

Here comes the crazy part: Stack the Hankelized recordings H^{(1)}, H^{(2)}, and H^{(3)} as slices of a tensor \mathcal{H}. A tensor, in this context, just means a multidimensional array of numbers. Just as a vector is a one-dimensional array and a matrix is a two-dimensional array, a tensor could have any number of dimensions. In our case, we need just three. If we use a MATLAB-esque indexing notation, \mathcal{H} is a (n-1)/2\times (n-1)/2 \times 3 array given by

    \[\mathcal{H}(:,:,\ell) = H^{(\ell)} \quad \textnormal{for} \quad \ell=1,2,3.\]

The remarkable thing is that the source signals can be determined (under appropriate conditions) by computing a special kind of Vandermonde decomposition of the tensor \mathcal{H}! (Specifically, the required decomposition is a Vandermonde-structured (L_r,L_r,1)-block term decomposition of the tensor \mathcal{H}.) Even more cool, this decomposition can be computed using general-purpose software like Tensorlab.

If this sounds interesting, I would encourage you to check out my recently published paper (L_r,L_r,1)-decompositions, sparse component analysis, and the blind separation of sums of exponentials, joint work with Nithin Govindajaran and Lieven De Lathauwer and recently published in the SIAM Journal on Matrix Analysis and Applications. In the paper, we explain what this (L_r,L_r,1)-decomposition is and how applying it to \mathcal{H} can be used to separate mixtures of exponentials signals from the resulting Vandermonde structure, an idea originating in the work of De Lathauewer. A very important question for these signal separation problems is that of uniqueness. Given the three sampled recordings (comprising the tensor \mathcal{H}), is there just one way of unscrambling the mixtures into different sources or multiple? If there are multiple, then we might have possibly computed the wrong one. If there is just a single unscrambling, though, then we’ve done our job and unmixed the scrambled signals. The uniqueness of these tensor decompositions is fairly complicated math, and we survey existing results and prove new ones in this paper.7One of our main technical contributions is a new notion of uniqueness of (L_r,L_r,1)-decompositions which we believe is nicely adapted to the signal separation context. Specfically, we prove mathematized versions of the statement “if the source signals are sufficiently different from each others and the measurements of sufficiently high quality, then the signals can uniquely be separated”.

Conclusions, Loose Ends, and Extensions

The central idea that we’ve been discussing is how it can be useful to convert between a sequence of observations f_0,f_1,\ldots,f_{n-1} and a special matricization of this sequence into a Hankel matrix (either square, as in (3), or rectangular, as in (7)). By manipulating the Hankel matrix, say, by computing its Vandermonde decomposition (5), we learn something about the original signal, namely a representation of the form (2).

This is a powerful idea which appears implicitly or explicitly throughout various subfields of mathematics, engineering, and computation. As with many other useful ideas, this paradigm admits many natural generalizations and extensions. We saw one already in this post, where we extended the Vandermonde decomposition to the realm of tensors to solve signal separation problems. To end this post, I’ll place a few breadcrumbs at the beginning of a few of the trails of these generalizations for any curious to learn more, wrapping up a few loose ends on the way.

Is the Vandermonde Decomposition Unique?
A natural question is whether the Vandermonde decomposition (5) is unique. That is, is it possible that there exists two Vandermonde decompositions

    \[H = V^\top DV = \tilde{V}^\top \tilde{D} \tilde{V}\]

of the same (square) Hankel matrix H? This is equivalent to whether the frequency components z_0,z_1,\ldots can be uniquely determined from the measurements f_0,f_1,\ldots,f_{n-1}.

Fortunately, the Vandermonde decomposition is unique if (and only if) the matrix H is a rank-deficient matrix. Let’s unpack this a little bit. (For those who could use a refresher on rank, I have a blog post on precisely this topic.) Note that the Vandermonde decomposition is a rank factorization8Rank factorizations are sometimes referred to as “rank-revealing factorizations”. I discuss my dispreference for this term in my blog post on low-rank matrices. since V has \rank H rows, V has full (row) rank, and D is invertible. This means that if take enough samples f_0,\ldots,f_{n-1} of a function f(\cdot) which is a (finite) combinations of exponentials, the matrix H will be rank-deficient and the Vandermonde decomposition unique.9The uniqueness of the Vandermonde decomposition can be proven by showing that, in our construction by Prony’s method, the c‘s, z‘s, and d‘s are all uniquely determined. If too few samples are taken, then H does not contain enough information to determine the frequency components of the signal f(\cdot) and thus the Vandermonde decomposition is non-unique.

Does Every Hankel Matrix Have a Vandermonde Decomposition?
This post has exclusively focused on a situation where we are provided with sequence we know to be represented as a mixture of exponentials (i.e., taking the form (2)) from which the existence of the Vandermonde decomposition (5) follows immediately. What if we didn’t know this were the case, and we were just given a (square) Hankel matrix H. Is H guaranteed to possess a Vandermonde decomposition of the form (5)?

Unfortunately, the answer is no; there exist Hankel matrices which do not possess a Vandermonde decomposition. The issue is related to the fact that the appropriate characteristic equation (analogous to (9)) might possess repeated roots, making the solutions to the recurrence (6) not just take the form z^j but also jz^j and perhaps j^2z^j, j^3z^j, etc.

Are There Cases When the Vandermonde Decomposition is Guaranteed To Exist?
There is one natural case when a (square) Hankel matrix is guaranteed to possess a Vandermonde decomposition, namely when the matrix is nonsingular/invertible/full-rank. Despite this being a widely circulated fact, I am unaware of a simple proof for why this is the case. Unfortunately, there is not just one but infinitely many Vandermonde decompositions for a nonsingular Hankel matrix, suggesting these decompositions are not useful for the frequency finding problem that motivated this post.
What If My Hankel Matrix Does Not Possess a Vandermonde Decomposition?
As discussed above, a Hankel matrix may fail to have a Vandermonde decomposition if the characteristic equation (a la (9)) has repeated roots. This is very much analogous to the case of a non-diagonalizable matrix for which the characteristic polynomial has repeated roots. In this case, while diagonalization is not possible, one can “almost-diagonalize” the matrix by reducing it to its Jordan normal form. In total analogy, every Hankel matrix can be “almost Vandermonde decomposed” into a confluent Vandermonde decomposition (a discovery that appears to have been made independently several times). I will leave these links to discuss the exact nature of this decomposition, though I warn any potential reader that these resources introduce the decomposition first for Hankel matrices with infinitely many rows and columns before considering the finite case as we have. One is warned that while the Vandermonde decomposition is always a rank decomposition, the confluent Vandermonde decomposition is not guaranteed to be one.10Rather, the confluent Vandermonde decomposition is a rank decomposition for an infinite extension of a finite Hankel matrix. Consider the Hankel matrix H = \begin{bmatrix} 1 & 0 & \cdots & 0 & 0 \\ 0 & 0 & \cdots & 0 & 0 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & 0 & 0 \\ 0 & 0 & \cdots & 0 & 1 \end{bmatrix}.This matrix has rank-two but no rank-two confluent Vandermonde decomposition. The issue is that when extended to an infinite Hankel matrix \begin{bmatrix} 1 & \cdots & 0 & 0 & &\cdots & 1\\ \vdots & \ddots & \vdots &\vdots\\ 0 & \cdots & 0 & 0 & 1\\ 0 & \cdots & 0 & 1 \\ & & 1 & & \ddots \\ \vdots\\ 1\end{bmatrix}, this (infinite!) matrix has a rank exceeding the size of the original Hankel matrix H.
The Toeplitz Vandermonde Decomposition
Just as it proved useful to arrange samples f_0,\ldots, f_{n-1} into a Hankel matrix, it can also be useful to form them into a Toeplitz matrix

    \[T = \begin{bmatrix} f_{(n-1)/2} & f_{(n-1)/2+1} & f_{(n-1)/2+2} & \cdots & f_{n-1} \\\\f_{(n-1)/2-1} & f_{(n-1)/2} & f_{(n-1)/2+1} & \cdots & f_{n-2} \\\\f_{(n-1)/2-2} & f_{(n-1)/2-1} & f_{(n-1)/2} & \cdots & f_{n-3} \\\\\vdots & \vdots & \vdots & \ddots & \vdots \\\\ f_0 & f_1 & f_2 & \cdots & f_{(n-1)/2} \end{bmatrix}.\]

The Toeplitz matrix T has the appealing propery that the matrix–vector product Tx computes a (discrete) convolution of the sampled signal f with the sampled signal x which has all sorts of uses in signal processing and related fields.11I discuss Toeplitz matrices and a fast algorithm to compute the product Tx using the fast Fourier transform more in a blog post I wrote about the subject.

One can interconvert between Hankel and Toeplitz matrices by reversing the order of the rows. As such, to the extent to which Hankel matrices possess Vandermonde decompositions (with all the asterisks and fine print just discussed), Toeplitz matrices do as well but with the rows of the first factor reversed:

    \[T = \operatorname{ReversedRows}(V^\top) \cdot DV.\]

There is a special and important case where more is true. If a Toeplitz matrix is (Hermitian) positive semidefinite, then T always possesses a Vandermonde decomposition of the form

    \[T = V^* D V,\]

where V is a Vandermonde matrix associated with parameters z_0,z_1,\ldots,z_{k-1} which are complex numbers of absolute value one and D is a diagonal matrix with real positive entries.12The keen-eyed reader will note that V appears conjugate transposed in this formula rather than transposed as in the Hankel Vandermonde decomposition (5). This Vandermonde decomposition is unique if and only if T is rank-deficient. Positive semidefinite Toeplitz matrices are important as they occur as autocorrelation matrices which effectively describe the similarity between a signal and different shifts of itself in time. Autocorrelation matrices appear under different names in everything from signal processing to random processes to near-term quantum algorithms (a topic near and dear to my heart). A delightfully simple and linear algebraic derivation of this result is given by Yang and Xie (see Theorem 1).13Unfortunately, Yang and Xie incorrectly claim that every Toeplitz matrix possesses a rank factorization Vandermonde decomposition of the form T = V^* D V where V is a Vandermonde matrix populated with entries on the unit circle and D is a diagonal matrix of possibly *complex* entries. This claim is disproven by the example \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}. This decomposition can be generalized to infinite positive semidefinite Toeplitz matrices (appropriately defined).14Specifically, one can show that an infinite positive semidefinite Toeplitz matrix (appropriately defined) also has a “Vandermonde decomposition” (appropriately defined). This result is often known as Herglotz’s theorem and is generalized by the Bochner–Weil theorem.

The Elegant Geometry of Generalized Eigenvalue Perturbation Theory

In this post, I want to discuss a beautiful and simple geometric picture of the perturbation theory of definite generalized eigenvalue problems. As a culmination, we’ll see a taste of the beautiful perturbation theory of Mathias and Li, which appears to be not widely known in virtue of only being explained in a technical report. Perturbation theory for the generalized eigenvalue problem is a bit of a niche subject, but I hope you will stick around for some elegant arguments. In addition to explaining the mathematics, I hope this post serves as an allegory for the importance of having the right way of thinking about a problem; often, the solution to a seemingly unsolvable problem becomes almost self-evident when one has the right perspective.

What is a Generalized Eigenvalue Problem?

This post is about the definite generalized eigenvalue problem, so it’s probably worth spending a few words talking about what generalized eigenvalue problems are and why you would want to solve them. Slightly simplifying some technicalities, a generalized eigenvalue problem consists of finding nonzero vectors x and a (possibly complex) numbers \lambda such that Ax = \lambda \, Bx.1In an unfortunate choice of naming, there is actually a completely different sense in which it makes sense to talk about generalized eigenvectors, in the context of the Jordan normal form for standard eigenvalue problems. The vector x is called an eigenvector and \lambda its eigenvalue. For our purposes, A and B will be real symmetric (or even complex Hermitian) matrices; one can also consider generalized eigenvalue problemss for nonsymmetric and even non-square matrices A and B, but the symmetric case covers many applications of practical interest. The generalized eigenvalue problem is so-named because it generalizes the standard eigenvalue problem Ax = \lambda x, which is a special case of the generalized eigenvalue problem with B = I.2One can also further generalize the generalized eigenvalue problem to polynomial and nonlinear eigenvalue problems.

Why might we want so solve a generalized eigenvalue problem? The applications are numerous (e.g., in chemistry, quantum computation, systems and control theory, etc.). My interest in perturbation theory for generalized eigenvalue problems arose in the analysis of a quantum algorithm for eigenvalue problems in chemistry, and the theory discussed in this article played a big role in that analysis. To give an application which is more easy to communicate than the quantum computation application which motivated my own interest, let’s discuss an application in classical mechanics.

The Lagrangian formalism is a way of reformulating Newton’s laws of motion in a general coordinate system.3The benefits of the Lagrangian framework are far deeper than working in generalized coordinate systems, but this is beyond the scope of our discussion and mostly beyond the scope of what I am knowledgeable enough to write meaningfully about. If q denotes a vector of generalized coordinates describing our system and \dot{q} denotes q‘s time derivative, then the time evolution of a system with Lagrangian functional L(q,\dot{q}) are given by the Euler–Lagrange equations \tfrac{d}{dt} \nabla_{\dot{q}} L = \nabla_q L. If we choose q to represent the deviation of our system from equilibrium,4That is, in our generalized coordinate system, q = 0 is a (static) equilibrium configuration for which \ddot{q} = 0 whenever q = 0 and \dot{q} = 0. then our Lagrangian is well-approximated by it’s second order Taylor series:

    \begin{equation*} L(q,\dot{q}) \approx L_0 + \frac{1}{2} q^\top A q - \frac{1}{2} \dot{q}^\top B\dot{q}. \end{equation*}

By the Euler–Lagrange equations, the equations of motion for small deviations from this equillibrium point are described by

    \begin{equation*} B\ddot{q} = -Aq. \end{equation*}

A fundamental set of solutions of this system of differential equations is given by \mathrm{e}^{\pm \sqrt{-\lambda} \, t} x, where \lambda and x are the generalized eigenvalues and eigenvectors of the pair (A,B).5That is, all solutions to B\ddot{q} = -Aq can be written (uniquely) as linear combinations of solutions of the form \mathrm{e}^{\pm \sqrt{-\lambda} \, t} x. In particular, if all the generalized eigenvalues are positive, then the equillibrium is stable and the square roots of the eigenvalues represent the modes of vibration. In the most simple mechanical systems, such as masses in one dimension connected by springs with the natural coordinate system, the matrix B is diagonal with diagonal entries equal to the different masses. In even slightly more complicated “freshman physics” problems, it is quite easy to find examples where, in the natural coordinate system, the matrix B is nondiagonal.6Almost always, the matrix B is positive definite. As this example shows, generalized eigenvalue problems aren’t crazy weird things since they emerge as natural descriptions of simple mechanical systems like coupled pendulums.

One reason generalized eigenvalue problems aren’t more well-known is that one can easily reduce a generalized eigenvalue problem into a standard one. If the matrix B is invertible, then the generalized eigenvalues of (A,B) are just the eigenvalues of the matrix B^{-1}A. For several reasons, this is a less-than-appealing way of reducing a generalized eigenvalue problem to a standard eigenvalue problem. A better way, appropriate when A and B are both symmetric and B is positive definite, is to reduce the generalized eigenvalue problem for (A,B) to the symmetrically reduced matrix B^{-1/2}AB^{-1/2}, which also possesses the same eigenvalues as (A,B). In particular, the matrix B^{-1/2}AB^{-1/2} remains symmetric, which shows that (A,B) has real eigenvalues by the spectral theorem. In the mechanical context, one can think of this reformulation as a change of coordinate system in which the “mass matrix” B becomes the identity matrix I.

There are several good reasons to not simply reduce a generalized eigenvalue problem to a standard one, and perturbation theory gives a particular good reason. In order for us to change coordinates to change the B matrix into an identity matrix, we must first know the B matrix. If I presented you with an elaborate mechanical system which you wanted to study, you would need to perform measurements to determine the A and B matrices. But all measurements are imperfect and the entries of A and B are inevitably corrupted by measurement errors. In the presence of these measurement errors, we must give up on computing the normal modes of vibration perfectly; we must content ourselves with computing the normal modes of vibration plus-or-minus some error term we hope we can be assured is small if our measurement errors are small. In this setting, reducing the problem to B^{-1/2}AB^{-1/2} seems less appealing, as I have to understand how the measurement errors in A and B are amplified in computing the triple product B^{-1/2}AB^{-1/2}. This also suggests that computing B^{-1/2}AB^{-1/2} may be a poor algorithmic strategy in practice: if the matrix B is ill-conditioned, there might be a great deal of error amplification in the computed product B^{-1/2}AB^{-1/2}. One might hope that one might be able to devise algorithms with better numerical stability properties if we don’t reduce the matrix pair (A,B) to a single matrix. This is not to say that reducing a generalized eigenvalue problem to a standard one isn’t a useful tool—it definitely is. However, it is not something one should do reflexively. Sometimes, a generalized eigenvalue problem is best left as is and analyzed in its native form.

The rest of this post will focus on the question if A and B are real symmetric matrices (satisfying a definiteness condition, to be elaborated upon below), how do the eigenvalues of the pair (A+E,B+F) compare to those of (A,B), where E and F are small real symmetric perturbations? In fact, it shall be no additional toil to handle the complex Hermitian case as well while we’re at it, so we shall do so. (Recall that a Hermitian matrix A satisfies A^* = A, where (\cdot)^* is the conjugate transpose. Since the complex conjugate does not change a real number, a real Hermitian matrix is necesarily symmetric A^* = A^\top = A.) For the remainder of this post, let A, B, E, and F be Hermitian matrices of the same size. Let \widetilde{A} := A+E and \widetilde{B} := B + F denote the perturbations.

Symmetric Treatment

As I mentioned at the top of this post, our mission will really be to find the right way of thinking about perturbation theory for the generalized eigenvalue problem, after which the theory will follow much more directly than if we were to take a frontal assault on the problem. As we go, we shall collect nuggets of insight, each of which I hope will follow quite naturally from the last. When we find such an insight, we shall display it on its own line.

The first insight is that we can think of the pair A and B interchangeably. If \lambda is a nonzero eigenvalue of the pair (A,B), satisfying Ax = \lambda\, Bx, then Bx = \lambda^{-1} \, Ax. That is, \lambda^{-1} is an eigenvalue of the pair (B,A). Lack of symmetry is an ugly feature in a mathematical theory, so we seek to smooth it out. After thinking a little bit, notice that we can phrase the generalized eigenvalue condition symmetrically as \beta \, Ax = \alpha \, Bx with the associated eigenvalue being given by \lambda = \alpha/\beta. This observation may seem trivial at first, but let us collect it for good measure.

Treat A and B symmetrically by writing the eigenvalue as \lambda = \alpha/\beta with \beta\, Ax = \alpha\, Bx.

Before proceeding, let’s ask a question that, in our new framing, becomes quite natural: what happens when \beta = 0? The case \beta = 0 is problematic because it leads to a division by zero in the expression \lambda = \alpha/\beta. However, if we have \alpha \ne 0, this expression still makes sense: we’ve found a vector x for which Ax \ne 0 but Bx = 0. It makes sense to consider x still an eigenvector of (A,B) with eigenvalue \alpha / 0 = \infty! Dividing by zero should justifiably make one squeemish, but it really is quite natural in the case to treat x as a genuine eigenvector with eigenvalue \infty.

Things get even worse if we find a vector x for which Ax = Bx = 0. Then, any (\alpha,\beta) can reasonably considered an eigenvalue of (A,B) since \alpha \, Bx = 0 = \beta\, Ax. In such a case, all complex numbers are simultaneously eigenvalues of (A,B), in which case we call (A,B) singular.7More precisely, a pair (A,B) is singular if the determinant \det(tB - A) is identically zero for all t \in \mathbb{C}. For the generalized eigenvalue problem to make sense for a pair (A,B), it is natural to require that (A,B) not be singular. In fact, we shall assume an even stronger “definiteness” condition which ensures that (A,B) has only real (or infinite) eigenvalues. Let us return to this question of definiteness in a moment and for now assume that (A,B) is not singular and possesses real eigenvalues.

With this small aside taken care of, let us return to the main thread. By modeling eigenvalues as pairs (\alpha,\beta), we’ve traded one ugliness for another. While reformulating the eigenvalue as a pair (\alpha,\beta) treats A and B symmetrically, it also adds an additional indeterminacy, scale. For instance, if (\alpha,\beta) is an eigenvalue of (A,B), then so is (10\alpha,10\beta). Thus, it’s better not to think of (\alpha,\beta) so much as a pair of numbers together with all of its possible scalings.8Projective space provides a natural framework for studying such vectors up to scale indeterminacy. For reasons that shall hopefully become more clear as we go forward, it will be helpful to only consider all the possible positive scalings of (\alpha,\beta)—e.g., all (t\alpha,t\beta) for t > 0. Geometrically, the set of all positive scalings of a point in two-dimensional space is precisely just a ray emanating from the origin.

Represent eigenvalue pairs (\alpha,\beta) as rays emanating from the origin to account for scale ambiguity.

Now comes a standard eigenvalue trick. It’s something you would never think to do originally, but once you see it once or twice you learn to try it as a matter of habit. The trick: multiply the eigenvalue-eigenvector relation by the (conjugate) transpose of x:9For another example of the trick, try applying it to the standard eigenvalue problem Ax = \lambda x. Multiplying by x^* and rearranging gives \lambda = x^*Ax/x^*x—the eigenvalue \lambda is equal to the expression x^*Ax/x^*x, which is so important it is given a name: the Rayleigh quotient. In fact, the largest and smallest eigenvalues of A can be found by maximizing and minimizing the Rayleigh quotient.

    \begin{equation*} \beta \, Ax = \alpha \, Bx \implies \beta \, x^*Ax = \alpha \, x^*Bx \implies \frac{\alpha}{\beta} = \frac{x^*Ax}{x^*Bx}. \end{equation*}

The above equation is highly suggestive: since \alpha and \beta are only determined up to a scaling factor, it shows we can take \alpha = x^*Ax and \beta = x^*Bx. And by different scalings of the eigenvector x, we can scale x^*Ax = \alpha and x^*Bx = \beta by any positive factor we want. (This retroactively shows why it makes sense to only consider positive scalings of \alpha and \beta.10To make this point more carefully, we shall make great use of the identification between pairs (\alpha,\beta) and the pair of quadratic forms (x^*Ax,x^*Bx). Thus, even though (\alpha,\beta) and (-\alpha,-\beta) lead to equivalent eigenvalues since \alpha/\beta = (-\alpha)/(-\beta), (\alpha,\beta) and (-\alpha,-\beta) don’t necessarily both arise from a pair of quadratic forms: if (\alpha,\beta) = (x^* Ax,x^* Bx), this does not mean there exists y such that (y^* Ay,y^* By) = (-\alpha,-\beta). Therefore, we only consider (\alpha,\beta) equivalent to (t\alpha,t\beta) if t > 0.) The expression x^*Ax is so important that we give it a name: the quadratic form (associated with A and evaluated at x).

The eigenvalue pair (\alpha,\beta) can be taken equal to the pair of quadratic forms (x^*Ax,x^*Bx).

Complexifying Things

Now comes another standard mathematical trick: represent points in two-dimensional space by complex numbers. In particular, we identify the pair (\alpha,\beta) with the complex number \alpha + \mathrm{i}\beta.11Recall that we are assuming that \alpha / \beta is real, so we can pick a scaling in which both \alpha and \beta are real numbers. Assume we have done this. Similar to the previous trick, it’s not fully clear why this will pay off, but let’s note it as an insight.

Identify the pair (\alpha,\beta) with the complex number \alpha + \mathrm{i}\beta.

Now, we combine all the previous observations. The eigenvalue \lambda = x^*Ax / x^*Bx is best thought of as a pair (\alpha,\beta) which, up to scale, can be taken to be \alpha = x^*Ax and \beta = x^*Bx. But then we represent (\alpha,\beta) as the complex number

    \begin{equation*} \alpha + \mathrm{i} \beta = x^*Ax + \mathrm{i} x^*Bx = x^*(A + \mathrm{i} B) x. \end{equation*}

Let’s stop for a moment and appreciate how far we’ve come. The generalized eigenvalue problem Ax = \lambda\, Bx is associated with the expression x^*(A+\mathrm{i} B)x.If we just went straight from one to the other, this reduction would appear like some crazy stroke of inspiration: why would I ever think to write down x^*(A+\mathrm{i} B)x? However, just following our nose lead by a desire to treat A and B symmetrically and applying a couple standard tricks, this expression appears naturally. The expression x^*(A+\mathrm{i} B)x will be very useful to us because it is linear in A and B, and thus for the perturbed problem (\widetilde{A},\widetilde{B}) = (A+E,B+F), we have that x^*(\widetilde{A}+\mathrm{i} \widetilde{B})x = x^*(A+\mathrm{i} B)x + x^*(E+\mathrm{i} F)x: consequently, x^*(\widetilde{A}+\mathrm{i} \widetilde{B})x is a small perturbation of x^*(A+\mathrm{i} B)x. This observation will be very useful to us.

If x is the eigenvector, then the complex number \alpha + \mathrm{i} \beta is x^*(A+\mathrm{i} B)x.

Definiteness and the Crawford Number

With these insights in hand, we can now return to the point we left earlier about what it means for a generalized eigenvalue problem to be “definite”. We know that if there exists a vector x for which Ax = Bx = 0, then the problem is singular. If we multiply by x^*, we see that this means that x^*Ax = x^*Bx = 0 as well and thus x^*(A+\mathrm{i}B)x = 0. It is thus quite natural to assume the following definiteness condition:

The pair (A,B) is said to be definite if x^*(A+\mathrm{i}B)x \ne 0 for all complex nonzero vectors x.

A definite problem is guaranteed to be not singular, but the reverse is not necessarily true; one can easily find pairs (A,B) which are not definite and also not singular.12For example, consider A = B = \operatorname{diag}(1,-1). (A,B) is not definite since x^*Ax = x^*Bx = 0 for x = (1,1). However, (A,B) is not singular; the only eigenvalue of the pair (A,B) is 1 and \det(tB-A) = -(t-1) is not identically zero.. (Note x^*Ax = x^*Bx = 0 does not imply Ax = Bx = 0 unless A and B are both positive (or negative) semidefinite.)

The “natural” symmetric condition for (A,B) to be “definite” is for x^*(A+\mathrm{i} B)x \ne 0 for all vectors x.

Since the expression x^*(A+\mathrm{i}B)x is just scaled by a positive factor by scaling the vector x, it is sufficient to check the definiteness condition x^*(A+\mathrm{i}B)x \ne 0 for only complex unit vectors x. This leads naturally to a quantitative characterization of the degree of definiteness of a pair (A,B):

The Crawford number13The name Crawford number was coined by G. W. Stewart in 1979 in recognition of Crawford’s pioneering work on the perturbation theory of the definite generalized eigenvalue problem. c(A,B) of a pair (A,B) is the minimum value of |x^*(A+\mathrm{i}B)x| = \sqrt{(x^*Ax)^2 + (x^*Bx)^2} over all complex unit vectors x.

The Crawford number naturally quantifies the degree of definiteness.14In fact, it has been shown that the Crawford number is, in a sense, the distance from a definite matrix pair (A,B) to a pair which is not simultaneously diagonalizable by congruence. A problem which has a large Crawford number (relative to a perturbation) will remain definite after perturbation, whereas the pair may become indefinite if the size of the perturbation exceeds the Crawford number. Geometrically, the Crawford number has the following interpretation: x^*(A+\mathrm{i}B)x must lie on or outside the circle of radius c(A,B) centered at 0 for all (complex) unit vectors x.

The “degree of definiteness” can be quantified by the Crawford number c(A,B) := \min_{\|x\|=1} x^*(A+iB)x.

Now comes another step in our journey which is a bit more challenging. For a matrix C (in our case C = A+\mathrm{i}B), the set of complex numbers x^*Cx for all unit vectors x has been the subject of considerable study. In fact, this set has a name

The field of values of a matrix C is the set W(C) := \{ x^*Cx : x\in\mathbb{C}^n, \: \|x\| = 1\}.

In particular, the Crawford number is just the absolute value of the closest complex number in the field of values W(A+iB) to zero.

It is a very cool and highly nontrivial fact (called the Toeplitz–Hausdorff Theorem) that the field of values is always a convex set, with every two points in the field of values containing the line segment connecting them. Thus, as a consequence, the field of values W(A+\mathrm{i}B) for a definite matrix pair (A,B) is always on “one side” of the complex plane (in the sense that there exists a line through zero which W(A+\mathrm{i}B) lies strictly on one side of15This is a consequence of the hyperplane separation theorem together with the fact that 0\notin W(A+\mathrm{i}B).).

The numbers x^*(A+iB)x for unit vectors x lie on one half of the complex plane.

The field of values W(A+\mathrm{i}B) lies outside the circle of radius c(A,B) centered at 0 and thus on one side of the complex plane.

From Eigenvalues to Eigenangles

All of this geometry is lovely, but we need some way of relating it to the eigenvalues. As we observed a while ago, each eigenvalue is best thought of as a ray emanating from the origin, owing to the fact that the pair (\alpha,\beta) can be scaled by an arbitrary positive factor. A ray is naturally associated with an angle, so it is natural to characterize an eigenvalue pair (\alpha,\beta) by the angle describing its arc.

But the angle of a ray is only defined up additions by full rotations (2\pi radians). As such, to associate each ray a unique angle we need to pin down this indeterminacy in some fixed way. Moreover, this indeterminacy should play nice with the field of values W(A+\mathrm{i}B) and the field of values W(\widetilde{A}+\mathrm{i}\widetilde{B}) of the perturbation. But in the last section, we say that each of these field of angles lies (strictly) on one half of the complex plane. Thus, we can find a ray R which does not intersect either field of values!

One possible choice is to measure the angle from this ray. We shall make a slightly different choice which plays better when we treat (\alpha,\beta) as a complex number \alpha + \mathrm{i}\beta. Recall that a number \theta is an argument for \alpha + \mathrm{i}\beta if \alpha + \mathrm{i}\beta = r\mathrm{e}^{i\theta} for some real number r \ge 0. The argument is multi-valued since \theta + 2\pi n is an argument for \alpha+\mathrm{i}\beta as long as \theta is (for all integers n). However, once we exclude our ray R, we can assign each complex number \alpha+\mathrm{i}\beta not on this ray a unique argument which depends continuously on (\alpha,\beta). Denote this “branch” of the argument by \operatorname{arg}. If (\alpha,\beta) represents an eigenvalue \lambda = \alpha/\beta, we call \theta = \arg(\alpha+\mathrm{i}\beta) an eigenangle.

Represent an eigenvalue pair (\alpha,\beta) by its associated eigenangle \theta = \arg(\alpha+i\beta).

How are these eigenangles related to the eigenvalues? It’s now a trigonometry problem:

    \begin{equation*} \lambda = \frac{\alpha}{\beta} = \frac{\mbox{adjacent}}{\mbox{opposite}} = \cot \left( \operatorname{arg}(\alpha+i\beta)). \end{equation*}

The eigenvalues are the cotangents of the eigenangles!

The eigenvalue \lambda = \alpha/\beta is the cotangent of the eigenangle \theta = \arg(\alpha+\mathrm{i}\beta).

Variational Characterization

Now comes another difficulty spike in our line of reasoning, perhaps the largest in our whole deduction. To properly motivate things, let us first review some facts about the standard Hermitian/symmetric eigenvalue problem. The big idea is that eigenvalues can be thought of as the solution to a certain optimization problem. The largest eigenvalue of a Hermitian/symmetric matrix A is given by the maximization problem

    \begin{equation*} \lambda_{\rm max}(A) = \max_{\|x\| = 1} x^*Ax. \end{equation*}

The largest eigenvalue is the maximum of the quadratic form over unit vectors x. What about the other eigenvalues? The answer is not obvious, but the famous Courant–Fischer Theorem shows that the jth largest eigenvalue \lambda_j(A) can be written as the following minimax optimization problem

    \begin{equation*} \lambda_j(A) = \min_{\dim \mathcal{X} = n-j+1} \max_{\substack{x \in \mathcal{X} \\ \|x\| = 1}} x^*Ax. \end{equation*}

The minimum is taken over all subspaces \mathcal{X} of dimension n-j+1 whereas the maximum is taken over all unit vectors x within the subspace \mathcal{X}. Symmetrically, one can also formulate the eigenvalues as a max-min optimization problem

    \begin{equation*} \lambda_j(A) = \max_{\dim \mathcal{X} = j} \min_{\substack{x \in \mathcal{X} \\ \|x\| = 1}} x^*Ax. \end{equation*}

These variational/minimax characterizations of the eigenvalues of a Hermitian/symmetric matrix are essential to perturbation theory for Hermitian/symmetric eigenvalue problems, so it is only natural to go looking for a variational characterization of the generalized eigenvalue problem. There is one natural way of doing this that works for B positive definite: specifically, one can show that

    \begin{equation*} \lambda_j(A,B) = \min_{\dim \mathcal{X} = n-j+1} \max_{\substack{x \in \mathcal{X} \\ \|x\| = 1}} \frac{x^*Ax}{x^*Bx}. \end{equation*}

This characterization, while useful in its own right, is tricky to deal with because it is nonlinear in A and B. It also treats A and B non-symmetrically, which should set off our alarm bells that there might be a better way. Indeed, the ingenious idea, due to G. W. Stewart in 1979, is to instead provide a variational characterization of the eigenangles! Specifically, Stewart was able to show16Stewart’s original definition of the eigenangles differs from ours; we adopt the definition of Mathias and Li. The result amounts to the same thing.

(1)   \begin{align*} \theta_j &= \min_{\dim \mathcal{X} = n-j+1} \max_{\substack{x\in\mathcal{X} \\ \|x\|=1}} \arg(x^*(A+\mathrm{i}B)x), \\ \theta_j &= \max_{\dim \mathcal{X} = j} \min_{\substack{x\in\mathcal{X} \\ \|x\|=1}} \arg(x^*(A+\mathrm{i}B)x), \end{align*}

for the eigenangles \theta_1\ge \theta_2\ge\cdots\ge \theta_n.17Note that since the cotangent is decreasing on [0,\pi], this means that the eigenvalues \lambda_1 = \cot \theta_1 \le \lambda_2 = \cot \lambda_2 \le \cdots are now in increasing order, in contrast to our convention from earlier in this section. This shows, in particular, that the field of values is subtended by the smallest and largest eigenangles.

The eigenangles satisfy a minimax variational characterization.

How Big is the Perturbation?

We’re tantalizingly close to our objective. The final piece in our jigsaw puzzle before we’re able to start proving perturbation theorems is to quantify the size of the perturbing matrices E and F. Based on what we’ve done so far, we see that the eigenvalues are natural associated with the complex number x^*(A+\mathrm{i}B)x, so it is natural to characterize the size of the perturbing pair (E,F) by the distance between x^*(A+\mathrm{i}B)x and x^*(\widetilde{A}+\mathrm{i}\widetilde{B})x. But the difference between these two quantities is just

    \begin{equation*} x^*(\widetilde{A}+\mathrm{i}\widetilde{B})x - x^*(A+\mathrm{i}B)x = x^*(E+\mathrm{i}F)x. \end{equation*}

We’re naturally led to the question: how big can x^*(E+\mathrm{i}F)x be? If the vector x has a large norm, then quite large, so let’s fix x to be a unit vector. With this assumption in place, the maximum size of x^*(E+\mathrm{i}F)x is simple the distance of the farthest point in the field of values E+iF from zero. This quantity has a name:

The numerical radius of a matrix G (in our case =E+\mathrm{i}F) is r(G) := \max_{\|x\|=1} |x^*Gx|.18This maximum is taken over all complex unit vectors x.

The size of the perturbation (E,F) is the numerical radius r(E+\mathrm{i}F) = \max_{\|x\|=1} |x^*(E+\mathrm{i}F)x|.

It is easy to upper-bound the numerical radius r(E+\mathrm{i}F) by more familiar quantities. For instance, once can straightforwardly show the bound r(E+\mathrm{i}F) \le \sqrt{\|E\|^2+\|F\|^2}, where \|\cdot\| is the spectral norm. We prefer to state results using the numerical radius because of its elegance: it is, in some sense, the “correct” measure of the size of the pair (E,F) in the context of this theory.

Stewart’s Perturbation Theory

Now, after many words of prelude, we finally get to our first perturbation theorem. With the work we’ve done in place, the result is practically effortless.

Let \widetilde{\theta}_1\ge \widetilde{\theta}_2\ge \cdots\ge\widetilde{\theta}_n denote the eigenangles of the perturbed pair (\widetilde{A},\widetilde{B}) and consider the jth eigenangle. Let \mathcal{X}^* be the subspace of dimension n-j+1 achieving the minimum in the first equation of the variational principle (1) for the original unperturbed pair (A,B). Then we have

(2)   \begin{equation*} \widetilde{\theta}_j = \min_{\dim \mathcal{X} = n-j+1} \max_{\substack{x\in\mathcal{X} \\ \|x\|=1}} \arg(x^*(\widetilde{A}+\mathrm{i}\widetilde{B})x) \le \max_{\substack{x\in\mathcal{X}^* \\ \|x\|=1}} \arg(x^*(A+\mathrm{i}B)x + x^*(E+\mathrm{i}F)x). \end{equation*}

This is something of a standard trick when dealing with variational problems in matrix analysis: take the solution (in this case the minimizing subspace) for the original problem and plug it in for the perturbed problem. The solution may no longer be optimal, but it at least gives an upper (or lower) bound. The complex number x^*(A+\mathrm{i}B)x must lie at least a distance c(A,B) from zero and |x^*(E+\mathrm{i}F)x| \le r(E+\mathrm{i}F). We’re truly toast if the perturbation is large enough to perturb x^*(\widetilde{A}+i\widetilde{B})x to be equal to zero, so we should assume that r(E+\mathrm{i}F) < c(A,B).

For our perturbation theory to work, we must assume r(E+\mathrm{i}F) < c(A,B).

x^*(A+\mathrm{i}B)x lies on or outside the circle centered at zero with radius c(A,B). x^*(\tilde{A}+\mathrm{i}B)x might lie anywhere in a circle centered at x^*(A+\mathrm{i}B)x with radius r(E+\mathrm{i}F), so one must have r(E+\mathrm{i}F) < c(A,B) to ensure the perturbed problem is nonsingular (equivalently x^*(\tilde{A}+\mathrm{i}B)x\ne 0 for every x).

Making the assumption that r(E+\mathrm{i}F) < c(A,B), bounding the right-hand side of (2) requires finding the most-counterclockwise angle necessary to subtend a circle of radius r(E+\mathrm{i}F) centered at x^*(A+\mathrm{i}B)x, which must lie a distance c(A,B) from the origin. The worst-case scenario is when x^*(A+\mathrm{i}B)x is exactly a distance c(A,B) from the origin, as is shown in the following diagram.

In the worst case, x^*(A+\mathrm{i}B)x lies on the circle centered at zero with radius c(A,B), which is subtended above by angle \theta_j + \sin^{-1}(r(E+iF)/c(A,B)).

Solving the geometry problem for the counterclockwise-most subtending angle in this worst-case sitation, we conclude the eigenangle bound \widetilde{\theta}_j -\theta_j \le \sin^{-1}(r(E+\mathrm{i}F)/c(A,B)). An entirely analogous argument using the max-min variational principle (1) proves an identical lower bound, thus showing

(3)   \begin{equation*} \sin |\theta_j - \widetilde{\theta}_j| \le \frac{r(E+\mathrm{i}F)}{c(A,B)}. \end{equation*}

In the language of eigenvalues, we have19I’m being a little sloppy here. For a result like this to truly hold, I believe all of the perturbed and unperturbed eigenangles should all be contained in one half of the complex plane.

    \begin{equation*} |\cot^{-1}(\widetilde{\lambda}_j) - \cot^{-1}(\lambda_j)| \le \sin^{-1}\left( \frac{r(E+\mathrm{i}F)}{c(A,B)} \right). \end{equation*}

Interpreting Stewart’s Theory

After much work, we have finally proven our first generalized eigenvalue perturbation theorem. After taking a moment to celebrate, let’s ask ourselves: what does this result tell us?

Let’s start with the good. This result shows us that if the perturbation, measured by the numerical radius r(E+iF), is much smaller than the definiteness of the original problem, measured by the Crawford number c(A,B), then the eigenangles change by a small amount. What does this mean in terms of the eigenvalues? For small eigenvalues (say, less than one in magnitude), small changes in the eigenangles also lead to small changes of the eigenvalues. However, for large eigenangles, small changes in the eigenangle are magnified into potentially large changes in the eigenvalues. One can view this result in a positive or negative framing. On the one hand, large eigenvalues could be subject to dramatic changes by small perturbations; on the other hand, the small eigenvalues aren’t “taken down with the ship” and are much more well-behaved.

Stewart’s theory is beautiful. The variational characterization of the eigenangles (1) is a master stroke and exactly the extension one would want from the standard Hermitian/symmetric theory. From the variational characterization, the perturbation theorem follows almost effortlessly from a little trigonometry. However, Stewart’s theory has one important deficit: the Crawford number. All that Stewart’s theory tells is that all of the eigenangles change by at most roughly “perturbation size over Crawford number”. If the Crawford number is quite small since the problem is nearly indefinite, this becomes a tough pill to swallow.

The Crawford number is in some ways essential: if the perturbation size exceeds the Crawford number, the problem can become indefinite or even singular. Thus, we have no hope of fully removing the Crawford number from our analysis. But might it be the case that some eigenangles change by much less than “pertrubation size over Crawford number”? Could we possibly improve to a result of the form “the eigenangles change by roughly perturbation size over something (potentially) much less than the Crawford number”? Sun improved Stewart’s analysis in 1982, but the scourge of the Crawford number remained.20Sun’s bound does not explicitly have the Crawford number, instead using the quantity \zeta := \max_{\|x\|=1} \sqrt{|x^*(E+\mathrm{i}F)x|/|x^*(A+iB)x|} and another hard-to-concisely describe quantity. In many cases, one has nothing better to do than to bound \zeta \le r(E+\mathrm{i}F)/c(A,B), in which case the Crawford number has appeared again. The theory of Mathias and Li, published in a technical report in 2004, finally produced a bound where the Crawford number is replaced.

The Mathias–Li Insight and Reduction to Diagonal Form

Let’s go back to the Stewart theory and look for a possible improvement. Recall in the Stewart theory that we considered the point x^*(A+\mathrm{i}B)x on the complex plane. We then argued that, in the worst case, this point would lie a distance c(A,B) from the origin and then drew a circle around it with radius r(E+\mathrm{i}F). To improve on Stewart’s bound, we must somehow do something better than using the fact that |x^*(A+\mathrm{i}B)x|\ge c(A,B). The insight of the Mathias–Li theory is, in some sense, as simple as this: rather than using the fact that |x^*(A+\mathrm{i}B)x| \ge c(A,B) (as in Stewart’s analysis), use how far x^*(A+\mathrm{i}B)x actually is from zero, where x is chosen to be the unit norm eigenvectors of (A,B).21This insight is made more nontrivial by the fact that, in the context of generalized eigenvalue problems, it is often not convenient to choose the eigenvectors to have unit norm. As Mathias and Li note, there are often two more popular normalizations for x. If B is positive definite, one often normalizes x such that \beta = x^*Bx = 1—the eigenvectors are thus made “B-orthonormal”, generalizing the fact that the eigenvectors of a Hermitian/symmetric matrix are orthonormal. Another popular normalization is to scale x such that |\alpha+i\beta| = |x^*(A+\mathrm{i}B)x| = 1. In this way, just taking the eigenvector x to have unit norm is already a nontrivial insight.

Before going further, let us quickly make a small reduction which will simplify our lives greatly. Letting X denote a matrix whose columns are the unit-norm eigenvectors of (A,B), one can verify that X^*AX and X^*BX are diagonal matrices with entries \alpha_1,\ldots,\alpha_n and \beta_1,\ldots,\beta_n respectively. With this in mind, it can make our lives a lot easy to just do a change of variables A \mapsto X^*AX and B\mapsto X^*BX (which in turn sends E\mapsto X^*EX and F \mapsto X^*FX). The change of variables A \mapsto X^*AX is very common in linear algebra and is called a congruence transformation.

Perform a change of variables by a congruence transformation with the matrix of eigenvectors.

While this change of variables makes our lives a lot easier, we must first worry about how this change of variables might effect the size of the perturbation matrices (E,F). It turns out this change of variables is not totally benign, but it is not maximally harmful either. Specifically, the spectral radius r(E+\mathrm{i}F) can grow by as much as a factor of n.22This is because, in virtue of having unit-norm columns, the spectral norm of the X matrix is \|X\| \le \|X\|_{\rm F} \le \sqrt{n}. Further, note the following variational characterization of the spectral radius r(E+\mathrm{i}F) = \max_\theta \| (\cos \theta) E + (\sin\theta) F \|. Plugging these two facts together yields r(X^*EX+\mathrm{i}\, X^*FX) \le \|X\|^2r(E+\mathrm{i}F) \le nr(E+\mathrm{i}F). This factor of n isn’t great, but it is much better than if the bound were to degrade by a factor of the condition number \|X\|\|X^{-1}\|, which can be arbitrarily large.

This change of variables may increase r(E+\mathrm{i}F) by at most a factor of n.

From now on, we shall tacitly assume that this change of variables has taken place, with A and B being diagonal and E and F being such that r(E+\mathrm{i}F) is at most a factor n larger than it was previously. We denote by \alpha_j and \beta_j the jth diagonal element of A and B, which are given by \alpha_j = x_j^*Ax_j and \beta_j = x_j^*Bx_j where x_j is the jth unit-norm eigenvector

Mathias and Li’s Perturbation Theory

We first assume the perturbation (E,F) is smaller than the Crawford number in the sense r(E+\mathrm{i}F) < c(A,B), which is required to be assured that the perturbed problem (\widetilde{A},\widetilde{B}) does not lose definiteness. This will be the only place in this analysis where we use the Crawford number.

Draw a circle of radius r(E+\mathrm{i}F) around \alpha_j + \mathrm{i}\beta_j.

If \theta_j is the associated eigenangle, then this circle is subtended by arcs with angles

    \begin{equation*} \ell_j = \theta_j - \sin^{-1}\left(\frac{r(E+\mathrm{i}F)}{|\alpha_j+\mathrm{i}\beta_j|}\right), \quad u_j = \theta_j + \sin^{-1}\left(\frac{r(E+\mathrm{i}F)}{|\alpha_j+\mathrm{i}\beta_j|}\right). \end{equation*}

It would be nice if the perturbed eigenangles \widetilde{\theta}_j were guaranteed to lie in these arcs (i.e., \ell_j \le \widetilde{\theta}_j \le u_j). Unfortunately this is not necessarily the case. If one \alpha_j + \mathrm{i}\beta_j is close to the origin, it will have a large arc which may intersect with other arcs; if this happens, we can’t guarantee that each perturbed eigenangle will remain within its individual arc. We can still say something though.

What follows is somewhat technical, so let’s start with the takeaway conclusion: \widetilde{\theta}_j is larger than any j of the lower bounds \ell_j. In particular, this means that \widetilde{\theta}_j is larger than the jth largest of all the lower bounds. That is, if we rearrange the lower bounds \ell_1,\ldots,\ell_n in decreasing order \ell_1^\downarrow \ge \ell_2^\downarrow \ge \cdots \ge \ell_n^\downarrow, we hace \widetilde{\theta}_j \ge \ell_j^\downarrow. An entirely analogous argument will give an upper bound, yielding

(4)   \begin{equation*} \ell_j^\downarrow \le \widetilde{\theta}_j \le u_j^\downarrow. \end{equation*}

For those interested in the derivation, read on the in the following optional section:

Derivation of the Mathias–Li Bounds
Since A and B are diagonal, the eigenvectors of the pair (A,B) are just the standard basis vectors, the jth of which we will denote e_j. The trick will be to use the max-min characterization (1) with the subspace \mathcal{X} spanned by some collection of j basis vectors e_{i_1},\ldots,e_{i_j}. Churning through a couple inequalities in quick fashion,23See pg. 17 of the Mathias and Li report. we obtain

    \begin{align*} \widetilde{\theta}_j &\ge \min_{\substack{x \in \mathcal{X} \\ \|x\| = 1}} \arg \left( x^*(A+\mathrm{i}B)x + x^*(E+\mathrm{i}F)x \right) \\ &\ge \min \left\{ \arg(y+z) : y \in \operatorname{conv} \{ \alpha_{i_1}+\mathrm{i}\beta_{i_1},\ldots,\alpha_{i_j}+\mathrm{i}\beta_{i_j} \}, z\in W(E+\mathrm{i}F) \} \\ &\ge \min \left\{ \arg(y+z) : y \in \operatorname{conv} \{ \alpha_{i_1}+\mathrm{i}\beta_{i_1},\ldots,\alpha_{i_j}+\mathrm{i}\beta_{i_j} \}, |z|\le r(E+\mathrm{i}F) \} \\ &\ge \min \left\{ \arg(w) : w\in\operatorname{conv} \bigcup_{k=1}^j \{ a\in\mathbb{C} : |\alpha_{i_k} + \mathrm{i}\beta_{i_k} - a| \le r(E+\mathrm{i}F) \} \right\} \\ &= \min_{k=1,\ldots,j} \ell_{i_k}. \end{align*}

Here, \operatorname{conv} denotes the convex hull. Since this holds for every set of indices i_1,\ldots,i_j, it in particular holds for the set of indices which makes \min_{k=1,\ldots,j} \ell_{i_k} the largest. Thus, \widetilde{\theta}_j \ge \ell^\downarrow_j.

How to Use Mathias–Li’s Perturbation Theory

The eigenangle perturbation bound (4) can be instantiated in a variety of ways. We briefly sketch two. The first is to bound |\alpha_j + \mathrm{i}\beta_j| by its minimum over all j, which then gives a bound on u^\downarrow_j (and \ell^\downarrow_j)

    \begin{equation*} |\alpha_j + \mathrm{i} \beta_j| \ge \min_{1\le j\le n} |\alpha_j + \mathrm{i} \beta_j| \implies u_j^\downarrow \le \theta_j + \sin^{-1} \frac{r(E+\mathrm{i}F)}{\min_{1\le j\le n} |\alpha_j + \mathrm{i} \beta_j|}. \end{equation*}

Plugging into (4) and simplifying gives

(5)   \begin{equation*} \sin \left| \widetilde{\theta}_j - \theta_j \right| \le \frac{r(E+\mathrm{i}F)}{\min_{1\le j\le n} |\alpha_j + \mathrm{i} \beta_j|}. \end{equation*}

This improves on Stewart’s bound (3) by replacing the Crawford number c(A,B) by \min_{1\le j\le n} |\alpha_j + \mathrm{i} \beta_j|; as Mathias and Li show \min_{1\le j\le n} |\alpha_j + \mathrm{i} \beta_j| is always smaller than or equal to c(A,B) and can be much much smaller.24Recall that Mathias and Li’s bound first requires us to do a change of variables where A and B both become diagonal, which can increase r(E+\mathrm{i}F) by a factor of n. Thus, for an apples-to-apples comparison with Stewart’s theory where A and B are non-diagonal, (5) should be interpreted as \sin \left| \widetilde{\theta}_j - \theta_j \right| \le n\,r(E+\mathrm{i}F)/\min{1\le j\le n} |\alpha_j + \mathrm{i} \beta_j|.

For the second instantiation (4), we recognize that if an eigenangle \theta_j is sufficiently well-separated from other eigenangles (relative to the size of the perturbation and \min_{1\le j\le n} |\alpha_j + \mathrm{i} \beta_j|), then we have u_j^\downarrow \le u_j and \ell_j^\downarrow \ge \ell_j. (The precise instantiation of “sufficiently well-separated” requires some tedious algebra; if you’re interested, see Footnote 7 in Mathias and Li’s paper.25You may also be interested in Corollary 2.2 in this preprint by myself and coauthors.) Under this separation condition, (4) then reduces to

(6)   \begin{equation*} \sin \left| \widetilde{\theta}_j - \theta_j \right| \le \frac{r(E+\mathrm{i}F)}{|\alpha_j + \mathrm{i} \beta_j|}. \end{equation*}

This result improves on Stewart’s result (4) by even more, since we have now replaced the Crawford number c(A,B) by |\alpha_j + \mathrm{i} \beta_j| for a sufficiently small perturbation. In fact, a result of this form is nearly as good as one could hope for.26Specifically, the condition number of the eigenangle \theta_j is |\alpha_j + \mathrm{i} \beta_j|^{-1}, so we know for sufficiently small perturbations we have \left| \widetilde{\theta}_j - \theta_j \right| \lessapprox (\mbox{size of perturbation}) \times |\alpha_j + \mathrm{i} \beta_j|^{-1} and |\alpha_j + \mathrm{i} \beta_j|^{-1} is the smallest number for which such a relation holds. Mathias and Li’s theory allows for a statement of this form to be made rigorous for a finite-size perturbation. Again, the only small deficit is the additional factor of “n” from the change of variables to diagonal form.

The Elegant Geometry of Generalized Eigenvalue Perturbation Theory

As I said at the start of this post, what fascinates me about this generalized eigenvalue perturbation is the beautiful and elegant geometry. When I saw it for the first time, it felt like a magic trick: a definite generalized eigenvalue problem with real eigenvalues was transformed by sleight of hand into a geometry problem on the complex plane, with solutions involving just a little high school geometry and trigonometry. Upon studying the theory, I began to appreciate it for a different reason. Upon closer examination, the magic trick was revealed to be a sequence of deductions, each logically following naturally from the last. To the pioneers of this subject—Stewart, Sun, Mathias, Li, and others—this sequence of logical deductions was not preordained, and their discovery of this theory doubtlessly required careful thought and leaps of insight. Now that this theory has been discovered, however, we get the benefit of retrospection, and can retell a narrative of this theory where each step follows naturally from the last. When told this way, one almost imagines being able to develop this theory by oneself, where at each stage we appeal to some notion of mathematical elegance (e.g., by treating A and B symmetrically) or by applying a standard trick (e.g., identifying a pair (\alpha,\beta) with the complex number \alpha + \mathrm{i}\beta). Since this theory took several decades to fall into place, we should not let this storytelling exercise fool us into thinking the prospective act of developing a new theory will be as straightforward and linear as this retelling, pruned of dead ends and halts in progress, might suggest.

That said, I do think the development of the perturbation theory of the generalized eigenvalue problem does have a lesson for those of us who seek to develop mathematical theories: be guided by mathematical elegance. At several points in the development of the perturbation theory, we obtained great gains by treating quantities which play a symmetric role in the problem symmetrically in the theory or by treating a pair of real numbers as a complex number and asking how to interpret that complex number. My hope is that this perturbation theory serves as a good example for how letting oneself be guided by intuition, a small array of standard tricks, and a search for elegance can lead one to conceptualize a problem in the right way which leads (after a considerable amount of effort and a few lucky breaks) to a natural solution.

Why Randomized Algorithms?

In this post, I want to answer a simple question: how can randomness help in solving a deterministic (non-random) problem?

Let’s start by defining some terminology. An algorithm is just a precisely defined procedure to solve a problem. For example, one algorithm to compute the integral of a function f on the interval [0,1] is to pick 100 equispaced points 0 = x_1 < \tfrac{1}{100} = x_2 < \tfrac{2}{100} = x_3 <\cdots<\tfrac{99}{100}=x_{100} on this interval and output the Riemann sum \tfrac{1}{n} \sum_{j=1}^{100} f(x_j). A randomized algorithm is simply an algorithm which uses, in some form, randomly chosen quantities. For instance, a randomized algorithm1This randomized algorithm is an example of the strategy of Monte Carlo integration, which has proved particularly effective at computing integrals of functions on high-dimensional spaces. for computing integrals would be to pick 100 random points X_1,\ldots,X_{100} uniformly distributed in the interval [0,1] and output the average \tfrac{1}{n} \sum_{j=1}^{100} f(X_j). To help to distinguish, an algorithm which does not use randomness is called a deterministic algorithm.

To address the premise implicit in our central question, there are problems where randomized algorithms provably outperform the best possible deterministic algorithms.2Examples abound in online decision making, distributed computation, linear algebra in the matrix-vector query model, and in simple computational models like single tape Turing machines. Additionally, even for problems for which randomized algorithms have not been formally proven to outperform deterministic ones, the best randomized algorithms we know for many problems dramatically outperform the best-known deterministic algorithms. For example, testing whether an n-digit number is prime takes roughly n^6 operations using the best-known deterministic algorithm and only roughly n^2 operations allowing randomness. The power of randomness extends beyond discrete problems typically considered by computer scientists to continuous problems of interest to computational mathematicians and scientists. For instance, the (asymptotically) fastest known algorithms to solve Laplacian linear system of equations use random sampling as a key ingredient. The workhorse optimization routines in machine learning are mostly variants of stochastic gradient descent, a randomized algorithm. To list off a few more, randomized algorithms have proven incredibly effective in solving eigenvalue and singular value problems, approximating the trace of a very large matrix, computing low-rank approximations, evaluating integrals, and simulating subgrid phenomena in fluid problems.

This may seem puzzling and even paradoxical. There is no randomness in, say, a system of linear equations, so why should introducing randomness help solve such a problem? It can seem very unintuitive that leaving a decision in an algorithm up to chance would be better than making an informed (and non-random) choice. Why do randomized algorithms work so well; what is the randomness actually buying us?

A partial answer to this question is that it can be very costly to choose the best possible option at runtime for an algorithm. Often, a random choice is “good enough”.

A Case Study: Quicksort

Consider the example of quicksort. Given a list of N integers to sort in increasing order, quicksort works by selecting an element to be the pivot and then divides the elements of the list into groups larger and smaller than the pivot. One then recurses on the two groups, ending up with a sorted list.

The best choice of pivot is the median of the list, so one might naturally think that one should use the median as the pivot for quicksort. The problem with this reasoning is that finding the median is time-consuming; even using the fastest possible median-finding algorithm,3There is an algorithm guaranteed to find the median in \mathcal{O}(N) time, which is asymptotically fast as this problem could possibly be solved since any median-finding algorithm must in general look at the entire list.quicksort with exact median pivot selection isn’t very quick. However, one can show quicksort with a pivot selected (uniformly) at random achieves the same \mathcal{O}(N\log N) expected runtime as quicksort with optimal pivot selection and is much faster in practice.4In fact, \mathcal{O}(N \log N) is the fastest possible runtime for any comparison sorting algorithm.

But perhaps we have given up on fast deterministic pivot selection in quicksort too soon. What if we just pick the first entry of the list as the pivot? This strategy usually works fairly well too, but it runs into an unfortunate shortfall: if one feeds in a sorted list, the first-element pivot selection is terrible, resulting in a \mathcal{O}(N^2) algorithm. If one feeds in a list in a random order, the first-element pivot selection has a \mathcal{O}(N \log N) expected runtime,5Another way of implementing randomized quicksort is to first randomize the list and then always pick the first entry as the pivot. This is fully equivalent to using quicksort with random pivot selection in the given ordering. Note that randomizing the order of the list before its sorted is still a randomized algorithm because, naturally, randomness is needed to randomize order. but for certain specific orderings (in this case, e.g., the sorted ordering) the runtime is a disappointing \mathcal{O}(N^2). The first-element pivot selection is particularly bad since its nemesis ordering is the common-in-practice already-sorted ordering. But other simple deterministic pivot selections are equally bad. If one selects, for instance, the pivot to be the entry in the position \lfloor N/2 \rfloor, then we can still come up with an ordering of the input list that makes the algorithm run in time \mathcal{O}(N^2). And because the algorithm is deterministic, it runs in \mathcal{O}(N^2) time every time with such-ordered inputs. If the lists we need to sort in our code just happen to be bad for our deterministic pivot selection strategy, quicksort will be slow every time.

We typically analyze algorithms based on their worst-case performance. And this can often be unfair to algorithms. Some algorithms work excellently in practice but are horribly slow on manufactured examples which never occur in “real life”.6The simplex algorithm is an example of algorithm which is often highly effective in practice, but can take a huge amount of time on some pathological cases. But average-case analysis of algorithms, where one measures the average performance of an algorithm over a distribution of inputs, can be equally misleading. If one were swayed by the average-case analysis of the previous section for quicksort with first-element pivot selection, one would say that this should be an effective pivot selection in practice. But sorting an already-sorted or nearly-sorted list occurs all the time in practice: how many times do programmers read in a sorted list from a data source and sort it again just to be safe? In real life, we don’t encounter random inputs to our algorithms: we encounter a very specific distribution of inputs specific to the application we use the algorithm in. An algorithm with excellent average-case runtime analysis is of little use to me if it is consistently and extremely slow every time I run it on my input data on the problem I’m working on. This discussion isn’t meant to disparage average-case analysis (indeed, very often the “random input” model is not too far off), but to explain why worst-case guarantees for algorithms can still be important.

To summarize, often we have a situation where we have an algorithm which makes some choice (e.g. pivot selection). A particular choice usually works well for a randomly chosen input, but can be stymied by certain specific inputs. However, we don’t get to pick which inputs we receive, and it is fully possible the user will always enter inputs which are bad for our algorithms. Here is where randomized algorithms come in. Since we are unable to randomize the input, we instead randomize the algorithm.

A randomized algorithm can be seen as a random selection from a collection of deterministic algorithms. Each individual deterministic algorithm may be confounded by an input, but most algorithms in the collection will do well on any given input. Thus, by picking a random algorithm from our collection, the probability of poor algorithmic performance is small. And if we run our randomized algorithm on an input and it happens to do poorly by chance, if we run it again it is unlikely to do so; there isn’t a specific input we can create which consistently confounds our randomized algorithm.

The Game Theory Framework

Let’s think about algorithm design as a game. The game has two players: you and an opponent. The game is played by solving a certain algorithmic problem, and the game has a score which quantifies how effectively the problem was solved. For example, the score might be the runtime of the algorithm, the amount of space required, or the error of a computed quantity. For simplicity of discussion, let’s use runtime as an example for this discussion. You have to pay your opponent a dollar for every second of runtime, so you want to have the runtime be as low as possible.7In this scenario, we consider algorithms which always produce the correct answer to the problem, and it is only a matter of how long it takes to do so. In the field of algorithms, randomized algorithms of this type are referred to as Las Vegas algorithms. Algorithms which can also give the wrong answer with some (hopefully small) probability are referred to as Monte Carlo algorithms.

Each player makes one move. Your move is to present an algorithm A which solves the problem. Your opponent’s move is to provide an input I to your algorithm. Your algorithm A is then run on your opponents input I and you pay your opponent a dollar for every second of runtime.

This setup casts algorithm design as a two-person, zero-sum game. It is a feature of such games that a player’s optimal strategy is often mixed, picking a move at random subject to some probability distribution over all possible moves.

To see why this is the case, let’s consider a classic and very simple game: rock paper scissors. If I use a deterministic strategy, then I am forced to pick one choice, say rock, and throw it every time. But then my savvy opponent could pick paper and be assured victory. By randomizing my strategy and selecting between rock, paper, and scissors (uniformly) at random, I improve my odds to winning a third of the time, losing a third of the time, and drawing a third of the time. Further, there is no way my opponent can improve their luck by adopting a different strategy. This strategy is referred to as minimax optimal: among all (mixed) strategies I could adopt, this strategy has the best performance over all strategies provided my opponent always counters my strategy with the best response strategy they can find.

Algorithm design is totally analogous. For the pivot selection problem, if I pick a the fixed strategy of choosing the first entry to be the pivot (analogous to always picking rock), then my opponent could always give me a sorted list (analogous to always picking paper) and I would always lose. My randomizing my pivot selection, my opponent could input the list in whatever order they choose and my pivot selection will always have the excellent (expected) \mathcal{O}(N\log N) runtime characteristic of quicksort. In fact, randomized pivot selection is the minimax optimal pivot selection strategy (assuming pivot selection is non-adaptive in that we don’t choose the pivot based on the values in the list).8This is not to say that quicksort with randomized pivot selection is necessarily the minimax optimal sorting algorithm, but to say that once we have fixed quicksort as our sorting algorithm, randomized pivot selection is the minimax optimal non-adaptive pivot selection strategy for quicksort.

How Much Does Randomness Buy?

Hopefully, now, the utility of randomness is less opaque. Randomization, in effect, allows an algorithm designer to trade algorithm which runs fast for most inputs all of the time for an algorithm which runs fast for all inputs most of the time. They do this by introducing randomized decision-making to hedge against particular bad inputs which could confound their algorithm.

Randomness, of course, is not a panacea. Randomness does not allow us to solve every algorithmic problem arbitrarily fast. But how can we quantify this? Are there algorithmic speed limits for computational problems for which no algorithm, randomized or not, can exceed?

The game theoretic framework for randomized algorithms can shed light on this question. Let us return to the framing of last section where you choose an algorithm A, your opponent chooses an input I, and you pay your opponent a dollar for every second of runtime. Since this cost depends on the algorithm and the input, we can denote the cost C(A,I).

Suppose you devise a randomized algorithm for this task, which can be interpreted as selecting an algorithm A from a probability distribution P over the class of all algorithms \mathcal{A} which solve the problem. (Less formally, we assign each possible algorithm a probability of picking it and pick one subject to these probabilities.) Once your opponent sees your randomized algorithm (equivalently, the distribution P), they can come up with the on-average slowest possible input I_{\rm worst} and present it to your algorithm.

But now let’s switch places to see things from your opponent. Suppose they choose their own strategy of randomly selecting an input I from among all inputs \mathcal{I} with some distribution Q. Once you see the distribution Q, you can come up with the best possible deterministic algorithm A_{\rm best} to counter their strategy.

The next part gets a bit algebraic. Suppose now we apply your randomized algorithm against your opponents strategy. Then, your randomized algorithm could only take longer on average than A_{\rm best} because, by construction, A_{\rm best} is the fastest possible algorithm against the input distribution Q. Symbolically, we have

(1)   \begin{equation*} \mathbb{E}_{I\sim Q} \left[ C(A_{\rm best},I) \right] \le \mathbb{E}_{A\sim P} \left[ \mathbb{E}_{I\sim Q} \left[ C(A, I) \right] \right]. \end{equation*}

Here, \mathbb{E}_{I\sim Q} and \mathbb{E}_{A\sim P} denote the average (expected) value of a random quantity when an input I is drawn randomly with distribution Q or an algorithm A is drawn randomly with distribution P. But we know that I_{\rm worst} is the slowest input for our randomized algorithm, so, on average, our randomized algorithm will take longer on worst-case input I_{\rm worst} then a random input from Q. In symbols,

(2)   \begin{equation*} \mathbb{E}_{A\sim P} \left[ \mathbb{E}_{I\sim Q} \left[ C(A, I) \right] \right] \le \mathbb{E}_{A\sim P} \left[ C(A,I_{\rm worst}) \right]. \end{equation*}

Combining Eqs. (1) and (2) gives Yao’s minimax principle9Note that Yao’s minimax principle is a consequence of von Neumann’s minimax theorem in game theory.:

(3)   \begin{equation*} \mathbb{E}_{I\sim Q} \left[ C(A_{\rm best},I) \right] \le \mathbb{E}_{A\sim P} \left[ C(A,I_{\rm worst}) \right]. \end{equation*}

In words, the average performance of any randomized algorithm on its worst-case input can be no better than the average performance of the best possible deterministic algorithm for a distribution of inputs.10In fact, there is a strengthening of Yao’s minimax principle. That Eqs. (1) and (2) are equalities when P and Q are taken to be the minimax optimal randomized algorithm and input distribution, respectively. Specifically, assuming the cost is a natural number and we restrict to a finite class of potential inputs, \max_{\mbox{input distributions } Q} \min_{\mbox{algorithms }A} \mathbb{E}_{I\sim Q} [C(A,I)] =\min_{\mbox{randomized algorithms }P} \max_{\mbox{inputs }I}\mathbb{E}_{A\sim P} \left[ C(A,I) \right]. This nontrivial fact is a consequence of the full power of the von Neumann’s minimax theorem, which itself is a consequence of strong duality in linear programming. My thanks go to Professor Leonard Schulman for teaching me this result.

This, in effect, allows the algorithm analyst seeking to prove “no randomized algorithm can do better than this” to trade randomness in the algorithm to randomness in the input in their analysis. This is a great benefit because randomness in an algorithm can be used in arbitrarily complicated ways, whereas random inputs can be much easier to understand. To prove any randomized algorithm takes at least cost c to solve a problem, the algorithm analyst can find a distribution Q on which every deterministic algorithm takes at least cost c. Note that Yao’s minimax principle is an analytical tool, not an algorithmic tool. Yao’s principle establishes speed limits on the best possible randomized algorithm: it does not imply that one can just use deterministic algorithms and assume or make the input to be random.

There is a fundamental question concerning the power of randomized algorithms not answered by Yao’s principle that is worth considering: how much better can randomized algorithms be than deterministic ones? Could infeasible problems for deterministic computations be solved tractably by randomized algorithms?

Questions such as these are considered in the field of computational complexity theory. In this context, one can think of a problem as tractably solvable if it can be solved in polynomial time—that is, in an amount of time proportional to a polynomial function of the size of the input. Very roughly, we call the class of all such problems to be \mathsf{P}. If one in addition allows randomness, we call this class of problems \mathsf{BPP}.11More precisely, \mathsf{BPP} is the class of problems solvable in polynomial time by a Monte Carlo randomized algorithm. The class of problems solvable in polynomial time by a Las Vegas randomized algorithm, which we’ve focused on for the duration of this article, is a possibly smaller class called \mathsf{ZPP}.

It has widely been conjectured that \mathsf{P} = \mathsf{BPP}: all problems that can be tractably solved with randomness can tractably be solved without. There is some convincing evidence for this belief. Thus, provided this conjecture turns out to be true, randomness can give us reductions in operation counts by a polynomial amount in the input size for problems already in \mathsf{P}, but they cannot efficiently solve \mathsf{NP}-hard computational problems like the traveling salesman problem.12Assuming the also quite believable conjecture that \mathsf{P}\ne\mathsf{NP}.

So let’s return to the question which is also this article’s title: why randomized algorithms? Because randomized algorithms are often faster. Why, intuitively, is this the case? Randomization can us to upgrade simple algorithms that are great for most inputs to randomized algorithms which are great most of the time for all inputs. How much can randomization buy? A randomized algorithm on its worst input can be no better than a deterministic algorithm on a worst-case distribution. Assuming a widely believed and theoretically supported, but not yet proven, conjecture, randomness can’t make intractable problems into tractable ones. Still, there is great empirical evidence that randomness can be an immensely effective algorithm design tool in practice, including computational math and science problems like trace estimation and solving Laplacian linear systems.

The Better Way to Convert an SVD into a Symmetric Eigenvalue Problem

A singular value decomposition of an m\times n matrix B is a factorization of the form B = U\Sigma V^\top, where U and V are square, orthogonal matrices and \Sigma is a diagonal matrix with (i,i)th entry \sigma_i \ge 0.1Everything carries over essentially unchanged for complex-valued matrices B with U and V being unitary matrices and every (\cdot)^\top being replaced by (\cdot)^* for (\cdot)^* the Hermitian transpose. The diagonal entries of \Sigma are referred to as the singular values of B and are conventionally ordered \sigma_{\rm max} = \sigma_1 \ge \sigma_2 \ge \cdots \ge \sigma_{\min(m,n)} = \sigma_{\rm min}. The columns of the matrices U and V are referred to as the right- and left- singular vectors of B and satisfy the relations Bv_i = \sigma_i u_i and B^\top u_i = \sigma_i v_i.

One can obtain the singular values and right and left singular vectors of B from the eigenvalues and eigenvectors of B^\top B and BB^\top. This follows from the calculations B^\top B = V\Sigma^2 V^\top and B^\top B = U\Sigma^2 U^\top. In other words, the nonzero singular values of B are the square roots of the nonzero eigenvalues of B^\top B and BB^\top. If one merely solves one of these problems, computing \Sigma along with U or V, one can obtain the other matrix V or U by computing U = BV \Sigma^{-1} or V = B^\top U \Sigma^{-1}. (These formulas are valid for invertible square matrices B, but similar formulas hold for singular or rectangular B to compute the singular vectors with nonzero singular values.)

This approach is often unundesirable for several reasons. Here are a few I’m aware of:

  1. Accuracy: Roughly speaking, in double-precision arithmetic, accurate stable numerical methods can resolve differences on the order of 16 orders of magnitude. This means an accurately computed SVD of B can resolve the roughly 16 orders of magnitude of decaying singular values, with singular values smaller than that difficult to compute accurately. By computing B^\top B, we square all of our singular values, so resolving 16 orders of magnitude of the eigenvalues of B^\top B means we only resolve 8 orders of magnitude of the singular values of B.2Relatedly, the two-norm condition number \kappa(B) := \sigma_{\rm max}(B) / \sigma_{\rm min}(B) of B^\top B is twice that of B. The dynamic range of our numerical computations has been cut in half!
  2. Loss of orthogonality: While U = BV \Sigma^{-1} and V = B^\top U \Sigma^{-1} are valid formulas in exact arithmetic, they fair poorly when implemented numerically. Specifically, the numerically computed values U_{\rm numerical} and V_{\rm numerical} may not be orthogonal matrices with, for example, U_{\rm numerical}^\top U_{\rm numerical} not even close to the identity matrix. One can, of course, orthogonalize the computed U or V, but this doesn’t fix the underlying problem that U or V have not been computed accurately.
  3. Loss of structure: If B possesses additional structure (e.g. sparsity), this structure may be lost or reduced by computing the product B^\top B.
  4. Nonlinearity: Even if we’re not actually computing the SVD numerically but doing analysis with pencil and paper, finding the SVD of B from B^\top B has the disadvantage of performing a nonlinear transformation on B. This prevents us from utilizing additive perturbation theorems for sums of symmetric matrices in our analysis.3For instance, one cannot prove Weyl’s perturbation theorem for singular values by considering B^\top B and applying Weyl’s perturbation theorem for symmetric eigenvalues.

There are times where these problems are insignificant and this approach is sensible: we shall return to this point in a bit. However, these problems should disqualify this approach from being the de facto way we reduce SVD computation to a symmetric eigenvalue problem. This is especially true since we have a better way.

The better way is by constructing the so-called Hermitian dilation4As Stewart and Sun detail in Section 4 of Chapter 1 of their monograph Matrix Perturbation Theory, the connections between the Hermitian dilation and the SVD go back to the discovery of the SVD itself, as it is used in Jordan’s construction of the SVD in 1874. (The SVD was also independently discovered by Beltrami the year previous.) Stewart and Sun refer to this matrix as the Jordan-Wiedlant matrix associated with B, as they attribute the widespread use of the matrix today to the work of Wiedlant. We shall stick to the term Hermitian dilation to refer to this matrix. of B, which is defined to be the matrix

(1)   \begin{equation*} \mathcal{H}(B) = \begin{bmatrix} 0 & B \\ B^\top & 0 \end{bmatrix}. \end{equation*}

One can show that the nonzero eigenvalues of \mathcal{H}(B) are precisely plus-or-minus the singular values of B. More specifically, we have

(2)   \begin{equation*} \mathcal{H}(B) \begin{bmatrix} u_i \\ \pm v_i \end{bmatrix} = \pm \sigma_i \begin{bmatrix} u_i \\ \pm v_i \end{bmatrix}. \end{equation*}

All of the remaining eigenvalues of \mathcal{H}(B) not of this form are zero.5This follows by noting \operatorname{rank}(\mathcal{H}(B)) = 2\operatorname{rank}(B) and thus \pm \sigma_i for i = 1,2,\ldots,\operatorname{rank}(B) account for all the nonzero eigenvalues of \mathcal{H}(B). Thus, the singular value decomposition of B is entirely encoded in the eigenvalue decomposition of \mathcal{H}(B).

This approach of using the Hermitian dilation \mathcal{H}(B) to compute the SVD of B fixes all the issues identified with the “B^\top B” approach. We are able to accurately resolve a full 16 orders of magnitude of singular values. The computed singular vectors are accurate and numerically orthogonal provided we use an accurate method for the symmetric eigenvalue problem. The Hermitian dilation \mathcal{H}(B) preserves important structural characteristics in B like sparsity. For purposes of theoretical analysis, the mapping B \mapsto \mathcal{H}(B) is linear.6The linearity of the Hermitian dilation gives direct extensions of most results about the symmetric eigenvalues to singular values; see Exercise 22.

Often one can work with the Hermitian dilation only implicitly: the matrix \mathcal{H}(B) need not actually be stored in memory with all its extra zeros. The programmer designs and implements an algorithm with \mathcal{H}(B) in mind, but deals with the matrix B directly for their computations. In a pinch, however, forming \mathcal{H}(B) directly in software and utilizing symmetric eigenvalue routines directly is often not too much less efficient than a dedicated SVD routine and can cut down on programmer effort significantly.

As with all things in life, there’s no free lunch here. There are a couple of downsides to the Hermitian dilation approach. First, \mathcal{H}(B) is, except for the trivial case B = 0, an indefinite symmetric matrix. By constast, B^\top B and BB^\top are positive semidefinite, which can be helpful in some contexts.7This is relevant if, say, we want to find the small singular values by inverse iteration. Positive definite linear systems are easier to solve by either direct or iterative methods. Further, if n\ll m (respectively, m \ll n), then B^\top B (respectively, BB^\top) is tiny compared to \mathcal{H}(B), so it might be considerably cheaper to compute an eigenvalue decomposition of B^\top B (or BB^\top) than \mathcal{H}(B).

Despite the somewhat salacious title of this article, the B^\top B and Hermitian dilation approaches both have their role, and the purpose of this article is not to say the B^\top B approach should be thrown in the dustbin. However, in my experience, I frequently hear the B^\top B approach stated as the definitive way of converting an SVD into an eigenvalue problem, with the Hermitian dilation approach not even mentioned. This, in my opinion, is backwards. For accuracy reasons alone, the Hermitian dilation should be the go-to tool for turning SVDs into symmetric eigenvalue problems, with the B^\top B approach only used when the problem is known to have singular values which don’t span many orders of magnitude or B is tall and skinny and the computational cost savings of the B^\top B approach are vital.