alongside . The easiest means of approaching this system is direct solution (for example, LU factorization), which for small problems is very practical. For large problems, the system poses some unusual difficulties, most notably that the problem is never positive definite (even if is), making it potentially very difficult to find a good numeric approach, and there are many approaches to choose from dependent on the problem. If the constraints don't couple the variables too tightly, a relatively simple attack is to change the variables so that constraints are unconditionally satisfied. For example, suppose (generalizing to nonzero is straightforward). Looking at the constraint equations: introduce a new variable defined by where has dimension of minus the number of constraints. Then 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: the solution of which is given by: 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 QP is also a QP. To see this let us focus on the case where and is positive definite. We write the Lagrangian function as Defining the (Lagrangian) dual function as , we find an infimum of , using and positive-definiteness of : Hence the dual function is and so the Lagrangian dual of the QP is Besides the Lagrangian duality theory, there are other duality pairings (e.g. Wolfe, etc.). Complexity For positive definite , the ellipsoid method solves the problem in (weakly) polynomial time. If, on the other hand, is indefinite, then the problem is NP-hard. There can be several stationary points and local minima for these non-convex problems. In fact, even if has only one negative eigenvalue, the problem is (strongly) NP-hard. Integer constraints There are some situations where one or more elements of the vector will need to take on integer values. This leads to the formulation of a mixed-integer quadratic programming (MIQP) problem. Applications of MIQP include water resources and the construction of index funds. Solvers and scripting (programming) languages See also Sequential quadratic programming Linear programming Critical line method References Further reading A6: MP2, pg.245. External