---
title: Quadratically Constrained Quadratic Programs (QCQPs) Explained
url: https://www.emergentmind.com/topics/quadratically-constrained-quadratic-programs-qcqp
type: topic
---

# Quadratically Constrained Quadratic Programs (QCQPs) Explained

Quadratically constrained quadratic programs (QCQPs) are optimization problems whose objective and constraints are quadratic functions of the decision variables. A standard real QCQP is
\[
\begin{array}{ll}
\min_{x\in\mathbb R^n} & x^\top A_0x+2a_0^\top x+c_0\\
\text{s.t.} & x^\top A_kx+2a_k^\top x+c_k\le 0,\qquad k=1,\ldots,m,
\end{array}
\]
possibly with quadratic equalities, affine constraints, variable bounds, complex-valued variables, or sparsity restrictions. Convexity is guaranteed when the objective and constraint matrices are positive semidefinite. Indefinite quadratic forms generally produce nonconvex feasible regions or objectives, and general nonconvex QCQPs are NP-hard. QCQPs nevertheless contain important tractable subclasses, admit systematic convex relaxations, and support specialized algebraic, numerical, distributed, and learning-based methods.

## 1. Formulation, convexity, and computational complexity

In the real-valued formulation, a quadratic function has the form
\[
q_k(x)=x^\top A_kx+2a_k^\top x+c_k,
\]
where \(A_k\) is symmetric. A quadratic equality can be represented by two inequalities. Affine constraints can be written separately as \(Ax\le b\), and bounded variable domains are often included explicitly.

A QCQP is convex when
\[
A_0\succeq0,\qquad A_k\succeq0,\quad k=1,\ldots,m.
\]
Under these conditions, the objective is convex and every quadratic inequality defines a convex sublevel set. Positive semidefiniteness, rather than positive definiteness, is sufficient; singular matrices occur in applications such as kernel methods [1909.02638]. Convex QCQPs can be solved globally using convex optimization, although large dense instances may still require substantial matrix factorization and memory.

When one or more quadratic matrices are indefinite, the problem is generally nonconvex. Even a convex quadratic objective combined with one indefinite quadratic constraint can produce a nonconvex feasible set. General nonconvex QCQPs include suitable forms of Boolean quadratic optimization, Max-Cut, multicast beamforming, phase retrieval, optimal power flow, pooling, portfolio optimization, and sparse regression. A polynomial-time algorithm for globally solving arbitrary QCQPs would provide polynomial-time algorithms for these NP-hard problems [1601.02335; 1703.07870].

Several restricted classes have stronger structure. A QCQP with one quadratic constraint has generalized trust-region structure and admits global optimality characterizations under strict feasibility and the existence of a positive-definite Lagrangian combination. The classical trust-region subproblem is the special case in which the constraint matrix is the identity. Large sparse instances of the one-constraint problem can be solved by conjugate-gradient methods that reduce the optimization to a safeguarded scalar secular equation [1807.05387]. QCQPs with forest-like aggregate sparsity can also have exact SDP relaxations under feasibility, compactness, and strict SDP-feasibility assumptions [2009.02638].

Complex QCQPs replace transpose by conjugate transpose and symmetric matrices by Hermitian matrices. A bounded complex QCQP can be written as
\[
\begin{array}{ll}
\min_{x\in\mathbb C^n}&x^*Q_0x+\operatorname{Re}(c_0^*x)+b_0\\
\text{s.t.}&x^*Q_kx+\operatorname{Re}(c_k^*x)+b_k\le0,\\
&\ell\le x\le u.
\end{array}
\]
Finite componentwise bounds are essential for the spatial branch-and-cut procedures developed for bounded complex QCQPs [1705.09057].

## 2. Simultaneous diagonalization and hidden convexity

A central algebraic mechanism for QCQP tractability is simultaneous diagonalization by congruence. A collection of symmetric matrices \(A_1,\ldots,A_m\) is simultaneously diagonalizable via congruence if there exists a nonsingular matrix \(P\) such that
\[
P^\top A_iP
\]
is diagonal for every \(i\).

If the objective and constraint matrices are simultaneously diagonalizable, the substitution \(x=Pz\) makes every quadratic form separable:
\[
x^\top A_ix=z^\top(P^\top A_iP)z
=\sum_{j=1}^n (P^\top A_iP)_{jj}z_j^2.
\]
For homogeneous QCQPs, setting \(y_j=z_j^2\), \(y_j\ge0\), transforms the problem into a linear program over the nonnegative orthant. In the inhomogeneous case, homogenization and constraints of the form
\[
\frac12 z_j^2\le y_j
\]
produce rotated second-order cone constraints. Thus simultaneous diagonalization yields the implication
\[
\text{simultaneous diagonalization}
\Longrightarrow
\text{separable quadratic structure}
\Longrightarrow
\text{LP or SOCP reformulation}.
\]

For two nonsingular symmetric matrices \(A\) and \(B\), simultaneous diagonalization holds if and only if the Jordan canonical form of \(A^{-1}B\) is diagonal. Equivalently, \(A^{-1}B\) must be diagonalizable with only \(1\times1\) Jordan blocks. The singular case requires additional conditions: after a block decomposition, the coupling block between the nonsingular portion of one matrix and the null space of the other must vanish, or the corresponding null-space block must be absent. Nonzero forbidden coupling prevents simultaneous diagonalization.

For a finite collection of matrices, a semidefinite matrix pencil is a nonzero positive-semidefinite linear combination
\[
\sum_{i=1}^m\lambda_iA_i\succeq0.
\]
A definite pencil satisfies the stronger condition
\[
\sum_{i=1}^m\lambda_iA_i\succ0.
\]
With a definite pencil, a congruence can normalize the combination to the identity. Simultaneous diagonalization then reduces to pairwise commutation of the normalized matrices. Ordinary commutation of the original matrices is not necessary for congruence simultaneous diagonalization. Under only a semidefinite, rather than definite, pencil, additional null-space, coupling, and Schur-complement conditions are required.

The relation between simultaneous diagonalization and hidden convexity is developed in “Simultaneous Diagonalization of Matrices and its Applications in Quadratically Constrained Quadratic Programming” [1507.05703]. The result is a sufficient structural certificate: a QCQP may possess an exact SDP or SOCP relaxation for other reasons even when its matrices are not simultaneously diagonalizable.

Trust-region and generalized trust-region problems illustrate this mechanism. The classical trust-region problem is always simultaneously diagonalizable because its two quadratic matrices are \(B\) and \(I\), and \(B\) is orthogonally diagonalizable. For the generalized trust-region subproblem, a regularity condition
\[
B-\lambda A\succ0
\]
implies simultaneous diagonalization, but the algebraic test can identify additional SOCP-solvable instances outside this regular class [1507.05703].

## 3. Lifting, SDP and SOCP relaxations

The standard lifting introduces
\[
X=xx^\top.
\]
Quadratic forms become linear trace expressions:
\[
x^\top A_kx=\operatorname{Tr}(A_kX).
\]
The exact lifted formulation contains the nonconvex conditions
\[
X\succeq0,\qquad \operatorname{rank}(X)=1.
\]
Dropping the rank-one condition gives the standard SDP relaxation:
\[
\begin{array}{ll}
\min_{x,X}&\operatorname{Tr}(A_0X)+2a_0^\top x+c_0\\
\text{s.t.}&\operatorname{Tr}(A_kX)+2a_k^\top x+c_k\le0,\\
&\begin{bmatrix}X&x\\x^\top&1\end{bmatrix}\succeq0.
\end{array}
\]
For minimization, its optimal value is a lower bound on the QCQP optimum. If an optimal lifted matrix has rank one, the relaxation is exact and the original vector can be recovered.

The distinction between value exactness and solution exactness is important. Equality between the SDP and QCQP optimal values does not necessarily imply that a QCQP optimizer exists or that a rank-one SDP optimizer is available. Under suitable attainment and generalized Slater assumptions, saddle-point existence, rank-one primal SDP optimality, strong duality, and equality of QCQP, SDP, and Lagrangian-dual values become equivalent [2303.05874].

For complex QCQPs, the lifted matrix is
\[
Y=
\begin{bmatrix}
1&x^*\\
x&X
\end{bmatrix}\succeq0,
\qquad X=xx^*,
\]
with a rank-one condition in the exact formulation. In bounded complex problems, the \(2\times2\) principal minors satisfy
\[
W_{ii}W_{jj}=W_{ij}^2+T_{ij}^2
\]
for a rank-one Hermitian matrix \(W+\mathrm{i}T\). The SDP relaxation replaces equality by
\[
W_{ii}W_{jj}\ge W_{ij}^2+T_{ij}^2.
\]
Convex-hull inequalities for these local rank-one sets strengthen the relaxation and are particularly relevant to AC optimal power flow [1705.09057].

SOCP relaxations exploit separable quadratic structure or low-order principal-minor conditions. A constraint such as
\[
\frac12z_i^2\le y_i
\]
is representable by a rotated second-order cone. In some settings, a single quadratic equality over a bounded polytope has an exact SOC-representable convex hull, even when the quadratic form is indefinite, degenerate, or singular. The constructive representation may require exponentially many disjunctive pieces, so SOC representability does not imply a compact or polynomial-size formulation [1812.10160].

Penalized SDP methods modify the lifted objective to encourage rank-one consistency. Given a reference point \(\hat x\), the penalty
\[
\operatorname{tr}(X)-2\hat x^\top x+\hat x^\top\hat x
\]
equals \(\|x-\hat x\|_2^2\) when \(X=xx^\top\). Sequentially updating \(\hat x\) produces a convex rank-promoting procedure that can recover feasible near-optimal points. Under GLICQ, proximity to the feasible set, and a sufficiently large penalty, rank-one recovery is established locally, but the outer sequential procedure is not a general global-optimality method [2004.14328].

## 4. Exactness, sparsity, and global optimality

Exactness of the SDP relaxation can arise from several structural mechanisms.

Forest-structured QCQPs provide one such mechanism. The aggregate sparsity graph contains an edge whenever some quadratic data matrix has a nonzero off-diagonal entry. If this graph is a forest, positive-semidefinite matrices supported on it have structural rank properties. Under feasibility, compactness, and strict SDP feasibility, infeasibility of certain dual systems forces the dual slack matrix to have rank at least \(n-1\). Complementary slackness then implies that every optimal primal SDP matrix has rank at most one. Tridiagonal and arrow structures are important special cases [2009.02638].

Simultaneous tridiagonalization extends the result to matrices that are dense in their original coordinates but can be transformed by a nonsingular congruence into tridiagonal form. In particular, a nonsingular two-matrix pencil can provide a route to simultaneous tridiagonalization. This gives exact SDP relaxations for important two-form problems, including generalized trust-region subproblems, under the stated feasibility and regularity assumptions [2009.02638].

Convex-hull exactness is stronger than equality of optimal values. For the projected SDP epigraph, the relevant question is whether every point outside the original nonconvex epigraph has a nonzero rounding direction. The cone of convex Lagrange multipliers and its polar describe the projected SDP set. Under a strict convex-multiplier condition, a tractable direction space based on the minimal active face of the polar cone provides a sufficient condition for convex-hull exactness. If the polar cone is facially exposed, the condition is also necessary [2403.04752].

Sparse QCQPs add a cardinality constraint:
\[
\|x\|_0\le k.
\]
For the homogeneous problem
\[
\max_x x^\top A_0x
\quad\text{s.t.}\quad
x^\top A_1x=1,\quad \|x\|_0\le k,
\]
with \(A_1\succ0\), the outer difficulty is support selection. For a fixed support, the problem is a generalized eigenvalue problem. Linear combinations of principal minors generate polynomials whose largest real roots provide certified lower bounds on the sparse optimum. Greedy conditioning improves these roots while selecting a support. The resulting method is polynomial-time for the tested sparse regression and sparse PCA settings, but the practical support-selection procedure remains heuristic [2208.11143].

A more direct local treatment of sparse QCQPs uses \(P\)-stationarity and semismooth Newton methods. The sparse projection retains the largest-magnitude entries, and a nonsmooth system combines this projection with Fischer–Burmeister complementarity equations for quadratic and linear inequalities. Under restricted LICQ and a strong second-order condition, the generalized Jacobian is nonsingular, and the resulting SNSQP method converges locally quadratically. Sparsity is maintained at every iterate, and the reduced Newton system depends on the support size and active constraints rather than the full ambient dimension [2503.15109].

These exactness results are sufficient rather than necessary. A QCQP may have an exact SDP or SOCP relaxation without satisfying simultaneous diagonalization, forest sparsity, convex-hull direction conditions, or the corresponding rank criteria.

## 5. Algorithms for general nonconvex QCQPs

No single algorithm provides a generally efficient and globally exact solution method for arbitrary nonconvex QCQPs. Existing approaches differ in whether they seek rigorous bounds, feasible points, local optima, or scalable approximate solutions.

### Relaxation-based global methods

Semidefinite relaxation produces lower bounds but may return a high-rank matrix. Spatial branch-and-cut strengthens SDP relaxations using valid inequalities, bound tightening, and branching on local rank-one violations. For bounded complex QCQPs, the smallest eigenvalue of a \(2\times2\) principal submatrix provides a local measure of rank-one violation. Branching strategies include most violated with strong branching, most violated with worst-case bounds, and reliability branching. The method has been applied to AC optimal power flow and real BoxQP [1705.09057].

The convex hull of a single quadratic equality over a bounded polytope can be represented exactly by SOC constraints, but the construction may be large. This result is therefore more naturally interpreted as a convexification theorem or a potential branch-and-bound node relaxation than as a universally compact solver [1812.10160].

Iterative rank minimization starts with the SDP relaxation and solves a sequence of convex SDPs. At iteration \(k\), eigenvectors associated with the smallest eigenvalues of the previous lifted matrix define a rank surrogate, and the surrogate is increasingly weighted. The extended Uzawa algorithm solves the convex subproblems using projected dual updates. The outer method is intended to approach a rank-one solution, but its guarantees are local or conditional and do not establish global optimality for arbitrary QCQPs [1609.02609].

### Decomposition and local-to-global heuristics

Consensus-ADMM duplicates the decision vector, assigning one local variable to each quadratic constraint. Each local update is then a QCQP with one quadratic constraint, or QCQP-1. QCQP-1 has a generalized trust-region strong-duality property and can be solved globally through a scalar multiplier equation. Local updates can be parallelized, eigenvalue decompositions can be cached, and rank-one constraints admit memory-efficient aggregation. The method has been applied to multicast beamforming and phase retrieval. Its convergence result is conditional: under consensus and successive-difference convergence, limit points are KKT points. It does not provide general global convergence or global optimality for nonconvex QCQPs [1601.02335].

The Suggest-and-Improve framework separates candidate generation from local repair and objective improvement. Suggest methods include random, spectral, Lagrangian, and SDP-based candidates. Improve methods include structure-specific rounding, coordinate descent, penalty convex–concave procedures, and ADMM. Quality is measured lexicographically: maximum constraint violation has priority, followed by objective value. The framework is modular and supports parallel candidate generation, but it has no universal feasibility, convergence, approximation, or optimality guarantee [1703.07870].

Penalized SDP is another sequential method. It preserves the convex lifted constraints while adding a proximity and rank-consistency penalty. Once a feasible LICQ-regular reference point is reached, sufficiently large penalties preserve feasibility and do not increase the objective. In general, penalty selection, feasibility proximity, and GLICQ verification are difficult, and the method does not certify global optimality [2004.14328].

### Specialized numerical methods

For one quadratic constraint, a conjugate-gradient-based algorithm solves positive-definite linear systems
\[
(A+\lambda B)x=-(a+\lambda b)
\]
while searching for the multiplier \(\lambda\) satisfying the secular equation. The admissible multiplier interval is determined by generalized eigenvalues. Hard cases at singular endpoints are handled through null-space corrections. The method is matrix-free apart from sparse matrix-vector products and is designed for large sparse instances [1807.05387].

For convex high-dimensional QCQPs, PC\(^2\)PM is a distributed predictor-corrector primal-dual method. It stores matrix columns across computing units, performs scalar-level primal updates, and uses adaptive step sizes. Under convexity, Slater’s condition, existence of an optimum, and prescribed step-size conditions, the full primal-dual sequence converges globally to a saddle point. The method is synchronous and has no explicit convergence-rate theorem; communication eventually limits speedup [1909.02638].

HPIPM provides dense, multistage optimal-control, and tree-structured QCQP formulations with primal-dual interior-point solvers. It targets convex QCQPs with one-sided convex quadratic inequalities, reusing QP KKT assembly, Riccati recursions, condensing, BLASFEO kernels, and structured factorizations. The QCQP-specific quantities are the multiplier-dependent Hessian and the quadratic-constraint Jacobian, which are updated at every iteration. The framework is intended for MPC, SQP, sequential QCQP, and embedded optimal control rather than general nonconvex globalization [2112.11872].

## 6. Applications, learning, and emerging approaches

QCQPs arise in signal processing, wireless communications, machine learning, power systems, control, portfolio theory, chemical engineering, and combinatorial optimization. Typical applications include multicast beamforming, phase retrieval, AC optimal power flow, sparse regression, sparse PCA, sparse canonical correlation analysis, sparse portfolio selection, system identification, energy-constrained optimal control, and ellipsoidal model-predictive-control constraints.

Learning-based methods address two distinct tasks. Graph neural networks can represent convex QCQPs using a tripartite graph with variable nodes, quadratic-term nodes, and constraint nodes. The architecture is designed to preserve quadratic interactions and permutation invariance or equivariance. Under convexity, sufficiently expressive message-passing GNNs can approximate feasibility, boundedness, optimal value, and the minimum-norm optimal solution in probability. The result is an approximation-in-measure theorem, not exact recovery on every instance, and the architecture has Weisfeiler–Leman separation limitations. The corresponding representation guarantee fails for general nonconvex QCQPs [2411.13805].

Another learning approach predicts whether LP or SDP relaxation is likely to provide the stronger lower bound. Features include eigenvalues, negative-eigenvalue ratios, ranks, convexity patterns, finite-bound indicators, and sparsity classes such as diagonal, hollow, bipartite, tree, chordal, and planar. The model predicts
\[
\delta=\frac{z_{\mathrm{LP}}-z_{\mathrm{SDP}}}
{|z_{\mathrm{LP}}|+|z_{\mathrm{SDP}}|}.
\]
A positive value favors LP, whereas a negative value favors SDP. The dimension-independent feature representation is designed to transfer across different numbers of variables and constraints. The method selects which relaxation to solve; it does not strengthen either relaxation or provide an end-to-end global-optimization guarantee [2501.03954].

Variational quantum methods encode QCQP variables in the amplitudes of a quantum state. For a complex vector,
\[
|\psi(\theta)\rangle
=\eta^{-1/2}\sum_{j=1}^N x_j|\phi_j\rangle,
\qquad
\eta=\|x\|_2^2.
\]
The state dimension requires
\[
q=\lceil\log_2 N\rceil
\]
qubits, up to padding. Quadratic forms are estimated through expectation values, while a classical primal-dual interior-point method updates variational parameters, scale variables, and dual multipliers. The approach has been tested on random OPF and Max-Cut instances. Its logarithmic qubit count does not imply logarithmic total cost: state preparation, measurement, derivative estimation, classical Newton systems, and noise remain significant. The method is a hybrid heuristic and does not establish global optimality or quantum computational advantage [2309.10564].

Further developments include relaxation selection, direct sparse-support Newton methods, exact SDP-extension results, and convex-hull characterizations. Across these directions, a recurring distinction remains essential:

- **Convex QCQPs** admit global optimization through convex methods, although large-scale computation can be difficult.
- **Structured nonconvex QCQPs** may have exact LP, SOCP, or SDP formulations because of diagonalization, sparsity, trust-region structure, or special multiplier geometry.
- **General nonconvex QCQPs** require relaxations, branch-and-bound, decomposition, heuristics, or local methods, none of which universally combines scalability with global optimality.
- **Rank-one recovery** is stronger than equality of relaxation values.
- **Feasibility, attainment, strong duality, and constraint qualifications** are separate properties and must not be inferred solely from algebraic structure or numerical performance.

The contemporary QCQP literature therefore spans exact convexification theorems, structural hidden-convexity certificates, sparse and distributed numerical algorithms, branch-and-cut global methods, sequential rank-promotion schemes, and learned or quantum-assisted approximations. Their applicability is determined less by the QCQP label itself than by definiteness, sparsity, boundedness, number of constraints, rank structure, separability, and the availability of suitable constraint qualifications.

Source: https://www.emergentmind.com/topics/quadratically-constrained-quadratic-programs-qcqp