3 Conic quadratic optimization¶
This chapter extends the notion of linear optimization with quadratic cones. Conic quadratic optimization, also known as second-order cone optimization, is a straightforward generalization of linear optimization, in the sense that we optimize a linear function under linear (in)equalities with some variables belonging to one or more (rotated) quadratic cones. We discuss the basic concept of quadratic cones, and demonstrate the surprisingly large flexibility of conic quadratic modeling.
3.1 Cones¶
Since this is the first place where we introduce a non-linear cone, it seems suitable to make our most important definition:
A set
for every
we have ,for every
and we have .
For example a linear subspace of
3.1.1 Quadratic cones¶
We define the
The geometric interpretation of a quadratic (or second-order) cone is shown in Fig. 3.1 for a cone with three variables, and illustrates how the boundary of the cone resembles an ice-cream cone. The 1-dimensional quadratic cone simply states nonnegativity

Fig. 3.1 Boundary of quadratic cone
3.1.2 Rotated quadratic cones¶
An
As the name indicates, there is a simple relationship between quadratic and rotated quadratic cones. Define an orthogonal transformation
Then it is easy to verify that
and since
then
and similarly we see that
Thus, one could argue that we only need quadratic cones
3.2 Conic quadratic modeling¶
In the following we describe several convex sets that can be modeled using conic quadratic formulations or, as we call them, are conic quadratic representable.
3.2.1 Absolute values¶
In Sec. 2.2.2 (Absolute value) we saw how to model
3.2.2 Euclidean norms¶
The Euclidean norm of
essentially defines the quadratic cone, i.e.,
The epigraph of the squared Euclidean norm can be described as the intersection of a rotated quadratic cone with an affine hyperplane,
3.2.3 Convex quadratic sets¶
Assume
may be rewritten as
Since
is a convex set and there exists a matrix
(see Sec. 6 (Semidefinite optimization) for properties of semidefinite matrices). For instance
and we have an equivalent characterization of (3.5) as
Frequently
where
and hence
is a conic quadratic representation of (3.5) in this case.
3.2.4 Second-order cones¶
A second-order cone is occasionally specified as
where
or equivalently
As will be explained in Sec. 8 (Duality in conic optimization), we refer to (3.8) as the dual form and (3.9) as the primal form. An alternative characterization of (3.7) is
which shows that certain quadratic inequalities are conic quadratic representable.
3.2.5 Simple sets involving power functions¶
Some power-like inequalities are conic quadratic representable, even though it need not be obvious at first glance. For example, we have
or in a similar fashion
For a more complicated example, consider the constraint
This is equivalent to a statement involving two cones and an extra variable
because
In practice power-like inequalities representable with similar tricks can often be expressed much more naturally using the power cone (see Sec. 4 (The power cones)), so we will not dwell on these examples much longer.
3.2.6 Rational functions¶
A general non-degenerate rational function of one variable
with variables
We can generalize it to a quadratic-over-linear function
can be written as
In both cases the argument boils down to the observation that the target function is a sum of an affine expression and the inverse of a positive affine expression, see Sec. 3.2.5 (Simple sets involving power functions).
3.2.7 Harmonic mean¶
Consider next the hypograph of the harmonic mean,
It is not obvious that the inequality defines a convex set, nor that it is conic quadratic representable. However, we can rewrite it in the form
which suggests the conic representation:
Alternatively, in case
As this representation generalizes the harmonic mean to all points
3.2.8 Quadratic forms with one negative eigenvalue¶
Assume that
where
is equivalent to
This shows
3.2.9 Ellipsoidal sets¶
The set
describes an ellipsoid centred at
3.3 Conic quadratic case studies¶
3.3.1 Quadratically constrained quadratic optimization¶
A general convex quadratically constrained quadratic optimization problem can be written as
where all
where
Assume next that
3.3.2 Robust optimization with ellipsoidal uncertainties¶
Often in robust optimization some of the parameters in the model are assumed to be unknown exactly, but there is a simple set describing the uncertainty. For example, for a standard linear optimization problem we may wish to find a robust solution for all objective vectors
A common approach is then to optimize for the worst-case scenario for
The worst-case objective can be evaluated as
where we used that
which can be posed as a conic quadratic problem
3.3.3 Markowitz portfolio optimization¶
In classical Markowitz portfolio optimization we consider investment in
and covariance
The return of our investment is also a random variable
and variance (or risk)
We then wish to rebalance our portfolio to achieve a compromise between risk and expected return, e.g., we can maximize the expected return given an upper bound
Suppose we factor
In practice both the average return and covariance are estimated using historical data. A recent trend is then to formulate a robust version of the portfolio optimization problem to combat the inherent uncertainty in those estimates, e.g., we can constrain
It is also common that the data for a portfolio optimization problem is already given in the form of a factor model
3.3.4 Maximizing the Sharpe ratio¶
Continuing the previous example, the Sharpe ratio defines an efficiency metric of a portfolio as the expected return per unit risk, i.e.,
where
The objective has the same nature as a quotient of two affine functions we studied in Sec. 2.2.5 (Homogenization). We reformulate the problem in a similar way, introducing a scalar variable
Since a positive
Thus, we obtain the following conic problem for maximizing the Sharpe ratio,
and we recover
3.3.5 A resource constrained production and inventory problem¶
The resource constrained production and inventory problem [Zie82] can be formulated as follows:
where
so that
is the average holding costs for product
and hence
is the average ordering costs for product
It is not always possible to produce a fractional number of items. In such case