ILOG CPLEX 11.0 User's Manual > Continuous Optimization > Solving Problems with a Quadratic Objective (QP) > Entering QPs > Matrix View

In the matrix view, commonly found in textbook presentations of QP, the objective function is defined as 1/2 xTQx + cTx, where Q must be symmetric and positive semi-definite for a minimization problem, or negative semi-definite for a maximization problem. This view is supported by the MPS file format and the Callable Library routines, where the quadratic objective function information is specified by providing the matrix Q. Thus, by definition, the factor of 1/2 must be considered when entering a model using the matrix view, as it will be implicitly assumed by the optimization routines.

Similarly, symmetry of the Q matrix data is required; the MPS reader will return an error status code if the file contains unequal off-diagonal components, such as a nonzero value for one and zero (or omitted) for the other.

This symmetry restriction applies to quadratic programming input formats rather than the quadratic programming problem itself. For models with an asymmetric Q matrix, either express the quadratic terms algebraically, as described in Algebraic View, or provide as input (Q + Q')/2 instead of Q. This latter approach relies on the identity Q = (Q + Q')/2 + (Q - Q')/2 combined with the fact that (Q - Q')/2 contributes 0 (zero) to the quadratic objective.