The real polynomial eigenvalue problem is well conditioned on the average

We study the average condition number for polynomial eigenvalues of collections of matrices drawn from various random matrix ensembles. In particular, we prove that polynomial eigenvalue problems defined by matrices with Gaussian entries are very well-conditioned on the average.


Introduction
Following the ideas in [13,2], we note that many different numerical problems can be described within the following simple general framework. We consider a space of inputs and a space of outputs denoted by I and O respectively, and some equation of the form ev(i, o) = 0 stating when an output is a solution for a given input. Both One can force some of the matrices to be symmetric, a particularly important case in applications, or consider other structured problems, see [12,6,9,14]. In cases d = 1 and d = 2 polynomial eigenvalues are often referred to as generalized eigenvalues and quadratic eigenvalues respectively.
In this paper we prove a general theorem computing exactly the expected value of the condition number in a wide collection of problems, including problem 4 above.
We start by recalling the general geometric definition of the condition number, which is usually thought of as "a measure of the sensibility of the solution o under an infinitesimal perturbation of the input i". A Finsler structure on a differentiable manifold M is a smooth field of norms · p : T p M → R, p ∈ M on M (see [2, p. 223] for more details). In particular, a Riemannian structure ·, · on M defines a Finsler structure on it by ṗ p = ṗ,ṗ p , p ∈ M ,ṗ ∈ T p M .
where p 1 : V → I, p 2 : V → O are the projections and · op is the operator norm. For points (i, o) ∈ V not satisfying the above assumptions the condition number is set to ∞.
See [4, Sec. 14.1] for more on this geometric approach to the condition number.
Remark 1. Definition 1 is intrinsic in I, i.e., changing I to some subvariety I ⊂ I leads (in general) to different, smaller, value of the condition number, since perturbations of the input are only allowed in the direction of the tangent space to the input set. Note also that the condition number depends on choices of Finsler structures on I and O.
Example: The classical Turing's condition number µ(A) = A op A −1 op for matrix inversion corresponds to the following setting: is the set of n × n real matrices endowed with the Finsler structure associated to relative errors in operator norm: In the PEVP the input space I is endowed with the following Riemannian structure: where A = (A 0 , . . . , A d ), (α, β) ∈ R 2 is a polynomial eigenvalue of A, r and are the corresponding right and left eigenvectors and A given tuple A can have up to nd real isolated polynomial eigenvalues. We define the condition number of A simply as the sum of the condition numbers over all these PEVs: (If A = (A 0 , . . . , A d ) has infinitely many polynomial eigenvalues, then we set µ(A) = ∞).
The most important result in this paper is a very general theorem which is designed to provide exact formulas for the expected value of the condition number in the PEVP and other problems. A simple particular case of our general theorem is as follows.
In Corollary 3 we provide an analogous formula in the case when A 0 , . . . , A d are independent GOE(n)-distributed matrices.

Remark 2.
Recently in [1] Armentano and the first author of the current article investigated the expectation of the squared condition number for polynomial eigenvalues of complex Gaussian matrices. Theorem 1 establishes the "asymptotic square root law" for the considered problem, i.e., when n → +∞ (and up to the factor π/2) our answer in (1) equals the square root of the answer in [1].
In Section 1 we state our main results, of which Theorem 1 is an easy consequence. Their proofs are given in Section 3 and in Section 4, some technical results are left for the Appendix.

Main results
In this section we state our most general result, from which Theorem 1 will follow. First, let us fix a general framework which analyzes the input-output problems described above in a semialgebraic context. For the rest of this paper the input and the output sets will be, respectively, the real vector space I = R m and the unit circle S 1 ⊂ R 2 endowed with the standard Riemannian structures. The solution variety will be a semialgebraic set S ⊂ R m × S 1 ⊂ R m × R 2 (we change letter from V to S to remark the fact that it is semialgebraic). We denote by S top the union of top-dimensional (smooth) strata of S (see Section 2 for details). Then the smooth manifold S top ⊂ R m × S 1 is endowed with the induced Riemannian structure. The two projections defined on S are denoted by Definition 2 (Condition number in the semialgebraic setting). Near a regular point (a, x) ∈ S top the first projection p 1 : S top → R m is locally invertible, i.e., there exists a neighbourhood U ⊂ R m of a ∈ U and a unique smooth map p −1 In this case the local relative condition number µ(a, x) is defined as The relative condition number µ(a) of a ∈ R m is defined to be the sum of all local relative condition numbers µ(a, x): Remark 3. Note that Definition 2 agrees with Definition 1 if we endow the input space I = R m with the Riemannian structure associated to relative errors, that is ȧ,ḃ a = (ḃ tȧ )/ a 2 , a ∈ R m .
To simplify terminology, throughout the rest of the paper, we omit the word "relative" when refering to (local) relative condition number.
We deal with a large class of semialgebraic subsets of R m × S 1 that we define next.
Definition 3. We say that the semialgebraic set S ⊂ R m × S 1 is non-degenerate if the following conditions are satisfied: In Proposition 1 we show that this condition is equivalent to the following one: 2 . there exists a semialgebraic subset B ⊂ R m of dimension at most m − 2 such that for any a / ∈ B the fiber p −1 1 (a) is finite.
The first condition in Definition 3 implies that S is m-dimensional (see Lemma 1). To perform our probabilistic study we take the input variables a = (a 1 , . . . , a m ) ∈ R m to be independent standard gaussians: a ∼ N (0, 1). In the following theorem we establish a general formula for the expectation of the condition number µ(a) of a randomly chosen a ∈ R m : If, moreover, S is scale-invariant with respect to the first m variables, i.e., (a, x) ∈ S if and only if (ta, x) ∈ S for any t > 0, then The following form of Theorem 2 for sets in R m × RP 1 better fits our purposes.
Corollary 1. Let S ⊂ R m × S 1 be a non-degenerate semialgebraic set that is scaleinvariant with respect to the first m variables and suppose that S is invariant under the map (a, Note that Corollary 1 is just a "projective" version of the second part of Theorem 2.
As pointed out in the introduction, we are specifically interested in the polynomial eigenvalue problem.
The space M (n, R) of n × n real matrices is endowed with the Frobenius inner product and the associated norm: Then a k-dimensional vector subspace V ⊂ M (n, R) is endowed with the standard normal probability distribution N V : where dv is the Lebesgue measure on (V, (·, ·)) and U ⊂ V is a measurable subset. Let us also denote by As proved in [7], in the case V = M (n, R) this definition for µ(A, x) is equivalent to ().
In the following theorem we investigate the expected condition number for polynomial Poincaré formula [10, (3-5)] allows to derive the following universal upper bound.
In case V = M (n, R) of all square matrices we provide an explicit formula for the expected condition number, that is the claim of our Theorem 1 above.
We give an explicit answer also in the case V = Sym(n, R) of symmetric matrices. In this case the probability space (Sym(n, R), N Sym(n,R) ) is usually referred to as Gaussian Orthogonal Ensemble (GOE).
Corollary 3. If A 0 , . . . , A d ∈ Sym(n, R) are independent GOE(n)-matrices and n is even, then If n is odd the explicit formula is more complicated and is given in the proof of the corollary. However the above asymptotic formula is valid for both even and odd n.

Preliminaries
Below we state few classical results in semialgebraic geometry that we will use, the proofs can be found in [3,5]. Given a semialgebraic set S ⊂ R N of dimension k ≤ N we fix a semialgebraic stratification of S, i.e., a partition of S into finitely many semialgebraic subsets (called strata) such that each stratum is a smooth submanifold of R N and the boundary of any stratum of dimension i ≤ N is a union of some strata of dimension less than i. We denote by S top the union of all k-dimensional strata of S and by S low = S \ S top the union of the strata of dimension less than k. The sets S top , S low ⊂ R N are semialgebraic and S top is a smooth k-dimensional submanifold of R N .
One of the central results about semialgebraic mappings is Hardt's theorem.
Theorem 4 (Hardt's semialgebraic triviality). Let S ⊂ R N be a semialgebraic set and let f : S → R M be a continuous semialgebraic mapping. Then there exists a finite partition of R M into semialgebraic sets C 1 , . . . , C r ⊂ R M such that f is semialgebraically trivial over each C i , i.e., there are a semialgebraic set F i and a semialgebraic homeomorphism The following corollary of Hardt's theorem is frequently used to estimate dimension of semialgebraic sets.
Corollary 4. Let f : S → R M be as above. Then the set {x ∈ R N : dim(f −1 (x)) = d} is semialgebraic and has dimension not greater than dim(S) − d.

Proof of main results
In this section we prove our main results, Theorems 2 and 3. Let us first fix some notations that are used in the rest of the paper: for a non-degenerate subset S ⊂ R m × S 1 by Σ 1 , Σ 2 ⊂ S top we denote the semialgebraic sets of critical points of p 1 : S top → R m and p 2 : S top → S 1 respectively, the corresponding semialgebraic sets of critical values are denoted by σ 1 = p 1 (Σ 1 ) ⊂ R m and σ 2 = p 2 (Σ 2 ) ⊂ S 1 .

Proof of Theorem 2
In this subsection S denotes a non-degenerate semialgebraic subset of R m × S 1 . For the proof of Theorem 2 we need few technical lemmas which we state and prove below. Proof. Since S is non-degenerate, for every x ∈ S 1 the fiber p −1 2 (x) is (m−1)-dimensional. From Theorem 4 it follows that for some x ∈ S 1 we have dim(S) = dim(p −1 2 (x)) + dim(S 1 ) = (m − 1) + 1 = m.
The map p 1 : S top → R m has a regular point (a, x) ∈ S top \Σ 1 since S is m-dimensional and the set Σ 1 of critical points of p 1 is at most (m − 1)-dimensional. The image p 1 (U ) of a small open neighbourhood U ⊂ S top \ Σ 1 of (a, x) ∈ U is open in R m and hence dim(p 1 (S)) = m.
is discrete, which together with the non-degeneracy of S and Theoren 4 implies dim(p −1

Lemma 3. There exists an open semialgebraic subset
Proof. Since S is non-degenerate every fiber p −1 2 (x), x ∈ S 1 is (m − 1)-dimensional. Note that the set S 1 \ p 2 (S top ) is semialgebraic and zero-dimensional, thus finite. Indeed, if it was one-dimensional Theorem 4 together with dim(p −1 2 (x)) = m − 1, x ∈ S 1 would imply that p −1 2 (S 1 \ p 2 (S top )) ⊂ S \ S top is m-dimensional which would contradict to dim(S \ S top ) ≤ m − 1.
The semialgebraic set σ 2 = p 2 (Σ 2 ) ⊂ S 1 of critical values of p 2 : S top → S 1 has measure zero by Sard's theorem. Hence σ 2 ⊂ S 1 consists of a finite number of points.
Set now R := S top \ p −1 2 (σ 2 ∪ C). Note that R is an open semialgebraic subset of S top and S 1 \ p 2 (R) = σ 2 ∪ C ∪ (S 1 \ p 2 (S top )) is finite by the above arguments. Since R consists of regular points of p 2 : S top → S 1 the map p 2 : R → p 2 (R) is a submersion. Since dim(S low ) ≤ m − 1 and p −1 where we used that M = p −1 1 (p 1 (M )) (Lemma 2) to be able to sum over the whole fiber Thus we extend the integrations in (3.1) over S and p 1 (S) respectively without changing the result. Moreover the integration over p 1 (S) can be further extended to the whole space R m since for a point a ∈ R m \ p 1 (S) the summation x∈S 1 :(a,x)∈S f (a, x) is performed over the empty set p −1 1 (a) in which case the sum is conventionally set to 0. All together the above arguments imply Let R ⊂ S top be as in Lemma 3. Applying the smooth coarea formula [10, (A-2)] to the measurable function N Jp 1 N Jp 2 f : R → [0, +∞) and to the submersion p 2 : R → p 2 (R) we obtain By Lemma 3 dim(S \ R) ≤ m − 1, S 1 \ p 2 (R) is finite, and dim(p −1 2 (x) \ R) ≤ m − 2 for x ∈ p 2 (R). Thus the integrations in (3.1) can be extended over S, S 1 and p −1 2 (x) respectively leading to Combining (3.1) with (3.1) we finish the proof.
Now comes the proof of Theorem 2.
Proof of Theorem 2. The following identity is the key point of the proof: where M ⊂ S top and R ⊂ S top are as in Lemma 2 and Lemma 3 respectively and µ(a, x), the local condition number of (a, x) ∈ S, is defined in Definition 2. The proof of the identity comes after we derive the statement of Theorem 2.

Proof of Theorem 3
For a k-dimensional vector subspace V ⊂ M (n, R) and for a basis f = (f 0 (α, β), . . . , f d (α, β)) of the space P d,2 of binary forms of degree d ≥ 1 let us define the algebraic variety Theorem 3 follows from the following more general result.

Applications of main results
In this section we derive Theorem 1 and Corollaries 2, 3.
In case of any particular space V ⊂ M (n, R) satisfying dim(Σ V ) = k − 1 = dim(V ) − 1 by Theorem 3 explicit computation of the expected condition number for polynomial eigenvalues amounts to computing the volume of the hypersurface Σ V ∩ S k−1 . In cases V = M (n, R) and V = Sym(n, R) formulas for the volume of Σ V ∩ S k−1 were found in [8] and [11] respectively. where the asymptotic is obtained using formula (1) from [15].
The following elementary lemma is frequently used throughout Section 3.
Lemma 5. If X ⊂ (R m , · ) is a scale-invariant semialgebraic variety of dimension p ≤ m and q > 0, then