10 Quadratic optimization¶
In this chapter we discuss convex quadratic and quadratically constrained optimization. Our discussion is fairly brief compared to the previous chapters for three reasons; (i) convex quadratic optimization is a special case of conic quadratic optimization, (ii) for most convex problems it is actually more computationally efficient to pose the problem in conic form, and (iii) duality theory (including infeasibility certificates) is much simpler for conic quadratic optimization. Therefore, we generally recommend a conic quadratic formulation, see Sec. 3 (Conic quadratic optimization) and especially Sec. 3.2.3 (Convex quadratic sets).
10.1 Quadratic objective¶
A standard (convex) quadratic optimization problem
with
10.1.1 Geometry of quadratic optimization¶
Quadratic optimization has a simple geometric interpretation; we minimize a convex quadratic function over a polyhedron., see Fig. 10.1. It is intuitively clear that the following different cases can occur:
The optimal solution
is at the boundary of the polyhedron (as shown in Fig. 10.1). At one of the hyperplanes is tangential to an ellipsoidal level curve.The optimal solution is inside the polyhedron; this occurs if the unconstrained minimizer
(i.e., the center of the ellipsoidal level curves) is inside the polyhedron. From now on denotes the pseudoinverse of ; in particular if is positive definite.If the polyhedron is unbounded in the opposite direction of
, and if the ellipsoid level curves are degenerate in that direction (i.e., ), then the problem is unbounded. If , then the problem cannot be unbounded.The problem is infeasible, i.e.,
.

Fig. 10.1 Geometric interpretation of quadratic optimization. At the optimal point
Possibly because of its simple geometric interpretation and similarity to linear optimization, quadratic optimization has been more widely adopted by optimization practitioners than conic quadratic optimization.
10.1.2 Duality in quadratic optimization¶
The Lagrangian function (Sec. 8.3 (Lagrangian and the dual problem)) for (10.1) is
with Lagrange multipliers
i.e.
which can be substituted into (10.2) to give a dual function
Thus we get a dual problem
or alternatively, using the optimality condition
Note that this is an unusual dual problem in the sense that it involves both primal and dual variables.
Weak duality, strong duality under Slater constraint qualification and Farkas infeasibility certificates work similarly as in Sec. 8 (Duality in conic optimization). In particular, note that the constraints in both (10.1) and (10.4) are linear, so Lemma 2.4 applies and we have:
10.1.3 Conic reformulation¶
Suppose we have a factorization
with dual problem
Note that in an optimal primal-dual solution we have
10.2 Quadratically constrained optimization¶
A general convex quadratically constrained quadratic optimization problem is
where
characterize convex sets, and therefore cannot be included.
10.2.1 Duality in quadratically constrained optimization¶
The Lagrangian function for (10.7) is
where
From the Lagrangian we get the first-order optimality conditions
and similar to the case of quadratic optimization we get a dual problem
or equivalently
Using a general version of the Schur Lemma for singular matrices, we can also write (10.9) as an equivalent semidefinite optimization problem,
Feasibility in quadratically constrained optimization is characterized by the following conditions (assuming Slater constraint qualification or other conditions to exclude ill-posed problems):
Either the primal problem (10.7) is feasible or there exists
satisfying(10.12)¶Either the dual problem (10.10) is feasible or there exists
satisfying(10.13)¶
To see why the certificate proves infeasibility, suppose for instance that (10.12) and (10.7) are simultaneously satisfied. Then
and we have a contradiction, so (10.12) certifies infeasibility.
10.2.2 Conic reformulation¶
If
The primal and dual solution of (10.14) recovers the primal and dual solution of (10.7) similarly as for quadratic optimization in Sec. 10.1.3 (Conic reformulation). Let us see for example, how a (conic) primal infeasibility certificate for (10.14) implies an infeasibility certificate in the form (10.12). Infeasibility in (10.14) involves only the last set of conic constraints. We can derive the infeasibility certificate for those constraints from Lemma 8.3 or by directly writing the Lagrangian
The dual maximization problem is unbounded (i.e. the primal problem is infeasible) if we have
We claim that
10.3 Example: Factor model¶
Recall from Sec. 3.3.3 (Markowitz portfolio optimization) that the standard Markowitz portfolio optimization problem is
where
Both problems (10.15) and (10.16) are equivalent in the sense that they describe the same Pareto-optimal trade-off curve by varying
Next consider a factorization
for some
and
respectively. Given
Data matrix
Factor model
For a factor model we have
where
of dimensions