Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

As we saw in the previous section, any (linear) least squares problem can be interpreted as an (unconstrained) QP.

In this section, we study in detail problems of the form

minimize⁡12x⊤Qx−p⊤xsubject to⁡x∈Rn\begin{array}{ll} \minimize& \frac{1}{2}x^\top Q x -p^\top x\\ \st & x \in \mathbb{R}^n \end{array}

where Q∈Rn×nQ \in \mathbb{R}^{n\times n} is symmetric (Q⊤=QQ^\top = Q) and where p∈Rnp \in \mathbb{R}^n is arbitrary. We address the following questions:

Preliminaries

Gradient and Hessian of the objective function of QP

For the objective f0(x)=12x⊤Qx−p⊤xf_0(x) = \frac{1}{2}x^\top Q x -p^\top x, the gradient and Hessian are easily found as

∇f0(x)=12(Q+Q⊤)x−p=Qx−p∇2f0(x)=Q\begin{align*} \nabla f_0(x) &= \frac{1}{2}(Q+Q^\top)x -p = Qx-p\\ \nabla^2 f_0(x) &= Q \end{align*}

Diagonalization of the Hessian

Since QQ is symmetric, the spectral theorem shows QQ is diagonalizable by an orthogonal matrix UU (i.e., U⊤U=UU⊤=InU^\top U = UU^\top = I_n) such that

Q=U⊤DU, where D=[λ1(0)⋱(0)λn] with λ1≤λ2≤…≤λn.Q = U^\top D U, \text{ where } D = \begin{bmatrix} \lambda_1 & & (0)\\ & \ddots & \\ (0) & &\lambda_n \end{bmatrix}\quad \text{ with }\lambda_1 \leq \lambda_2 \leq \ldots \leq \lambda_n.

The properties of the eigenvalues of the Hessian permits to analyze the behavior of QPs.

Typology of solutions

Case 1: λ1=λmin⁡(Q)<0\lambda_1 = \lambda_{\min}(Q) < 0

Let u1∈Rnu_1 \in \mathbb{R}^n be the eigenvector associated with λ1\lambda_1. For any z∈Rz \in \mathbb{R},

f0(zu1)=λ12z2−z p⊤u1→∣z∣→+∞−∞f_0(zu_1) = \frac{\lambda_1}{2} z^2 - z\, p^\top u_1 \xrightarrow[|z| \to +\infty]{} -\infty

This shows that ff is unbounded below. Hence, the QP (1) has no solutions.

Case 2: λ1=λmin⁡(Q)=0\lambda_1 = \lambda_{\min}(Q) = 0

This case corresponds to Q⪰0Q \succeq 0 (positive semidefinite).

Case 3: λ1=λmin⁡(Q)>0\lambda_1 = \lambda_{\min}(Q) > 0

This case corresponds to Q≻0Q \succ 0 (positive definite).

The matrix QQ is invertible since all its eigenvalues are strictly positive. Moreover ff is strictly convex (because ∇2f≻0\nabla^2 f \succ 0) and therefore there is a unique solution, given by x^=Q−1p\hat{x} = Q^{-1}p