What is Quadratic Programming?

Quadratic programming is a method used to optimize a multivariable quadratic function that may or may not be linearly constrained. Many real world problems, such as optimizing a company’s portfolio or reducing a manufacturer’s costs, can be described using a quadratic program. If the objective function is convex then a feasible solution may exist and may be solved by known algorithms such as the expanded simplex algorithm. Methods exist for solving some non-convex quadratic functions but they are complicated and not readily available.

Mathematical optimization techniques are used in quadratic programming to minimize an objective function. The objective function is comprised of a number of decision variables that may or may not be bounded. The decision variables have powers 0, 1 or 2. The objective function may be subjected to a number of linear equality and inequality constraints concerning the decision variables. An example of quadratic programming is: minimize f(x,y) = x2 + 3y2 – 12y + 12 where x + y = 6 and x > 0 and y ≥ 0.

It is often interesting to use multivariate quadratic functions to describe real world problems. For instance, using modern portfolio theory, a financial analyst will try to optimize a company’s portfolio by choosing the proportion of assets that minimize the risk associated with a given expected return. A quadratic equation made up of asset weights and the correlation between assets describes the portfolio variance which can be minimized using quadratic programming. Another example might be a manufacturer that uses a quadratic equation to describe the relationship between different quality components and a product’s cost. The manufacturer can minimize costs while maintaining certain standards by adding linear constraints to the quadratic program.

One of the most important conditions in solving a quadratic program is the convexity of the objective equation. The convexity of a quadratic function is determined by the Hessian or the matrix of its second derivatives. The function is called convex if the Hessian matrix is either positive definite or positive semi-definite, that is if the all the eigenvalues are positive or non-negative respectively. If the Hessian is positive and a feasible solution exists, then that local minimum is unique and is a global minimum. If the Hessian is semi-positive a feasible solution may not be unique. Non-convex quadratic functions may have local or global minimums, but they are more difficult to determine.

There are many approaches to solving a convex quadratic function using quadratic programming. The most common approach is an expansion of the simplex algorithm. Some other methods include the interior point or barrier method, active set method, and the conjugate gradient method. These methods are integrated into certain programs such as Mathematica and Matlab and they are available in libraries for many programming languages.