Quadratic programming
≈ 5 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
Quadratic programming (QP) is the process of solving certain mathematical optimization problems involving quadratic functions. Specifically, one seeks to optimize (minimize or maximize) a multivariate quadratic function subject to linear constraints on the variables. Quadratic programming is a type of nonlinear programming. "Programming" in this context refers to a formal procedure for solving mathematical problems. This usage dates to the 1940s and is not specifically tied to the more recent notion of "computer programming." To avoid confusion, some practitioners prefer the term "optimization" — e.g., "quadratic optimization."
Quadratic programming (QP) is the process of solving certain mathematical optimization problems involving quadratic functions. Specifically, one seeks to optimize (minimize or maximize) a multivariate quadratic function subject to linear constraints on the variables. Quadratic programming is a type of nonlinear programming. "Programming" in this context refers to a formal procedure for solving mathematical problems. This usage dates to the 1940s and is not specifically tied to the more recent notion of "computer programming." To avoid confusion, some practitioners prefer the term "optimization" — e.g., "quadratic optimization."
Problem formulation
The quadratic programming problem with variables and constraints can be formulated as follows. Given: a real-valued, -dimensional vector , an -dimensional real symmetric matrix , an -dimensional real matrix , and an -dimensional real vector , the objective of quadratic programming is to find an -dimensional vector , that will where denotes the vector transpose of , and the notation means that every entry of the vector is less than or equal to the corresponding entry of the vector (component-wise inequality).
Constrained least squares
As a special case when is symmetric positive-definite, the cost function reduces to least squares: where follows from the Cholesky decomposition of and . Conversely, any such constrained least squares program can be equivalently framed as a quadratic programming problem, even for a generic non-square matrix.
Generalizations
When minimizing a function in the neighborhood of some reference point , is set to its Hessian matrix and is set to its gradient . A related programming problem, quadratically constrained quadratic programming, can be posed by adding quadratic constraints on the variables.
Solution methods
For general problems a variety of methods are commonly used, including interior point, active set, augmented Lagrangian, conjugate gradient, gradient projection, extensions of the simplex algorithm. In the case in which is positive definite, the problem is a special case of the more general field of convex optimization.
Equality constraints
Quadratic programming is particularly simple when is positive definite and there are only equality constraints; specifically, the solution process is linear.
By using Lagrange multipliers and seeking the extremum of the Lagrangian, it may be readily shown that the solution to the equality constrained problem \text{Minimize} \quad \tfrac{1}{2} \mathbf{x}^\mathrm{T} Q\mathbf{x} + \mathbf{c}^\mathrm{T} \mathbf{x} \text{subject to} \quad E\mathbf{x} =\mathbf{d} is given by the linear system \begin{bmatrix} Q & E^\top \\ E & 0 \end{bmatrix} \begin{bmatrix} \mathbf x \\ \lambda \end{bmatrix} Z \mathbf{y} = \mathbf x where has dimension of minus the number of constraints.
Then E Z \mathbf{y} = \mathbf 0 and if is chosen so that the constraint equation will be always satisfied. Finding such entails finding the null space of , which is more or less simple depending on the structure of .
Substituting into the quadratic form gives an unconstrained minimization problem: \tfrac{1}{2} \mathbf{x}^\top Q\mathbf{x} + \mathbf{c}^\top \mathbf{x} \quad \implies \quad \tfrac{1}{2} \mathbf{y}^\top Z^\top Q Z \mathbf{y} + \left(Z^\top \mathbf{c}\right)^\top \mathbf{y} the solution of which is given by: Z^\top Q Z \mathbf{y} = -Z^\top \mathbf{c} Under certain conditions on , the reduced matrix will be positive definite. It is possible to write a variation on the conjugate gradient method which avoids the explicit calculation of .
Lagrangian duality
The Lagrangian dual of a quadratic programming problem is also a quadratic programming problem. To see this let us focus on the case where and is positive definite. We write the Lagrangian function as L(x,\lambda) = \tfrac{1}{2} x^\top Qx + \lambda^\top (Ax-b). Defining the (Lagrangian) dual function as g(\lambda) = \inf_{x} L(x,\lambda) , we find an infimum of , using \nabla_{x} L(x,\lambda)=0 and positive-definiteness of : x^* = -Q^{-1} A^\top \lambda. Hence the dual function is g(\lambda) = -\tfrac{1}{2} \lambda^\top AQ^{-1}A^\top \lambda - \lambda^\top b, and so the Lagrangian dual of the quadratic programming problem is \text{maximize}_{\lambda\geq 0} \quad -\tfrac{1}{2} \lambda^\top AQ^{-1} A^\top \lambda - \lambda^\top b. Besides the Lagrangian duality theory, there are other duality pairings (e.g. Wolfe, etc.).
Run-time complexity
Solvers and scripting (programming) languages
See also
Sequential quadratic programming Linear programming Critical line method
References
Further reading
A6: MP2, pg.245.
External links
A page about quadratic programming NEOS Optimization Guide: Quadratic Programming Quadratic Programming Cubic programming and beyond, in Operations Research stack exchange
Text derived from https://en.wikipedia.org/w/index.php?oldid=1378808532 under CC BY-SA 4.0; modifications have been made.