Skip to content

Cheatsheet: Standard Formulations & Transformations ​

1 Standard Formulations ​

1.1 Linear Programming (LP) ​

The objective and constraints are all affine.

General Form:

minxcTxs.t.Gx⪯h,Ax=b

Standard Form:

minxcTxs.t.Ax=b,x⪰0

Inequality Form:

minxcTxs.t.Ax⪯b

1.2 Quadratic Programming (QP) ​

The objective is quadratic (with P∈S+n), while constraints remain linear.

minx12xTPx+qTx+rs.t.Gx⪯h,Ax=b

1.3 Quadratically Constrained Quadratic Programming (QCQP) ​

Both the objective and constraints are quadratic. For convexity, Pi∈S+n.

minx12xTP0x+q0Tx+r0s.t.12xTPix+qiTx+ri≤0,i=1,…,mAx=b

1.4 Second-Order Cone Programming (SOCP) ​

Constraints involve the ℓ2-norm (Lorentz cone).

minxfTxs.t.∥Aix+bi∥2≤ciTx+di,i=1,…,mFx=g

1.5 Semidefinite Programming (SDP) ​

The most powerful class, where constraints are Linear Matrix Inequalities (LMI).

minxcTxs.t.x1F1+⋯+xnFn+G⪯0Ax=b

1.6 Conic Programming (CP) ​

The most general form, minimizing a linear function over the intersection of an affine set and a convex cone K:

minxcTxs.t.Ax=b,x∈K

1.7 Hierarchy ​

LP⊂QP⊂QCQP⊂SOCP⊂SDP⊂CP

2 Transformations and Reductions ​

2.1 LP to Other Forms ​

  • General Form → Standard Form: Introduce slack variables s⪰0 such that Gx+s=h, and replace free variables x with x+−x− where x+,x−⪰0:

    minx+,x−,scTx+−cTx−+ds.t.GTx+−GTx−+s=hAx+−Ax−=bx+⪰0,x−⪰0,s⪰0
  • To QP/QCQP: Simply set the quadratic matrix P=0.

  • To SOCP: Rewrite aiTx≤bi as ∥0∥2≤bi−aiTx.

  • To SDP: Represent multiple linear constraints as a diagonal LMI: diag(bi−aiTx)⪰0.

2.2 QP to SOCP and SDP ​

For a convex QP, handle the objective 12xTPx by introducing a slack variable t such that mint+qTx.

The constraint is 12∥Rx∥22≤t, where P=RTR (Cholesky decomposition).

  • QP → SOCP: Using the identity ∥u∥22≤vw⟺‖(2uv−w)‖2≤v+w: Set u=Rx, v=t, w=1.

    ⟹12‖(2Rxt−1)‖2≤t+1
  • QP → SDP: Using the Schur Complement:

    (2IRx(Rx)Tt)⪰0

2.3 QCQP to SOCP and SDP ​

Any quadratic constraint 12xTRTRx+qTx+r≤0 can be rewritten:

  • To SOCP: Rearrange the constraint to 12∥Rx∥22≤−(qTx+r). Using the identity above with v=1 and w=−2(qTx+r):

    12‖(2Rx1+2(qTx+r))‖2≤1−2(qTx+r)
  • To SDP: Using the Schur Complement:

    (IRx(Rx)T−2(qTx+r))⪰0

2.4 SOCP to SDP ​

The ℓ2-norm constraint ∥u∥2≤v (where u=Ax+b) is equivalent to the LMI:

(vIuuTv)⪰0

This is a standard application of the Schur complement on the block matrix.