## Abstract

Consider the problem of minimizing a quadratic objective subject to quadratic equations. We study the semialgebraic region of objective functions for which this problem is solved by its semidefinite relaxation. For the Euclidean distance problem, this is a bundle of spectrahedral shadows surrounding the given variety. We characterize the algebraic boundary of this region and we derive a formula for its degree.

## Introduction

We study a family of *quadratic optimization* problems with varying cost function:

where \(\mathbf{f} = (f_1,\ldots ,f_m)\) is a fixed tuple of elements in the space \({\mathbb {R}}[x]_{\le 2} \simeq {\mathbb {R}}^{\left( {\begin{array}{c}n+2\\ 2\end{array}}\right) }\) of polynomials of degree two in \(x = (x_1,\ldots ,x_n)\). Even though problem (1) is hard, there is a hierarchy of tractable *semidefinite programming* (SDP) relaxations, known as the Lasserre hierarchy [1, 13, 14]. In this paper we focus on the *Shor relaxation* [19], which is the first level of the hierarchy. We are interested in the set defined by the Shor relaxation:

We call \({\mathcal {R}}_\mathbf{f}\) the *SDP-exact region* of the tuple \(\,\mathbf{f} = (f_1,\ldots ,f_m)\). We will slightly change this definition in Sect. 3 by further imposing strict complementarity. This will lead to an explicit description of \({\mathcal {R}}_\mathbf{f}\) as a semialgebraic set in \({\mathbb {R}}[x]_{\le 2}\simeq {\mathbb {R}}^{\left( {\begin{array}{c}n+2\\ 2\end{array}}\right) }\). We refer to Definition 3.2.

The quadratic cost function that motivated this article is the squared distance to a given point \(u \in {\mathbb {R}}^n\). In symbols, \(\,g_u(x) = || x - u ||^2\). Here (1) is the *Euclidean Distance* (ED) problem (cf. [6]) for the variety \(\,V_\mathbf{f} = \{ x \in {\mathbb {R}}^n \,: \,f_1(x) = \cdots = f_m(x) = 0 \}\). By restricting \({\mathcal {R}}_\mathbf{f}\) to the space of cost functions \(g_u\), we obtain a semialgebraic set in \({\mathbb {R}}^n\). This is the SDP-exact region for the ED problem, denoted \({\mathcal {R}}_\mathbf{f}^{ ed}\), which was investigated in [3].

### Example 1.1

(ED problem for \(m=n=2\)) The variety \(V_\mathbf{f}\) consists of four points in \({\mathbb {R}}^2\). We seek the point in \(V_\mathbf{f}\) that is closest to a given point \(u = (u_1,u_2)\). The *Voronoi decomposition* of \({\mathbb {R}}^2\) characterizes the solution. The SDP-exact region \({\mathcal {R}}^{ed}_\mathbf{f}\) consists of four disjoint convex sets, one for each point in \(V_\mathbf{f}\). The convex sets are bounded by conics, and are contained in the Voronoi cells of the points. Figure 1 illustrates \({\mathcal {R}}^{ed}_\mathbf{f}\) for two configuration of points in \({\mathbb {R}}^2\): the cells on the left are bounded by ellipses, and on the right by hyperbolas. Note that in both cases the conics touch pairwise at the bisector lines (cf. Theorem 4.5).

Our second example is the Max-Cut Problem from discrete optimization. The SDP relaxation of this problem has been the subject of several papers; see, e.g., [8, 11, 12].

### Example 1.2

(Max-Cut Problem) Let \(m=n\) and \(f_i(x) = x_i^2-1\), so \(V_\mathbf{f} = \{-1,+1\}^n\) is the vertex set of the *n*-cube. We seek a maximal cut in the complete graph \(K_n\) where the edge \(\{i,j\}\) has weight \(c_{ij}\). In (1) we take \(g(x) = \sum _{i,j} c_{ij} x_i x_j\) where \(C= (c_{ij})\) is a symmetric \(n \times n\) matrix with \(c_{11} = \cdots = c_{nn} = 0\). Note that these objective functions live in a subspace of dimension \({\left( {\begin{array}{c}n\\ 2\end{array}}\right) }\) in \({\mathbb {R}}[x]_{\le 2}\). The dual solution in the SDP relaxation is the *Laplacian*

The SDP-exact region \({\mathcal {R}}_\mathbf{f}\) consists of \(2^{n-1}\) spectrahedral cones in \({\mathbb {R}}^{\left( {\begin{array}{c}n\\ 2\end{array}}\right) }\), each isomorphic to the set of matrices \(C = (c_{ij})\) such that \({\mathcal {L}}(C)\) is positive semidefinite. The boundary of this spectrahedron is given by a polynomial of degree \(n-1\), namely the determinant of any \((n-1) \times (n-1)\) principal minor of \({\mathcal {L}}(C)\). By the *Matrix Tree Theorem*, the expansion of this determinant is the sum of \(n^{n-2}\) monomials in the \(c_{ij}\), one for each spanning tree of \(K_n\). Hence the algebraic boundary of \({\mathcal {R}}_\mathbf{f}\) is a (reducible) hypersurface of degree \((n-1)2^{n-1}\).

The Max-Cut Problem for \(n=3\) asks to minimize the inner product with \(C = (c_{12},c_{13},c_{23})\) over \({\mathcal {T}} = \bigl \{(1,1,1), \,(1,-1,-1), \,(-1,1,-1), \,(-1,-1,1) \bigr \}\). The feasible region of the SDP relaxation is the *elliptope* on the left in Fig. 2. It strictly contains the tetrahedron \(\mathrm{conv}({\mathcal {T}})\). The region \({\mathcal {R}}_\mathbf{f}\) is the set of directions *C* whose minimum over the elliptope is attained in \({\mathcal {T}}\). It consists of the four circular cones over the facets of the dual of the elliptope. That dual body is shown in green in Fig. 2, next to the yellow elliptope. Thus \({\mathcal {R}}_\mathbf{f}\) corresponds to the union of the four circular facets of the dual elliptope. These four circles touch pairwise, just like the four ellipses in Fig. 1. The algebraic boundary of \({\mathcal {R}}_\mathbf{f}\) has degree \(8 = (3-1) 2^{3-1}\).

The present paper is a sequel to [3], where the SDP-exact region for the ED problem was shown to be full-dimensional in \({\mathbb {R}}^n\). We undertake a detailed study of \({\mathcal {R}}_\mathbf{f}\) and its topological boundary \(\partial {\mathcal {R}}_\mathbf{f}\). We define the *algebraic boundary*\(\partial _{\mathrm{alg}} {\mathcal {R}}_\mathbf{f}\) to be the Zariski closure of \(\partial {\mathcal {R}}_\mathbf{f}\). Our aim is to find the polynomial defining this hypersurface, or at least to find its degree. This degree is an intrinsic measure for the geometric complexity of the SDP-exact region.

The material that follows is organized into five sections. In Sect. 2 we introduce the *rank-one region* of a general semidefinite programming problem. Building on the theory developed in [17], we compute the degree of the algebraic boundary of this semialgebraic set.

In Sect. 3 we turn to the quadratic program (1). We introduce its SDP relaxation, and show that \({\mathcal {R}}_\mathbf{f}\) coincides with the rank-one region of that relaxation. In Theorem 3.5 we determine the degree of \(\partial _{\mathrm{alg}} {\mathcal {R}}_\mathbf{f}\) under the assumption that \(f_1,\ldots ,f_m\) are generic. That degree is strictly smaller than the corresponding degree for SDP, which appears in Theorem 2.6.

Section 4 concerns the Euclidean distance problem and the case when the cost function *g* is linear. Theorem 4.1 represents their SDP-exact regions in \({\mathbb {R}}^n\) as bundles of spectrahedral shadows. Each shadow lies in the normal space at a point on \(V_\mathbf{f}\), and is the linear image of a *master spectrahedron* that depends only on \(\mathbf{f}\). For linear *g*, the region \({\mathcal {R}}^{ lin}_\mathbf{f}\) is determined by the *theta body* of Gouveia et al. [9]; see Proposition 4.7. For the ED problem, \({\mathcal {R}}^{ ed}_\mathbf{f}\) is a tubular neighborhood of the variety \(V_\mathbf{f}\). Figure 1 showed this when \(V_\mathbf{f}\) consists of four points in \({\mathbb {R}}^2\). Analogs in \({\mathbb {R}}^3\) are depicted in Figs. 4, 8, 9 (for points) and Figs. 5, 6 (for curves).

In Sect. 5 we study the algebraic geometry of the SPD-exact region of the ED problem. Theorem 5.6 gives the degree of the algebraic boundary \(\,\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f}\) when \(V_\mathbf{f}\) is a generic complete intersection. It rests on representing our bundle as a Segre product and projecting it into the ambient space of \(V_\mathbf{f}\). The abelian surface in Example 5.2 serves as a nice illustration.

Section 6 addresses the ED problem when \(\mathbf{f}\) is not a complete intersection. Algorithm 1 shows how to compute the SDP-exact region. Several examples demonstrate what can happen. The dual elliptope on the right of Fig. 2 reappears in five copies in Fig. 9.

## The rank-one region in semidefinite programming

Consider a family of semidefinite programming problems with varying cost function:

Here \(\,{\mathcal {C}}\bullet X = {{\,\mathrm{trace}\,}}({\mathcal {C}}X )\,\) is the usual inner product on the space \({\mathcal {S}}^{d} \simeq {\mathbb {R}}^{\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }\) of symmetric \(d \times d\) matrices. The numbers \(b_1,\ldots ,b_l \in {\mathbb {R}}\) and the matrices \({\mathcal {A}}_1,\ldots ,{\mathcal {A}}_l \in {\mathcal {S}}^{d}\) are fixed in (2), whereas the cost matrix \({\mathcal {C}}\) varies freely over \({\mathcal {S}}^d\). The rank-one region \({\mathcal {R}}_{{\mathcal {A}},b}\) is a semialgebraic subset of \({\mathcal {S}}^d\) that depends on \({\mathcal {A}}= ({\mathcal {A}}_1,\ldots ,{\mathcal {A}}_l)\) and \(b= (b_1,\ldots ,b_l)\). It consists of all matrices \({\mathcal {C}}\) such that (2) has a rank-one solution and strict complementarity holds. See Definition 2.2 below. In this section we study the rank-one region \({\mathcal {R}}_{{\mathcal {A}},b}\) and its boundary. The methods introduced here will be later used in Sect. 3 to study the SDP-exact region \({\mathcal {R}}_\mathbf{f}\).

The feasible set of (2) is the spectrahedron \( \Sigma _{{\mathcal {A}},b} = \bigl \{X {\in } {\mathcal {S}}^{d} : X{\succeq } 0,\, {\mathcal {A}}_i {\bullet } X = b_i \text { for }1\le i\le l \bigr \} \). We assume that \(\Sigma _{{\mathcal {A}},b}\) is non-empty and does not contain the zero matrix. Then the region \({\mathcal {R}}_{{\mathcal {A}}, b}\) is the union of all normal cones at extreme points of rank one in the boundary of \(\Sigma _{{\mathcal {A}},b}\).

### Example 2.1

(\(d=l=3\)) The convex bodies in Fig. 2 arise for Max-Cut with \(n=3\) in Example 1.2. The spectrahedron \(\Sigma _{{\mathcal {A}},b}\) on the left is the elliptope. It is bounded by *Cayley’s cubic surface*. The four nodes are the rank-one points in \(\partial \Sigma _{{\mathcal {A}},b}\). The dual convex body, shown on the right, is bounded by the *quartic Steiner surface* and it has four circular facets. The rank-one region \({\mathcal {R}}_{{\mathcal {A}},b}\) is given by the interiors of these four circles, viewed as cones in \({\mathcal {S}}^3\).

The semidefinite program that is dual to (2) has the form:

The following *critical equations* express the complementary slackness condition that links the optimal solution \(X \succeq 0\) of the primal (2) and the optimal solution \(Y \succeq 0\) of the dual (3):

Recall that *strict complementarity* holds if \({{\,\mathrm{rank}\,}}(X) \!+\! {{\,\mathrm{rank}\,}}(Y) \!=\! d\). The rank-one region is the semialgebraic set given by the critical equations and strict complementarity, as follows:

### Definition 2.2

The *rank-one region*\({\mathcal {R}}_{{\mathcal {A}},b}\) is the set of all \(\,{\mathcal {C}}\in {\mathcal {S}}^{d}\) for which there exist \(\lambda \in {\mathbb {R}}^l\) and \(X,Y\in {\mathcal {S}}^{d}\) such that \(\,X , Y\succeq 0\), \(\, {{\,\mathrm{rank}\,}}(X)= 1 \), \(\, {{\,\mathrm{rank}\,}}(Y)= d-1\,\) and (4) holds.

### Remark 2.3

The above construction can be extended to define the *rank-r region* for other values of *r*. It is an interesting open problem to investigate the geometry of these regions.

The results that follow hold for *generic* instances of the matrices \({\mathcal {A}}_i\) and the vector *b*. This implies that the results hold for “almost all” instances of \(({\mathcal {A}}, b)\), i.e., outside a set of Lebesgue measure zero. More precisely, a property holds generically if there is a polynomial *f* in the entries of \({\mathcal {A}}\) and *b* such that it holds whenever this polynomial does not vanish.

Genericity was also a standing assumption in the derivation of the *algebraic degree of semidefinite programming* by Nie et al. [17, §2]. That degree, denoted \(\delta (l,d,r)\), is the number of complex solutions (*X*, *Y*) of the critical equations (4) for the SDP (2), with *l* constraints for \(d \times d\) matrices, assuming that \(\mathrm{rank}(X) = d-r\) and \(\mathrm{rank}(Y) = r\). A formula for general *r* was given in [7]. The easier case \(r=d-1\) appeared in [17, Theorem 11]:

### Proposition 2.4

The algebraic degree of rank-one solutions *X* to the SDP in (2) equals

The following geometric formulation of SDP was proposed in [17, Eqn. (4.1)]. Let \({\mathcal {V}}\) be the \((l-1)\)-dimensional subspace of \({\mathcal {S}}^d\) spanned by \(\{{\mathcal {A}}_2,\ldots ,{\mathcal {A}}_l\}\), and let \({\mathcal {U}}\) be the \((l+1)\)-dimensional subspace of \({\mathcal {S}}^d\) spanned by \(\{{\mathcal {C}},{\mathcal {A}}_1\}\) and \({\mathcal {V}}\). This specifies a dual pair of flags

See [17, Eqn. (3.3)]. The critical equations (4) can now be written as

The SDP problem (2) is equivalent to solving (6) subject to \(X , Y \succeq 0\). The algebraic degree \(\delta (l,d,r)\) is the number of complex solutions to (6) with \(\mathrm{rank}(X) = d-r\) and \(\mathrm{rank}(Y) = r\). The dual pair of flags in (5) will also play a critical role in our derivation of the degree of the boundary of the rank-one region.

### Remark 2.5

If the matrices \({\mathcal {A}}_i\) and the scalars \(b_i\) are generic then strict complementarity always holds [17, Corollary 8], and hence the following conditions are equivalent:

The primal SDP problem (2) has a unique optimal matrix

*X*of rank 1.The dual SDP problem (3) has an optimal matrix

*Y*of rank \(d-1\).The system (6) has a solution (

*X*,*Y*) with \({{\,\mathrm{rank}\,}}(X) = 1\) and \(X,Y \succeq 0\).

These conditions characterize the set of cost matrices \(\,{\mathcal {C}}\) that lie in the rank-one region \({\mathcal {R}}_{{\mathcal {A}},b}\).

Suppose that the rank-one region \({\mathcal {R}}_{{\mathcal {A}},b}\) is non-empty. The topological boundary \(\partial {\mathcal {R}}_{{\mathcal {A}},b} \) is a closed semialgebraic set of pure codimension one in \({\mathcal {S}}^{d}\). Its Zariski closure \(\partial _{\mathrm{alg}} {\mathcal {R}}_{{\mathcal {A}},b} \) is an algebraic hypersurface, called the *rank-one boundary*. We view this hypersurface either in the complex affine space \({\mathbb {C}}^{\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }\), or in the corresponding projective space \({\mathbb {P}}( {\mathcal {S}}^d) \simeq {\mathbb {P}}^{\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) -1}\). By construction, the polynomial defining \(\partial _{\mathrm{alg}} {\mathcal {R}}_{{\mathcal {A}},b}\) has coefficients in the field generated by the entries of \({\mathcal {A}}\) and *b* over \({\mathbb {Q}}\). The *rank-one boundary degree* is the degree of this polynomial:

Our main result in this section furnishes a formula for the degree of the rank-one boundary.

### Theorem 2.6

Let \( 3 \le l \le d\) and consider the SDP with generic \({\mathcal {A}}\) and *b*, as given in (2). The degree of the hypersurface \(\partial _{\mathrm{alg}} {\mathcal {R}}_{{\mathcal {A}},b}\) that bounds the rank-one region \({\mathcal {R}}_{{\mathcal {A}},b}\) equals

Table 1 illustrates Proposition 2.4 and Theorem 2.6. It shows the algebraic degrees of rank-one SDP on the top, and corresponding rank-one boundary degrees on the bottom. The entry for \(l=d=3\) equals \(8 = 2+2+2+2\), as argued in Example 2.1 and seen in Fig. 2. The first row (\(l=2\)) is not covered by Theorem 2.6. This case requires special consideration.

### Proposition 2.7

If \(\,l=2\) then the rank-one region \({\mathcal {R}}_{{\mathcal {A}},b}\) is dense in the matrix space \({\mathcal {S}}^d\). If \({\mathcal {A}}, b\) are generic then \(\partial {\mathcal {R}}_{{\mathcal {A}},b} = {\mathcal {S}}^d \backslash {\mathcal {R}}_{{\mathcal {A}},b}\) is a hypersurface of degree \(\beta (2,d) = \left( {\begin{array}{c}d+1\\ 3\end{array}}\right) \).

### Proof

The semialgebraic set \({\mathcal {R}}_{{\mathcal {A}},b}\) is dense in the classical topology on \({\mathcal {S}}^d\) because the *Pataki range* [17, §3] consists of a single rank for \(l=2\). This means that, for almost all cost matrices \({\mathcal {C}}\), there is an optimal pair (*X*, *Y*) that satisfies \(\mathrm{rank}(X)=1\) and \(\mathrm{rank}(Y) = d-1\). The boundary \(\partial {\mathcal {R}}_{{\mathcal {A}},b}\) is the set of \({\mathcal {C}}\) such that the optimal matrix \(Y = {\mathcal {C}}- \lambda _1 {\mathcal {A}}_1 - \lambda _2 {\mathcal {A}}_2\) has rank \(\le d-2\). The polynomial in \({\mathcal {A}}_1,{\mathcal {A}}_2,{\mathcal {C}}\) that defines this hypersurface is the *Chow form* of the determinantal variety \(\{\mathrm{rank}(Y) \le d-2 \}\). This variety has codimension three in \({\mathbb {P}}({\mathcal {S}}^d)\) and degree \(\left( {\begin{array}{c}d+1\\ 3\end{array}}\right) \) (see [10, Prop. 12(b)]). This is the degree of the Chow form in the entries of \({\mathcal {C}}\), and hence it is the degree of our hypersurface \(\partial _{\mathrm{alg}} {\mathcal {R}}_{{\mathcal {A}}, b}\). \(\square \)

The proof of Theorem 2.6 requires additional concepts from algebraic geometry. We work with the *Veronese variety*\(\,{\mathbb {P}}^{d-1} \hookrightarrow {\mathbb {P}}({\mathcal {S}}^d)\). By [17, Proposition 12], its *conormal variety* is

As in [17, Theorem 10], we consider the corresponding class \(\,[CV]\,\) in the cohomology ring

Its coefficients are the *polar degrees* of the Veronese variety. By Proposition 2.4,

We represent *CV* by its pullback under the Veronese map \(x \mapsto X = x x^T\) on the first factor. Thus the conormal variety equals \(\,CV \,=\, \bigl \{\, (x,Y) \, : \, Y x=0 \,,\, \, \mathrm{det}(Y) = 0 \, \bigr \}\) in \({\mathbb {P}}^{d-1} \times {\mathbb {P}}({\mathcal {S}}^d) \).

We note that the following *boundary variety* is irreducible of codimension one in *CV*:

By the last item in Remark 2.5, the algebraic boundary of \({\mathcal {R}}_{{\mathcal {A}},b}\) is contained in *BV*.

Let \(Y = (y_{ij})\) be a symmetric \(d \times d\) matrix and \(x = (x_1\;x_2\,\dots \,x_d)^T\) a column vector. Their entries are the variables of the polynomial ring \(T = {\mathbb {C}}[x_1,\dots ,x_d,y_{11}, y_{12}, \dots ,y_{dd}]\). Subvarieties of \( {\mathbb {P}}^{d-1} \times {\mathbb {P}}({\mathcal {S}}^d)\) are defined by bihomogeneous ideals in *T*. The ideal of the conormal variety equals \(I_{CV} = \langle Y x, \det (Y) \rangle \). The ideal of the boundary variety equals \(I_{BV} = I_{CV} + {\text {Min}}_{d-1}(Y)\). The latter is the ideal generated by the \((d-1) \times (d-1)\) minors of *Y*.

### Proof of Theorem 2.6

Let \(C = (c_{ij})\) denote the *adjugate* of *Y*. The entry \(c_{ij}\) of this \(d \times d\) matrix is the \((d-1) \times (d-1)\) minor of *Y* complementary to \(y_{ij}\). We are interested in the divisor in the smooth variety *CV* that is defined by the equation \(c_{11} = 0\). We claim that this divisor is the sum of the boundary divisor *BV* and the divisor defined by \(x_1^2 = 0\).

To prove this claim, we consider the ideals \(I := I_{CV} + \langle c_{11}\rangle \) and \(J := I_{CV} + {\text {Min}}_{d-1}(Y) \cdot \langle x_1^2 \rangle \) in *T*. It suffices to show \(I = {\text {sat}}(J)\), the saturation with respect to \(\langle x_1,\dots ,x_d\rangle \). Consider the \(d \times (d+1)\) matrix \( ( x \;|\; C )\). The ideal \(M :={\text {Min}}_2(x \;|\; C )\) is contained in \(I_{CV}\). Combining two of its generators, we find \(c_{ij}x_1^2 - c_{11}x_ix_j \in M\). Therefore the generator \(c_{ij}x_1^2\) of *J* lies in \(M + \langle \, c_{11} \,\rangle \subset I\). So \(J\subseteq I\), and since *I* is saturated, \({\text {sat}}(J)\subseteq I\). For the reverse inclusion we need to show that \(c_{11} \in {\text {sat}}(J)\). This follows by noting that \( c_{11}x_k^2 - c_{kk}x_1^2 \in M\), and thus \(c_{11} x_k^2 \in M + {\text {Min}}_{d-1}(Y) \cdot \langle x_1^2\rangle \subset J\). Therefore, \(I = {\text {sat}}(J)\) and the claim follows.

We now compute the class of *BV* in the cohomology ring (9). The minor \(c_{11}\) defines a hypersurface of degree \(d-1\) in \({\mathbb {P}}({\mathcal {S}}^d)\), so its class is \((d-1) t\). The class of \(\{x_1^2=0\}\) is twice the hyperplane class in \({\mathbb {P}}^{d-1}\). It is the pullback of \([\{x_{11}=0\}]=s\) under the Veronese map into \({\mathbb {P}}({\mathcal {S}}^d)\). Here \(x_{11}\) is the upper left entry in the matrix \(X = x x^T\). We multiply these classes with [*CV*] as in (10), and thereafter we subtract. By the claim we proved, this gives

where the coefficients of the resulting binary form are the expressions on the right of (7).

The following argument shows that the class [*BV*] encodes the rank-one boundary degrees. Suppose the cost matrix \({\mathcal {C}}\) travels on a generic line in \({\mathcal {S}}^d\) from the inside to the outside of the rank-one region \({\mathcal {R}}_{{\mathcal {A}},b}\). For almost all points \({\mathcal {C}}\) on that line, the optimal pair (*X*, *Y*) is unique. Before \({\mathcal {C}}\) crosses the boundary \(\partial {\mathcal {R}}_{{\mathcal {A}},b}\), the optimal pair satisfies \(\mathrm{rank}(X) = 1\) and \(\mathrm{rank}(Y) = d-1\). Immediately after \({\mathcal {C}}\) crosses \(\partial {\mathcal {R}}_{{\mathcal {A}},b}\), we have \(\mathrm{rank}(X) =2\) and \(\mathrm{rank}(Y) = d-2\). At the transition point, the optimal pair (*X*, *Y*) lies in the variety *BV*.

Consider the intersection of *BV* with the product of the codimension-\((l-1)\) plane \({\mathbb {P}}({\mathcal {V}}^\perp )\) and the subspace \({\mathbb {P}}({\mathcal {U}}') \simeq {\mathbb {P}}^{l+1}\) spanned by \({\mathcal {A}}_1,\ldots ,{\mathcal {A}}_l\) and the line on which \({\mathcal {C}}\) travels. The points in that intersection are the pairs \((X,Y) \in BV\) that arise as \({\mathcal {C}}\) travels along the line. The number of such complex intersection points is the coefficient of \(s^{\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) -l} t^{l+1}\) in [*BV*] .

We need to argue that the inclusion (5) poses no restriction on the products of subspaces we intersect with, i.e., for generic flags \({\mathcal {V}} \subset \mathcal {U'}\) with \(\mathrm{dim}(\mathcal {U'}/ {\mathcal {V}}) = 3\), all intersections with *BV* are transverse and reduced. To this end, let \(X_0\) be the rank-one \(d \times d\) matrix with a single one in the first entry, and let \(Y_0\) be the diagonal \(d \times d\) matrix with two zeros followed by \(d-2\) ones. Then an affine neighborhood of \((X_0,Y_0) \) in \( {\mathbb {P}}({\mathcal {S}}^d) \times {\mathbb {P}}({\mathcal {S}}^d)\) can be given as the direct sum of the spaces parametrized by

The linear terms in the coordinates of the matrix equation \(XY=0\) are

for a total of \(\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) -1\) forms. To show that the intersection described above is transverse for generic flags \({\mathcal {V}} \subset \mathcal {U'}\), it suffices to find one instance for which \(BV \cap ({\mathbb {P}}({\mathcal {V}}^\perp ) \times {\mathbb {P}}(\mathcal {U'})) = \{(X_0,Y_0)\} \) in the neighborhood of \((X_0,Y_0) \in {\mathbb {P}}({\mathcal {S}}^d) \times {\mathbb {P}}({\mathcal {S}}^d)\) defined above.

Let \({\mathbb {P}}({\mathcal {V}}^\perp )\) be determined by the vanishing of the \(l-1\) forms \(x_{1 2},\dots , x_{1\, l-1},x_{2 2}-x_{2 3}\) and \({\mathbb {P}}(\mathcal {U'})\) by the \(\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) - l\) forms \(y_{1,l},\dots ,y_{1,d},y_{2 2}+y_{2 3},y_{2 3}, \dots , y_{d-1, d}\). Combining these forms with those in (12), we get \(2(\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) -1)\) independent linear forms. This (highly non-generic) choice yields a transverse intersection. We conclude that the intersection \(BV \cap ({\mathbb {P}}({\mathcal {V}}^\perp ) \times {\mathbb {P}}(\mathcal {U'}))\) is transverse and reduced at \((X_0,Y_0)\) also for generic choices of \({\mathcal {V}} \subset \mathcal {U'}\). \(\square \)

## From semidefinite to quadratic optimization

We now model the quadratic optimization problem (1) as a special case of the semidefinite program (2). To this end, we set \(l=m+1\), \(d=n+1\), and we use indices that start at 0 and run to *m* and *n* respectively. Let \({\mathcal {A}}_0\) be the rank-one matrix \(E_{00}\) whose entries are 0 except for the entry 1 in the upper left corner. The following two conditions are equivalent:

Setting \(b = (1,0,\ldots ,0)\) and imposing the rank constraint in (13), our SDP in (2) is equivalent to minimizing a quadratic function in *x* subject to the constraints \({\mathcal {A}}_1 \bullet X = \cdots = {\mathcal {A}}_{m} \bullet X = 0 \).

To apply SDP to the problem (1), with *m* quadratic constraints in *n* variables, we set

The matrices \({C},{A}_i\in {\mathcal {S}}^{n}\), the vectors \(c,a_i\in {\mathbb {R}}^{n}\), and the scalars \(\alpha _i\in {\mathbb {R}}\), give the entries in

If we now also set \(\,X = \bigl ({\begin{matrix}1\\ x\end{matrix}}\bigr ) (1\; x^T) \) then (1) is precisely the SDP (2). In other words, (1) is equivalent to (2) with the additional constraint \(\,{{\,\mathrm{rank}\,}}(X) = 1\). The SDP (2) is called the *Shor relaxation* of the quadratic program (1). We say that the relaxation is *exact* if the primal optimal solution \(X^*\) of the SDP is unique and has rank one.

The SDP arising as a relaxation of a quadratic program has two distinctive features: the matrix \({\mathcal {A}}_0\) is the rank-one matrix \(E_{00}\), and we fix the values \(b_0 = 1\), \(c_{00} = b_1 = \cdots = b_m = 0\). The last \(m+1\) equations pose no restriction: they can be achieved by adding multiples of \({\mathcal {A}}_0\) to \({\mathcal {C}},{\mathcal {A}}_1,\ldots ,{\mathcal {A}}_m\). The only truly special feature of this SDP is that \({\mathcal {A}}_0\) has rank one.

### Remark 3.1

The Shor relaxation of a quadratic optimization problem in \({\mathbb {R}}^n\) is a semidefinite program in \({\mathcal {S}}^{n+1}\) in which one constraint matrix \({\mathcal {A}}_0\) is rank-one.

We fix the identifications in (14) throughout this section. In particular, we will define the SDP-exact region as the restriction of the rank-one region to SDP’s coming from quadratic programs. Consider the *Lagrangian* function

This polynomial is quadratic in *x*. Its Hessian with respect to *x* is the symmetric \(n \times n\) matrix

The entries of the matrix \(\mathrm{H}(\lambda )\) are affine-linear in \(\lambda = (\lambda _1,\ldots ,\lambda _m)\).

The SDP-exact region is obtained by specializing Definition 2.2 to the matrices in (14):

### Definition 3.2

The *SDP-exact region*\({\mathcal {R}}_\mathbf{f}\) is the set of all matrices \(\,{\mathcal {C}}\in {\mathcal {S}}^{n+1}\) such that

The condition (17) has a natural interpretation in the setting of constrained optimization. It says that the Hessian of the Lagrangian is positive definite at the optimal solution.

### Remark 3.3

Definition 3.2 expresses \({\mathcal {R}}_\mathbf{f}\) as a union of spectrahedral shadows [18, 20]. To see this, fix a point *x* in \(V_\mathbf{f}\). The constraints (17) define a spectrahedron \({S}_{{x}}\) in the space with coordinates \(({\lambda }, {C}, c)\). The SDP-exact region for *x* is the image of \({S}_{{x}}\) under the projection onto the coordinates (*C*, *c*). This image is a spectrahedral shadow. Definition 3.2 says that \({\mathcal {R}}_\mathbf{f}\) is the union of these shadows. We shall return to this point in Theorem 4.1.

The main result in this section is the extension of Proposition 2.4 and Theorem 2.6 to quadratic optimization. Let \(N = \left( {\begin{array}{c}n+2\\ 2\end{array}}\right) -1\) and consider the map \(\pi : {\mathbb {P}}^N \times {\mathbb {P}}^N \dashrightarrow {\mathbb {P}}^N \times {\mathbb {P}}^{N-1}\) that deletes the upper left entry \(y_{00}\) of the matrix *Y*. Let \(CV' = \overline{\pi (CV)} \) denote the closed image of the conormal variety *CV* in (8) under the map \(\pi \), and similarly let \(BV' = \overline{\pi (BV)}\) denote the closed image of the boundary variety in (11). Algebraically, we compute these projected varieties by eliminating the unknown \(y_{00}\) from the defining ideals of (8) and (11).

### Proposition 3.4

The algebraic degree of (1) is given by \([CV']\) in \(H^*({\mathbb {P}}^N\times {\mathbb {P}}^{N-1})\). We have

Similarly, the degree of \(\partial _{\mathrm{alg}} {\mathcal {R}}_\mathbf{f}\) is given by the class of the projected boundary variety \(BV'\).

### Proof

The map \(\pi \) is the projection from the special point \({\mathcal {A}}_0 = E_{00}\) in \({\mathbb {P}}^N\). In the proof of Theorem 2.6, we intersect *CV* and *BV* with products of complementary linear spaces. The situation is the same here, except that we now require the linear space in the second factor to contain the point \( {\mathcal {A}}_0\). Thus, our counting problem is equivalent to intersecting the projections via \(\pi \) by products of generic linear spaces of complementary dimension. The formula in (18) is the algebraic degree of quadratic programming, which is found in [16, Eqn. (3.1)]. \(\square \)

### Theorem 3.5

Let \(m \le n\) and suppose that \(f_1,\ldots ,f_m\) are generic polynomials in \({\mathbb {R}}[x]_{\le 2}\). The algebraic boundary of the SDP-exact region \({\mathcal {R}}_\mathbf{f}\) is a hypersurface whose degree equals

Table 2 illustrates (18) and Theorem 3.5. It shows the algebraic degrees of quadratic programming and corresponding degrees of rank-one boundaries. Compare with Table 1. The diagonal entries \((m=n)\) in Table 2 are similar to those in the Max-Cut Problem (Example 1.2), but there is an index shift because the general objective function *g*(*x*) is not homogeneous. We have \(\beta _{QP}(n,n) = 2^n \cdot n\), since the *n* quadrics \(\{f_i(x) = 0\}\) intersect in \(2^n\) points, and each of these contributes a spectrahedron of degree *n* to the SDP-exact region.

For the proof we shall use polynomial ideals as in Sect. 2, but now the ambient ring is \(T = {\mathbb {C}}[y_{00},y_{01},\ldots ,y_{nn}, x_0,\ldots ,x_n]\). Using this variable ordering, we fix the lexicographic monomial order on *T*. In particular, \(y_{00}\) is the highest variable. Let \(I_{BV}={\text {Min}}_n\bigl (Y) + \langle Y x \rangle \) be the ideal generated by the \(\left( {\begin{array}{c}n+2\\ 2\end{array}}\right) \) minors of *Y* of size *n* and the \(n+1\) entries of vector *Yx*.

### Lemma 3.6

The initial ideal \(\mathrm{in}(I_{BV})\) is radical. It is minimally generated by \(\left( {\begin{array}{c}n+2\\ 2\end{array}}\right) + \sum _{t=0}^{n-2} \left( {\begin{array}{c}n+1\\ t+1\end{array}}\right) \) squarefree monomials, namely the leading terms of the \(n \times n\) minors of *Y*, and the monomials \(\,x_t \cdot y_{0 k_0} y_{1 k_1} \cdots y_{t k_t}\,\) where \(\,t \in \{0,1,\ldots ,n-2\}\,\) and \(\, 0 \le k_0< k_1< \cdots < k_t \le n\).

### Proof

It is well-known in commutative algebra that the \(n \times n\) minors of *Y* form a reduced Gröbner basis. We augment these to a reduced Gröbner basis for \(I_{BV}\) by adding the entries of the row vector \(x^T {{\tilde{Y}}}\) where \({{\tilde{Y}}}\) is a certain matrix with \(n+1\) rows and many more columns. To construct this, we consider the *T*-module spanned by any subset of columns of *T*. The *circuits* in such a submodule of \(T^{n+1}\) are the nonzero vectors with minimal support. We consider all circuits whose support is a terminal segment \(\{t,t+1,\ldots ,n,n+1\}\). The columns of \({{\tilde{Y}}}\) are all such circuits. These are formed by applying Cramer’s rule to submatrices of *Y* with row indices \(0,\ldots ,t-1\) and \(t+1\) arbitrary columns. The resulting entries of \(x^T {{\tilde{Y}}}\) lie in \(I_{BV}\). They are linear in *x*, of degree \(t+1\) in *Y*, and have the desired initial monomials. One checks that their S-pairs reduce to zero, and that this Gröbner basis is reduced. \(\square \)

### Corollary 3.7

The ideal \(I_{BV}'\) obtained from \(I_{BV}\) by eliminating the highest variable \(y_{00}\) is generated by those *n* entries of *Yx* and \(n+1\) minors of \(\,Y\) of size *n* that do not use \(y_{00}\).

### Proof

The elimination ideal \(I'_{BV}\) is generated by elements of the lexicographic Gröbner basis that do not contain \(y_{00}\). These are elements whose leading monomials do not contain \(y_{00}\). Each of these is a polynomial linear combination of the above \(2n+1\) generators of \(I_{BV}\). \(\square \)

### Proof of Theorem 3.5

Let \(N = \left( {\begin{array}{c}n+2\\ 2\end{array}}\right) -1\). As in the proof of Theorem 2.6, we identify *CV* with its preimage in \({\mathbb {P}}^{n} \times {\mathbb {P}}^N\), that is, \( CV = \{ (x,Y) \;|\; Y x=0, {{\,\mathrm{rank}\,}}(Y) \le n\}\). Its image \(CV'\) under \(\pi \) lives in \({\mathbb {P}}^{n} \times {\mathbb {P}}^{N-1}\). The boundary \(BV'\) is the projection of *BV* into \({\mathbb {P}}^{n} \times {\mathbb {P}}^{N-1}\).

In Theorem 2.6, the boundary was found by intersecting *CV* with the divisor given by the minor \(c_{00}\) of *Y*, and by removing the non-reduced excess component \(\{x_0^2 = 0\}\). In the present case, we still have that excess component, but it is reduced, given by \(x_0 = 0\). The class \([\{x_0=0\}]\) is half of the pullback of the hyperplane class *s* of \({\mathbb {P}}^{n}\). Using (18), this implies

The coefficients \(\beta _{QP}(m,n)\) of this binary form are the combinatorial expressions in (19).

To see that the excess component is now \(\{ x_0 = 0\}\), we argue as follows. Let \(C'=(c_{0j})\) be the leftmost column of the adjugate matrix of *Y*. Consider the ideals \(I' := I_{CV}' + \langle c_{00} \rangle \) and \(J':= I_{CV}' + \langle C' \rangle \cdot \langle x_0 \rangle \). We claim that \(I'={\text {sat}}(J')\). Observe that the \((n+1) \times 2\) matrix \( \bigl ( \,x \,| \,C' \bigr )\) satisfies \({\text {Min}}_2\bigl (\,x\,|\,C'\bigr ) \subset I_{CV}'\). This implies \(c_{0j} x_0 \in J'\) for all \(j \ge 1\). Then \(J' \subseteq I'\) and since \(I'\) is saturated, \({\text {sat}}(J') \subseteq I'\). The reverse inclusion is implied by \(c_{00} \in {\text {sat}}(J')\), which follows from the fact that \(c_{00}x_j \in {\text {Min}}_2\bigl (\,x\,|\,C'\bigr ) + \langle C' \rangle \cdot \langle x_0 \rangle \). By Corollary 3.7, the elimination ideal is \(I_{BV}' = I_{CV}' + \langle C' \rangle \). So we may conclude that \(CV' \cap \{c_{00}\} = BV' \cup (CV' \cap \{x_0=0\})\). \(\square \)

### Remark 3.8

(Lasserre hierarchy) It is natural to try to extend the SDP-exact region to higher levels of the Lasserre hierarchy [1, 13, 14]. Consider equations \(\mathbf{f }=(f_1,\dots ,f_m)\) of degree \(\le 2d\). We may define the *d*-th SDP-exact region \({\mathcal {R}}^{d}_\mathbf{f}\) as the set of all \(g\in {\mathbb {R}}[x]_{\le 2d}\) such that (1) is solved exactly by the *d*-th level of the hierarchy. By further imposing strict complementarity, we may derive a semialgebraic representation similar to (17). Some illustrations of \({\mathcal {R}}^{d}_\mathbf{f}\) were obtained in [4]. It is an open problem to investigate the geometry of this region and, in particular, to compute the degree of its algebraic boundary. This analysis might be significantly more complicated, since the special structure of the moment matrix must be taken into account (so the dual pair of flags is not generic).

## Bundles of spectrahedral shadows

We fix \({\mathbf {f}}=(f_1,\dots ,f_m)\) as before. For any \(u\in {\mathbb {R}}^n\) we consider the following two problems:

**Linear Objective (Lin):**Minimize \(u^T x\) subject to \(x\in V_\mathbf{f}\).**Euclidean Distance (ED):**Minimize \(\Vert x-u\Vert ^2\) subject to \(x\in V_\mathbf{f}\).

These problems are special instances of the quadratic program (1), with the cost matrices

We write \({\mathcal {R}}^{ lin}_\mathbf{f}\) and \( {\mathcal {R}}^{ ed}_\mathbf{f} \) for the SDP-exact regions in \({\mathbb {R}}^n\) of these two problems. They are the intersections of \({\mathcal {R}}_\mathbf{f}\) with the affine subspaces of \({\mathcal {S}}^{n+1}\) given in (20). The punchline of this section is that both regions are *normal bundles of spectrahedral shadows* over \(V_\mathbf{f}\). Namely, we shall write \({\mathcal {R}}^{ lin}_\mathbf{f}\) and \({\mathcal {R}}^{ ed}_\mathbf{f}\) as a union of spectrahedral shadows, one for each point \({x} \in V_\mathbf{f}\).

The lower right block of \({\mathcal {C}}^{ lin}\) and \({\mathcal {C}}^{ ed}\) is independent of *u*, and thus the Hessian matrix \(\mathrm{H}(\lambda )\) is independent of *u*. The spectrahedron defined by the constraint \( \mathrm{H}(\lambda ) \succ 0 \) is as follows:

The sets in (21) are called *master spectrahedra*. Observe that \(\mathrm{S}^{ lin}_\mathbf{f}\) is a cone in \({\mathbb {R}}^{m}\). Also note that \(\mathrm{S}^{ ed}_\mathbf{f}\) is full-dimensional because \(\lambda = (0,\ldots ,0)\) is an interior point. Let \(\mathrm{Jac}_\mathbf{f}\) denote the Jacobian matrix of \(\mathbf{f}\). This matrix has format \(n \times m\), and its entry in row *i* and column *j* is the linear polynomial \(\partial f_j/\partial x_i\). At any point \(x \in V_\mathbf{f}\), the specialized Jacobian matrix \(\mathrm{Jac}_\mathbf{f}(x)\) defines a linear map \({\mathbb {R}}^m \rightarrow {\mathbb {R}}^n\), whose range is the *normal space* of the variety \(V_\mathbf{f}\) at *x*. We consider all the images of the respective master spectrahedra under these linear maps.

### Theorem 4.1

The SDP-exact regions for **(Lin)** and **(ED)** are comprised of the images of the corresponding master spectrahedra in the normal spaces of the variety \(V_\mathbf{f}\). To be precise,

Moreover, the above unions are disjoint because our spectrahedra are relatively open.

### Proof

The result follows by substituting (20) into Definition 3.2. Disjointness holds because any *u* in one of the parenthesized sets has the associated *x* as its unique optimal solution. \(\square \)

One consequence of Theorem 4.1 is that the SDP-exact region for an ED problem is always full-dimensional. This fact was observed in [3], where it was shown to have interesting applications in computer vision, tensor approximation and rotation synchronization.

### Corollary 4.2

If *x* is a regular point of \(V_\mathbf{f}\), then \({\mathcal {R}}^{ ed}_\mathbf{f}\) contains an open neighborhood of *x*.

### Proof

The regularity hypothesis means that \({{\,\mathrm{rank}\,}}(\mathrm{Jac}_\mathbf{f}(x))= {{\,\mathrm{codim}\,}}_x(V_\mathbf{f})\). This ensures that \(\mathrm{Jac}_\mathbf{f}({z})\cdot \mathrm{S}^{ ed}_\mathbf{f}\) is full-dimensional in the normal space of \(V_\mathbf{f}\) at any point *z* close to *x*. \(\square \)

For finite complete intersections, the SDP-exact regions are finite unions of spectrahedra:

### Corollary 4.3

Let \(\mathbf{f}=(f_1,\dots ,f_n)\) be a complete intersection with \(k\le 2^n\) real points. Then

- (a)
\({\mathcal {R}}^{ lin}_\mathbf{f}\) consists of

*k*spectrahedral cones, each of them isomorphic to the master \(\mathrm{S}^{ lin}_\mathbf{f}\). - (b)
\({\mathcal {R}}^{ ed}_\mathbf{f}\) consists of

*k*full-dimensional spectrahedra, each isomorphic to the master \(\mathrm{S}^{ ed}_\mathbf{f}\).

### Proof

The linear map \(\mathrm{Jac}_\mathbf{f}({x})\) is injective and hence invertible on its image. Therefore, the spectrahedral shadow \(\mathrm{Jac}_\mathbf{f}({x})\cdot \mathrm{S}_\mathbf{f}\) is actually a spectrahedron, linearly isomorphic to \(\mathrm{S}_\mathbf{f}\). \(\square \)

The spectrahedral cones in \({\mathcal {R}}^{ lin}_\mathbf{f}\) are tightly connected to the first *theta body* of \(\langle \mathbf{f}\rangle \), denoted \(\mathrm{TH}_1(\mathbf{f})\), introduced by Gouveia et al. [9]. The theta bodies of \(\mathbf{f}\) are tractable approximations to the convex hull of \(V_\mathbf{f}\), given by projecting the feasible set of the Lasserre relaxation [13] onto the first order moments. Later in this section we will show that \({\mathcal {R}}^{ lin}_\mathbf{f}\) consists of the normal cones of \(\mathrm{TH}_1(\mathbf{f})\).

### Example 4.4

(\(m=n=2\)) Consider two quadrics in two variables such that \(V_\mathbf{f}\) consists of four points in convex position in \({\mathbb {R}}^2\). The region \({\mathcal {R}}^{ ed}_\mathbf{f}\) was illustrated in Fig. 1. The region \({\mathcal {R}}^{ lin}_\mathbf{f}\) consists of four cones that sit inside the normal cones at the quadrilateral \(\mathrm{conv}(V_\mathbf{f})\). We explain this for the specific instance examined in [9, Example 5.6]:

The first theta body \(\mathrm{TH}_1(\mathbf{f})\) is seen in [9, Figure 3]. Our rendition in Fig. 3 show also the SDP-exact region \({\mathcal {R}}^{ lin}_\mathbf{f}\). It consists of the normal cones of \(\mathrm{TH}_1(\mathbf{f})\) at the four points in \(V_\mathbf{f}\). For more details see Proposition 4.7.

It is interesting to examine Corollary 4.3 (b) when \(m=n\) and \(V_\mathbf{f}\) consists of \(2^n\) real points. We know that \({\mathcal {R}}^{ ed}_\mathbf{f}\) consists of \(2^n\) full-dimensional spectrahedra of degree *n*. We show that these hypersurfaces are pairwise tangent, and also tangent to the walls of the Voronoi diagram. The case \(n=2\) was seen in Fig. 1, whereas the case \(n=3\) is shown in Fig. 4.

For \( x \in V_\mathbf{f}\), we set \(\,S_x = x - \tfrac{1}{2}\,\mathrm{Jac}_\mathbf{f}({x}) \cdot \mathrm {S}^{ ed}_\mathbf{f} \,\) and we write \(\,\partial _{\mathrm{alg}} S_x\) for its algebraic boundary.

### Theorem 4.5

Let \(m=n\) and \(\mathbf{f}\) generic, so \(V_\mathbf{f}\) is finite. Let \(x,x' \in V_\mathbf{f}\), and \(S_x, S_x'\) be the corresponding spectrahedra, and let \(\mathrm {bsc}\subset {\mathbb {R}}^{n}\) be the bisector hyperplane of *x* and \(x'\). There is a point \(u\in {\mathbb {R}}^{n}\) at which the three hypersurfaces \(\mathrm {bsc}\), \(\partial _{\mathrm{alg}} S_x\) and \(\partial _{\mathrm{alg}} S_x'\) meet tangentially.

### Proof

Let \(p(\lambda ):= \det (I_{n}-\sum _i \lambda _i {A}_i)\) be the defining polynomial of \(\partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f}\). Then \(\,p_x(u):= p(2\,\mathrm{Jac}_\mathbf{f}({x})^{-1} u - x)\,\) is the defining polynomial of \(\partial _{\mathrm{alg}} S_x\). We shall construct a point \(u_x\) in the hypersurface \( \partial _{\mathrm{alg}} S_x\) whose normal vector \(\nabla _u p_x (u_x) \) is parallel to \(x-x'\). Notice that

where *M* denotes the adjugate of \(I_{n} - \textstyle \sum _i {\lambda }_i {A}_i\). Since this matrix is supposed to be singular,

We claim that \(M = (x'-x)(x'-x)^T\) satisfies the constraint in the middle. This is seen by showing that the *i*-th coordinate of the vector \(\tfrac{1}{2} (x' - x)^T \mathrm{Jac}_\mathbf{f}({x})\) equals

The desired vector \(\lambda \) is then determined by the equation \((I_n-\sum _i\lambda _i {A}_i)(x'-x)=0\). Now, (22) holds, and the point \(u_x = x - \tfrac{1}{2}\mathrm{Jac}_\mathbf{f}({x})(\lambda )\) has its normal at \( \partial _{\mathrm{alg}} S_x\) parallel to \(x' - x\).

We similarly construct \(u_x' \in \partial _{\mathrm{alg}} S_x'\). By (23), we have \((x - x')^T \mathrm{Jac}_\mathbf{f}({x}') = (x' - x)^T \mathrm{Jac}_\mathbf{f}({x})\). Hence the value of *M* that satisfies (22) is the same for both *x* and \(x'\), and thus \(u_x=u_x'\).

Finally, let us show that \(u_x\) lies on \(\mathrm {bsc}\). Since \((I_{n} - \textstyle \sum _i \lambda _i {A}_i) (x'-x) = 0\), we have

The difference \(\Vert u_x - x' \Vert ^2 - \Vert u_x - x \Vert ^2 \) equals

We see that \(u_x\) is equidistant from *x* and \(x'\), i.e., \(u_x\) belongs to the hyperplane \(\mathrm {bsc}\). We have shown that our three hypersurfaces all pass through \(u_x\) and have the same normal vector. \(\square \)

We next illustrate how the normal bundle from Theorem 4.1 looks for a curve.

### Example 4.6

Let \(\mathbf{f} = (x_2 - x_1^2,\, x_3 - x_1 x_2)\), so \(V_\mathbf{f}\) is the *twisted cubic curve* in \({\mathbb {R}}^3\). This specific instance was examined in [3, Example 1.1]. The spectrahedron \(\mathrm {S}^{ ed}_\mathbf{f}\) is the interior of a parabola, namely \(\{ \lambda _2^2 < 2 \lambda _1 + 1 \}\). The image \({x} - \tfrac{1}{2}\mathrm{Jac}_\mathbf{f}({x}) \cdot \mathrm{S}^{ ed}_\mathbf{f}\) is a parabola in the normal plane at *x*. The boundary \(\partial {\mathcal {R}}^{ ed}_\mathbf{f}\) is the union of all these parabolas, as shown in Fig. 5.

We will elaborate more on the ED problem in Sect. 5. To conclude this section, we briefly develop the connection between our SDP-exact region \({\mathcal {R}}^{ lin}_\mathbf{f}\) and the theory of theta bodies [9]. By [9, Lemma 5.2], the first theta body of our instance \(\mathbf{f}\) is

By [9, §2], the set \(\mathrm {TH}_1({\mathbf {f}})\) is a spectrahedral shadow that contains the convex hull of \(V_\mathbf{f}\).

### Proposition 4.7

Let \(B = \mathrm {TH}_1({\mathbf {f}})\) be the first theta body for the problem **(Lin)**. Then the SDP-exact region \( {\mathcal {R}}^{ lin}_\mathbf{f} \) is the union of the normal cones to *B* at all points in \(V_\mathbf{f}\). In symbols,

### Proof

Note that \(u\in N_B(x)\) if and only if \(x=\mathop {\mathrm{arg max}}\limits _{y\in B} u^T y\). On the other hand, the problem \(\max _{y\in B} u^T y\) is equivalent to the SDP relaxation of our QP (1). Then,

By definition, this set is the SDP-exact region for **(Lin)**. For an illustration see Fig. 3. \(\square \)

## Boundary hypersurfaces in \({\mathbb {R}}^n\)

We now examine our degrees of the ED problem. Following [6], the Euclidean distance degree of \(V_\mathbf{f}\), denoted \({\text {EDdegree}}(V_\mathbf{f})\), counts the number of complex critical points for the squared distance function \(g_u(x) = \Vert x-u \Vert ^2\) on the variety \(V_\mathbf{f}\), where \(u \in {\mathbb {R}}^n\) is a generic point.

### Proposition 5.1

The algebraic degree of the quadratic program (1) that solves the ED problem for \(V_\mathbf{f}\) is \({\text {EDdegree}}(V_\mathbf{f})\). This is bounded above by \( 2^{m} \left( {\begin{array}{c}n\\ m\end{array}}\right) \). Equality holds for generic \(\mathbf{f}\).

### Proof

The first statement is immediate from the definition of the ED degree. The last two statements follow from [6, Proposition 2.6]. \(\square \)

We next assume that \(\mathbf{f}\) is generic. Hence \(V_\mathbf{f}\) is a generic complete intersection. We are interested in the degree \(\beta _{ED}(m,n)\) of the hypersurface \(\,\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f} \subset {\mathbb {R}}^n\,\) that bounds the SDP-exact region for the ED problem. Table 3 shows \(\beta _{ED}(m,n)\) for some small cases.

### Example 5.2

(\(m=2,n=3\)) Figure 6 shows the SDP-exact region for a generic instance. Its boundary is an irreducible surface of degree 24. The master spectrahedron is the convex region of a planar cubic (lower right in Fig. 6). The variety \(V_\mathbf{f}\) is a space curve of degree 4, obtained by intersecting two hyperboloids (upper right in Fig. 6). We regard both curves as elliptic curves, the first in \({\mathbb {P}}^2\) and the second in \({\mathbb {P}}^3\). The product of these two elliptic curves is an *abelian surface*, which has degree 24 under its Segre embedding into \({\mathbb {P}}^2 \times {\mathbb {P}}^3 \subset {\mathbb {P}}^{11}\). Our boundary surface \(\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f}\) is a projection of this surface into \({\mathbb {P}}^3\). This explains \(\beta _{ED}(2,3) = 24\). The picture on the left in Fig. 6 shows \(\partial {\mathcal {R}}^{ ed}_\mathbf{f}\) in real affine space \({\mathbb {R}}^3\). Each of the three connected components of the curve \(V_\mathbf{f}\) is surrounded by one color-coded component of that surface. These three pieces of \(\partial {\mathcal {R}}^{ ed}_\mathbf{f}\) are pairwise tangent along curves.

For the subsequent degree computations we record the following standard fact from algebraic geometry. Example 5.2 used this formula for deriving the number \(3 \cdot 4 \cdot \left( {\begin{array}{c}1+1\\ 1\end{array}}\right) = 24\).

### Lemma 5.3

Fix two projective varieties \(V \subset {\mathbb {P}}^n\) and \(W \subset {\mathbb {P}}^m\). The projective variety \(V \times W\) has degree \(\,\deg (V)\deg (W) \left( {\begin{array}{c}\dim V + \dim W\\ \dim W\end{array}}\right) \,\) in the Segre embedding of \( \,{\mathbb {P}}^n \times {\mathbb {P}}^m \,\) in \(\,{\mathbb {P}}^{(n+1)(m+1)-1}\).

We consider the product of our feasible set \(V_\mathbf{f}\) with the algebraic boundary of its master spectrahedron \( \mathrm{S}^{ ed}_\mathbf{f}\). This is the real algebraic variety \(\,V_\mathbf{f} \times \partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f} \,\) in \({\mathbb {R}}^n \times {\mathbb {R}}^m\). We identify this variety with its Zariski closure in the product of complex projective spaces \({\mathbb {P}}^n \times {\mathbb {P}}^m\). Under the Segre map, we embed \(\,V_\mathbf{f} \times \partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f} \,\) as a projective variety in \({\mathbb {P}}^{(m+1)(n+1)-1}\).

### Corollary 5.4

The variety \(\,V_\mathbf{f} \times \partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f} \,\) has dimension \(n -1\) and degree \(m\, 2^m \left( {\begin{array}{c}n\\ m\end{array}}\right) \).

### Proof

The variety \(V_\mathbf{f}\) has dimension \(n-m\) and degree \(2^m\). The variety \(\partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f} \) has dimension \(m-1\) and degree *n*. By Lemma 5.3, their product has degree \(\,2^m \cdot n \cdot \left( {\begin{array}{c}n-1\\ m-1\end{array}}\right) = m \cdot 2^m \cdot \left( {\begin{array}{c}n\\ m\end{array}}\right) \). \(\square \)

By Theorem 4.1, the boundary of the SDP-exact region is the image of \(\,V_\mathbf{f} \times \partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f} \,\) under

The map \(\psi \) is bilinear. We consider its homogenization

This map factors as the Segre embedding \(\sigma \) followed by a linear projection \(\pi \):

### Lemma 5.5

The restriction of \(\,\pi \) to (the image under \(\sigma \) of) \(\,V_\mathbf{f} \times \partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f} \,\) is base-point free.

### Proof

We show that \(L \cap \sigma (V_\mathbf{f} \times \partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f} ) = \emptyset \), where \(L \subset {\mathbb {P}}^{(n+1)(m+1)-1}\) is the base locus of \(\pi \). By (25), we know that *L* is contained in \(\{\lambda _0 x_0 = 0\}\). First, assume \(\lambda _0=0\) and \(x_0=1\). The equations from (25) simplify to \(\sum _{i=1}^{m} \lambda _i(a_i + A_i x) = 0\), which means \(\mathrm{Jac}_\mathbf{f}(x) \lambda = 0\). But this is impossible because \(\mathrm{Jac}_\mathbf{f}(x)\) has full rank, by genericity of \(\mathbf{f}\). Consider now the case \(x_0=0\). We may assume that \(m<n\), as otherwise \(V_\mathbf{f}\) does not intersect \(\{x_0=0\}\). Setting the image in (25) to zero, we get \(\lambda _0 x - \sum _{i=1}^{m} \lambda _i ( A_i x) = 0\). Viewed as a system of linear equations in \(\lambda _0,\lambda _1,\ldots , \lambda _m \), this is overconstrained, so by genericity it has no nonzero solution. \(\square \)

We now write \(\pi \) for the restriction to \(V_\mathbf{f} \times \partial _{\mathrm{alg}} \mathrm{S}^{ ed}_\mathbf{f}\). Lemma 5.5 and the dimension part in Corollary 5.4 show that \(\pi \) is a dimension-preserving morphism onto \(\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f}\). The degree of this morphism, denoted \(\deg (\pi )\), is the cardinality of the fiber of \(\pi \) over a generic point in the image. By [15, Proposition 5.5], the degree of the source equals the degree of the image times the degree of the map. Hence, Lemma 5.3 implies the following result:

### Theorem 5.6

The degree of the algebraic boundary \(\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f}\) of the SPD-exact region is

We conjecture that \(\deg (\pi )=1\) whenever our variety \(V_\mathbf{f}\) is not a hypersurface, i.e., whenever \(m \ge 2\). This was verified computationally in all cases that are reported in Table 3.

### Conjecture 5.7

If \(m \ge 2\) then the degree in Theorem 5.6 is \(\,\beta _{ED}(m,n) = m\, 2^{m}\left( {\begin{array}{c}n\\ m\end{array}}\right) \).

Analogously to Proposition 2.7, the above formula fails in the case \(m=1\).

### Proposition 5.8

If \(m=1\) then the SDP-exact region \({\mathcal {R}}^{ ed}_\mathbf{f}\) is dense in \({\mathbb {R}}^n\). If \(\mathbf{f}\) is generic, then \(\deg (\pi )=2\) and the algebraic boundary \(\,\partial _{\mathrm{alg}}{\mathcal {R}}^{ ed}_\mathbf{f}\) consists of *n* hyperplanes. The topological boundary \(\,\partial {\mathcal {R}}^{ ed}_\mathbf{f} = {\mathbb {R}}^n \backslash {\mathcal {R}}^{ ed}_\mathbf{f}\) is contained in at most two of these *n* hyperplanes:

If \(V_\mathbf{f}\) is an ellipsoid then \(\partial {\mathcal {R}}^{ ed}_\mathbf{f}\) is the relative interior of an ellipsoid in a hyperplane.

Otherwise, \(\partial {\mathcal {R}}^{ ed}_\mathbf{f}\) spans two hyperplanes \(H_1, H_2\), and \(\partial {\mathcal {R}}^{ ed}_\mathbf{f} \cap H_i\) is bounded by a quadric.

The boundary \(\partial {\mathcal {R}}^{ ed}_\mathbf{f}\) coincides with the cut locus of the quadratic hypersurface \(V_\mathbf{f}\).

The *cut locus* of a variety *V* in \({\mathbb {R}}^n\) is defined as the set of all points in \({\mathbb {R}}^n\) that have two nearest points on *V*. If *V* is the boundary of a full-dimensional region in \({\mathbb {R}}^n\) then the part of the cut locus that lies inside the region is referred to as the *medial axis*. In Fig. 7, the blue region is the medial axis. The red region is in the cut locus but not in the medial axis.

For the varieties \(V_\mathbf{f}\) in this paper, the cut locus is always disjoint from the SDP-exact region \({\mathcal {R}}^{ ed}_\mathbf{f}\). If \(m=1\) and \(\mathbf{f}\) is generic then these two disjoint sets cover \({\mathbb {R}}^n\), by Proposition 5.8.

### Proof

Proposition 2.7 implies that that \({\mathcal {R}}^{ ed}_\mathbf{f}\) is dense in \({\mathbb {R}}^n\). We drop indices and set \(\,f(x) = x^T A x + 2 a^Tx + \alpha \). Let \(\omega _1<\dots <\omega _n\) be the eigenvalues of *A*, and let \(v_i\) be the corresponding eigenvectors. We shall assume that \(\omega _1<0<\omega _n\). The master spectrahedron is the interval

and thus \(\partial \mathrm{S}^{ ed}_\mathbf{f} = \{1/\omega _1,1/\omega _n\}\). Let \(\lambda _i = 1/\omega _i\) and \(\psi _i(x):= \psi (x,\lambda _i) = (I_n-\lambda _i A) x - \lambda _i a\). The image of \(\psi _i\) is the hyperplane \(\,H_i \, = \,\{ u \in {\mathbb {R}}^n \, :\, v_i^T u + \lambda _i v_i^T a = 0 \}\). The fiber of \(\psi _i\) over a point \(u \in H_i\) is a line. That line has a parametrization \(\phi _i:{\mathbb {R}}\rightarrow {\mathbb {R}}^n\), \(\,t \mapsto t v_i + b_u\), where \(b_u\) depends linearly on *u*. Then \(f(\phi _i(t))=0\) is a quadratic equation in *t* with two solutions. This proves that the morphism \(\pi \) restricts to a 2-to-1 map from \(V_\mathbf{f}\) onto \(H_i\), and thus \(\deg (\pi )= 2\). The boundary \(\partial {\mathcal {R}}^{ ed}_\mathbf{f}\cap H_i\) is given by requiring that both solutions of \(f(\phi _i(t))=0\) are real. This is the solution set to a quadratic discriminantal inequality for \(u \in H_i\). Thus \(\partial {\mathcal {R}}^{ ed}_\mathbf{f} \cap H_i\) is bounded by a quadric for \(i\in \{1,n\}\). Since the Galois group for the *n* eigenvalues acts transitively, the algebraic boundary is \(\,\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f} = \bigcup _{i=1}^n H_i \). \(\square \)

### Remark 5.9

The derivation above leads to a formula for the cut locus of an arbitrary quadratic hypersurface in \({\mathbb {R}}^n\). For the special case of ellipsoids, this was found by Degen [5].

We close this section with the analog to Theorem 5.6 for the problem **(Lin)** where (1) has linear objective function *g*. Now the cone \( \mathrm{S}^{ lin}_\mathbf{f}\) on the left of (21) is the master spectrahedron. The linear map (24) gets replaced by \( \psi \,:\, {\mathbb {R}}^n \times {\mathbb {R}}^m \rightarrow {\mathbb {R}}^n, (x,\lambda ) \,\mapsto \, \textstyle \sum _{i=1}^m \lambda _i (a_i + A_i x)\). In contrast to (24), this map is now homogeneous in \(\lambda \). Hence its homogenization equals

The map \(\Psi \) factors as the Segre embedding \(\sigma \) followed by a linear projection \(\pi \):

The following result transfers both Proposition 5.1 and Theorem 5.6 to the linear problem.

### Theorem 5.10

Let \(\,\mathbf{f}\) be generic and \(m \ge 2\). The algebraic degree of **(Lin)** equals \(\,2^m \left( {\begin{array}{c}n-1\\ m-1\end{array}}\right) \). The degree of the algebraic boundary \(\,\partial _{\mathrm{alg}} {\mathcal {R}}^{ lin}_\mathbf{f}\,\) of the SPD-exact region equals

### Proof

The first statement is [16, Theorem 2.2] for \(d_0 =1\) and \(d_1 = \cdots = d_m = 2\). The proof of (27) mirrors the proof of Theorem 5.6, but with *m* replaced by \(m-1\). The analogue to Corollary 5.4 says that \(\,V_\mathbf{f} \times \partial _{\mathrm{alg}} \mathrm{S}^{ lin}_\mathbf{f} \,\) has dimension \((n-m) + (m-2)\) and degree \(2^m n \left( {\begin{array}{c}n-2\\ m-2\end{array}}\right) \). \(\square \)

Just like in (5.7), we believe that \(\deg (\pi ) = 1\), so that \(\beta _{ lin}(m,n) = 2^m n \left( {\begin{array}{c}n-2\\ m-2\end{array}}\right) \). There are notable differences between **(Lin)** and **(ED)**. First, it is preferable to assume that \(V_\mathbf{f}\) is compact, so that (1) is always bounded. Second, the SDP-exact region \({\mathcal {R}}^{ lin}_\mathbf{f}\) is a cone in \({\mathbb {R}}^n\), so its algebraic boundary \(\,\partial _{\mathrm{alg}} {\mathcal {R}}^{ lin}_\mathbf{f}\,\) should be thought of as a hypersurface in \({\mathbb {P}}^{n-1}\).

### Example 5.11

(\(m=2, n=3\)) Consider the curve shown in the upper right of Fig. 6. After a projective transformation, \(V_\mathbf{f} \subset {\mathbb {R}}^3\) is bounded with two connected components. Its theta body \(\mathrm{TH}_1(\mathbf{f})\) is an intersection of two solid ellipsoids that strictly contains \(\mathrm{conv}(V_\mathbf{f})\). The region \({\mathcal {R}}^{ lin}_\mathbf{f}\) consists of linear functionals whose minimum is the same for the two convex bodies. Its algebraic boundary \(\,\partial _{\mathrm{alg}} {\mathcal {R}}^{ lin}_\mathbf{f}\,\) is an irreducible curve in \({\mathbb {P}}^2\) of degree \(\beta _{ lin}(2,3) = 12\). This is analogous to Fig. 3, where \(n=2\) and \(\partial _{\mathrm{alg}} {\mathcal {R}}^{ lin}_\mathbf{f}\) consists of 8 points on the line \({\mathbb {P}}^1\).

## Computing spectrahedral shadows

The previous section focused on the case when \(\mathbf{f}\) is generic. We here consider the ED problem for overconstrained systems of quadratic equations. These are important in many applications (e.g., tensor approximation, computer vision). For a concrete example see [6, Example 3.7]. These cases do not exhibit the generic behavior. The degree computed for generic \(\mathbf{f}\) in Theorem 5.6 serves as an upper bound for the corresponding degree when \(\mathbf{f}\) is special.

In this section we discuss the SDP-exact region for the ED problem when the constraints can be arbitrary equations of degree two. We change notation by setting \(m=c+p\) and by considering a variety \(V_\mathbf{f}\) of codimension *c* in \({\mathbb {R}}^{n}\) that is cut out by \(c+p\) quadratic polynomials \(\mathbf{f} = (f_1,\ldots ,f_{c+p}) \) in \({x} = (x_1,\ldots ,x_n)\). If \(p \ge 1\) then \(V_\mathbf{f}\) is not a complete intersection.

Recall from Theorem 4.1 that \({\mathcal {R}}^{ ed}_\mathbf{f}\) is a union of spectrahedral shadows, one for each point \(x \in V_\mathbf{f}\). Each shadow lies in the *c*-dimensional affine space through *x* that is normal to \(V_\mathbf{f}\). Thus \({\mathcal {R}}_\mathbf{f}\) is the union over an \((n-c)\)-dimensional family of *c*-dimensional spectrahedral shadows. The algebraic boundary \(\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f}\) can be written in a similar way.

By [20, Theorem 1.1], the *expected degree* of the boundary of each individual shadow is

where *r* runs over the *Pataki range* of possible matrix ranks. A key observation in [20] is that this only depends on the codimension *p* of the projection and not on the dimension of the spectrahedral shadow. Note that the latter dimension is *c* for regular points *x* on \(V_\mathbf{f}\).

We define the *expected degree* of our SDP-exact boundary \(\,\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f}\, \) to be the product

This quantity should be an upper bound for the actual degree of the hypersurface \(\partial _{\mathrm{alg}}({\mathcal {R}}^{ ed}_\mathbf{f})\), and we think that this bound should be attained in situations that are generic enough.

In what follows we present several explicit examples of SDP-exact regions where \(p \ge 1\). We use \(x = (x_1,\ldots ,x_n)\) to denote points on \(V_\mathbf{f}\) and we use \(u = (u_1,\ldots ,u_n)\) for points on \(\partial _{\mathrm{alg}} {\mathcal {R}}^{ed}_\mathbf{f}\). Our discussion elucidates formula (28) and connects it to scenarios seen earlier.

### Example 6.1

(\(n=3,c=2,p=0\)) The equations \(f_1= x_2 - x_1^2\) and \(f_2= x_3 - x_1 x_2\) from Example 4.6 cut out the twisted cubic curve \(V_\mathbf{f}\) in \({\mathbb {R}}^3\). The master spectrahedron \(\mathrm{S}^{ ed}_\mathbf{f}\) is the parabola \(\{ \lambda \in {\mathbb {R}}^2 : \lambda _2^2 < 2 \lambda _1 + 1 \}\). The normal plane at the point \(x=(t,t^2,t^3)\) in \(V_\mathbf{f}\) equals

Since \(c=0\), the image \({x} - \tfrac{1}{2}\mathrm{Jac}_\mathbf{f}({x}) \cdot \mathrm{S}^{ ed}_\mathbf{f}\) is a parabola in that plane, defined by the equation \(u_3^2 + 2 u_2 - 2 (t^3 - t) u_3 + t^6 - 2 t^4 - 2 t^2 - 1 = 0\). Together with (29) we now have two equations in four unknowns \(t,u_1,u_2,u_3\). By eliminating *t* from these two polynomials, we obtain

This irreducible polynomial of degree 8 defines the SDP-exact boundary \(\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_\mathbf{f}\) around \(V_\mathbf{f}\). This surface and the curve \(V_\mathbf{f}\) are shown in the left of Fig. 5. The surface is ruled by the parabolas in the normal bundle of the curve. This ruling is shown on the right in Fig. 5.

Our next example shows that the SDP-exact region is __not__ an invariant of the variety \(V_\mathbf{f}\). It depends on the choice of defining equations. We can have \(\,V_\mathbf{f} = V_\mathbf{f'}\,\) but \(\,{\mathcal {R}}^{ ed}_\mathbf{f} \not = {\mathcal {R}}^{ ed}_{\mathbf{f}'}\).

### Example 6.2

(\(n=3,c=2,p=1\)) We continue Example 6.1 and set \(f_3 = x_1x_3-x_2^2\). Then \(\mathbf{f}' = (f_1,f_2,f_3)\) defines the same twisted cubic curve as before. The master spectrahedron \(\mathrm{S}^{ ed}_\mathbf{f'}\) lives in \({\mathbb {R}}^3\) and has degree 3, like the left body in Fig. 2. Planar projections of such an elliptope have expected degree \(\delta (2,3,*) = 6\). Here, the degree drops to 4 because \(\mathrm{S}^{ ed}_{\mathbf{f}'}\) is degenerate: it is singular at only two points (in \({\mathbb {P}}^3\)). The spectrahedral shadow \({x} - \tfrac{1}{2}\mathrm{Jac}_{\mathbf{f}'}({x}) \cdot \mathrm{S}^{ ed}_{\mathbf{f}'}\) around \({x} = (t,t^2,t^3)\) is defined by a quartic curve in the normal plane. The SDP-exact boundary \(\partial _{\mathrm{alg}} {\mathcal {R}}^{ ed}_{\mathbf{f}'}\) is an irreducible surface of degree 9, with defining polynomial

The above polynomial is also the defining equation of the cut locus of the twisted cubic curve. In fact, the SDP-exact region \(\,{\mathcal {R}}^{ ed}_{{\mathbf {f}}'}\,\) is dense in \({\mathbb {R}}^3\) and only misses the cut locus. This is similar to the behavior we saw in Proposition 5.8 for quadratic hypersurfaces.

### Remark 6.3

Quadratic hypersurfaces and the twisted cubic curve share an important geometric property. They are *varieties of minimal degree*. Blekherman et al. [2] showed that every non-negative quadratic form on a variety of minimal degree admits a sum-of-squares representation. The converse holds as well. This property implies that \(\,{\mathcal {R}}^{ ed}_{{\mathbf {f}}}\,\) is dense in \({\mathbb {R}}^n\) whenever \(\mathbf{f}\) spans the full system of all quadrics vanishing on such a variety \(V_\mathbf{f}\) in \({\mathbb {R}}^n\).

Our bundle of spectrahedral shadows is interesting even for finite varieties (\(c=n\)). We demonstrate this for point configurations in \({\mathbb {R}}^3\). As we remove points from the eight points in Fig. 4, the algebraic degree increases for the region around each remaining point.

### Example 6.4

(\(n=3,c=3,p=1\)) Six general points in \({\mathbb {R}}^3\) are cut out by four quadrics, e.g.,

The master spectrahedron \(\mathrm{S}^{ ed}_\mathbf{f}\) has degree \(n=3\) and it lives in \({\mathbb {R}}^4\). It is the convex hull of its rank-one points, which form a rational curve of degree four. By [20, Example 1.3], the projections of \(\mathrm{S}^{ ed}_\mathbf{f}\) into \({\mathbb {R}}^3\) are spectrahedral shadows of degree \(6 = \delta (2,3,*)\), and each shadow is the convex hull of a curve of degree four. Figure 8 illustrates the six shadows. As predicted in (28), the SDP-exact boundary has degree \(1 \cdot 6 \cdot 6 = 36 \).

### Example 6.5

(\(n=3,c=3,p=2\)) Five general points in \({\mathbb {R}}^3\) are cut out by five quadrics, e.g.,

The master spectrahedron \(\mathrm{S}^{ ed}_\mathbf{f}\) lives in \({\mathbb {R}}^5\). It is an affine hyperplane section of the cone of positive semidefinite \(3 \times 3\) matrices. Its projections into \({\mathbb {R}}^3\) look like the dual elliptope in Fig. 2. Such a spectrahedral shadow has degree \(\delta (3,3,*) = 4+4\), as seen in the left box of the \(p=2\) row in [20, Table 1]. Its boundary is given by four planes and a quartic surface.

Thus the SDP-exact region \({\mathcal {R}}^{ ed}_\mathbf{f}\) consists of five dual elliptopes, as seen in Fig. 9. They touch pairwise along their circular facets. For instance, the region around (0, 0, 0) is bounded by the planes \(\{2 u_1+2 u_2-2 u_3=-3\}\), \(\{2 u_1-2 u_2+2 u_3=-3\}\), \(\{2 u_1-2 u_2-2 u_3=3\}\), \(\{2 u_1+2 u_2+2 u_3=3\}\), and the quartic *Steiner surface*\( \{u_1^2 u_2^2+u_1^2 u_3^2+u_2^2 u_3^2+3 u_1 u_2 u_3 = 0\}\). Again, the prediction in (28) is correct, since the boundary of \({\mathcal {R}}^{ ed}_\mathbf{f}\) has degree \(1 \cdot 5 \cdot (4+4) = 40 \).

The algebraic computation of projections of spectrahedra is very hard (cf. [20, Remark 2.3]). In our situation, it is even harder, since we are dealing with a family of varying projections, one for each point *x* in the variety \(V_\mathbf{f}\). We demonstrate this in Algorithm 1.

Examples 6.2 and 6.4 were computed with Algorithm 1 as is. This works because \(V_\mathbf{f}\) is smooth in both of these cases. If \(V_\mathbf{f}\) is singular then we must saturate the ideal given in step 5 with respect to the ideal of \(c \times c\) minors of \(\mathrm{Jac}_\mathbf{f}({x})\) prior to the elimination in step 6.

Algorithm 1 can be modified to also work when \(p \ge 2\) but the details are subtle. The polynomial \(h(\lambda )\) gets replaced by the ideal of \((c+2-p) \times (c+2-p)\) minors of the matrix \(\mathrm{H}(\lambda )\), and the first row \(\nabla _\lambda (h)\) in the augmented Jacobian in step 4 gets replaced by the Jacobian matrix of that determinantal ideal. This requires great care since these matrices are large.

### Remark 6.6

It would be interesting to study the tangency behavior of the spectrahedral shadows in our bundles. For instance, pairs of convex bodies meet in a point in Fig. 4, they meet in a line segment in Fig. 8, and they meet in a common circular facet in Fig. 9.

## References

- 1.
Blekherman, G., Parrilo, P.A., Thomas, R.R., (Eds.) Semidefinite Optimization and Convex Algebraic Geometry. MOS-SIAM Series on Optimization, vol 13, Philadelphia, PA: SIAM (2013)

- 2.
Blekherman, G., Smith, G., Velasco, M.: Sums of squares and varieties of minimal degree. J. Am. Math. Soc.

**29**, 893–913 (2016) - 3.
Cifuentes, D., Agarwal, S., Parrilo, P., Thomas, R.: On the local stability of semidefinite relaxations. arXiv:1710.04287

- 4.
Cifuentes, D., Ranestad, K., Sturmfels, B., Weinstein, M.: Voronoi cells of varieties. In: International Conference on Effective Methods in Algebraic Geometry (MEGA). To be presented in June (2019)

- 5.
Degen, W.: The cut locus of an ellipsoid. Geom. Dedic.

**67**, 197–198 (1997) - 6.
Draisma, J., Horobeţ, E., Ottaviani, G., Sturmfels, B., Thomas, R.: The Euclidean distance degree of an algebraic variety. Found. Comput. Math.

**16**, 99–149 (2016) - 7.
Graf von Bothmer, H.-C., Ranstad, K.: A general formula for the algebraic degree in semidefinite programming. Bull. Lond. Math. Soc.

**41**, 193–197 (2009) - 8.
Goemans, M., Williamson, D.: Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. J. ACM

**42**(6), 1115–1145 (1995) - 9.
Gouveia, J., Parrilo, P., Thomas, R.: Theta bodies for polynomial ideals. SIAM J. Optim.

**20**, 2097–2118 (2010) - 10.
Harris, J., Tu, L.: On symmetric and skew-symmetric determinantal varieties. Topology

**23**, 71–84 (1984) - 11.
Helmberg, C.: Semidefinite programming for combinatorial optimization, ZIB-Report ZR 00-34, Konrad-Zuse-Zentrum für Informationstechnik Berlin (2000)

- 12.
Laurent, M., Poljak, S.: On a positive semidefinite relaxation of the cut polytope. Linear Algebra Appl.

**223**, 439–461 (1995) - 13.
Lasserre, J.-B.: Global optimization with polynomials and the problem of moments. SIAM J. Optim.

**11**(3), 796–817 (2001) - 14.
Lasserre, J.-B.: Moments, Positive Polynomials and Their Applications. World Scientific, Singapore (2010)

- 15.
Mumford, D.: Algebraic Geometry I: Complex Projective Varieties. Springer, Berlin (1976)

- 16.
Nie, J., Ranestad, K.: Algebraic degree of polynomial optimization. SIAM J. Optim.

**20**, 485–502 (2009) - 17.
Nie, J., Ranestad, K., Sturmfels, B.: The algebraic degree of semidefinite programming. Math. Program.

**122**, 379–405 (2010) - 18.
Scheiderer, C.: Spectrahedral shadows. SIAM J. Appl. Algebra Geom.

**2**(1), 26–44 (2018) - 19.
Shor, N.-Z.: Quadratic optimization problems. Sov. J. Comput. Syst. Sci.

**25**, 1–11 (1987) - 20.
Sinn, R., Sturmfels, B.: Generic spectrahedral shadows. SIAM J. Optim.

**25**, 1209–1220 (2015)

## Acknowledgements

Open access funding provided by Max Planck Society. We thank Thomas Endler, Laureano González-Vega, and Kristian Ranestad for their help with this project. Bernd Sturmfels was partially supported by the Einstein Foundation Berlin and the US National Science Foundation. Diego Cifuentes and Corey Harris were at the MPI-MiS Leipzig during the development of this work.

## Author information

### Affiliations

### Corresponding author

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

### Cite this article

Cifuentes, D., Harris, C. & Sturmfels, B. The geometry of SDP-exactness in quadratic optimization.
*Math. Program.* **182, **399–428 (2020). https://doi.org/10.1007/s10107-019-01399-8

Received:

Accepted:

Published:

Issue Date:

### Keywords

- Semidefinite programming
- Quadratic optimization
- Convex relaxation
- Algebraic degree

### Mathematics Subject Classification

- 90C22 (primary)
- 14C17
- 14P10
- 68W30 (secondary)