TITLE: Converting from Quadratic to Second Order Cone optimization problem
QUESTION [8 upvotes]: I want to convert the following problem into SOCP form:
$minimize \quad$ $x^TAx+a^Tx$:
$subject$ $to \quad$ $Bx \leq b$
The approach I am taking is introducing new variables, $u$ and $v$, such that:
$u=x^TAx$ and $v=a^Tx$.
Then, our problem becomes:
$minimize \quad$ $u+v$:
$subject$ $to \quad$ $Bx \leq b$, $u \leq x^TAx$ and $v \leq a^Tx$.
Among these 3 constraints, the first and the third are linear, so we can let them be as they are. Only the second constraint needs to be converted into 2-norm form somehow, which I am not able to get how to do. Could anyone kindly tell me how to do that conversion? Would I need to introduce more new variables, or does it involve using some formula or trick that I can't seem to think of?

REPLY [4 votes]: I'll assume $A$ is positive semidefinite.  Let $A = L L^T$ be the Cholesky factorization of $A$.  Your optimization problem can be reformulated as
\begin{align}
\operatorname{minimize}_{x,u,y} & \quad y + a^T x \\
\text{subject to} & \quad Bx \leq b \\
& \quad u^T u \leq y \\
& \quad u = L^T x.
\end{align}
We are nearly done, because we only need to express the constraint $u^T u \leq y$ as a second-order cone constraint, and there is a "well known" trick that allows us to do this.  (It's not really well known at all, but it is taught in Vandenberghe's 236b class.)
The trick is explained in problem 4.26 (entitled "Hyperbolic constraints as SOC constraints") in Boyd and Vandenberghe. This problem points out that
$$
u^T u \leq y z, \, y \geq 0, \, z \geq 0 \iff \left \| \begin{bmatrix} 2u \\ y - z \end{bmatrix} \right \|_2 \leq y + z, \, y \geq 0, \, z \geq 0.
$$
It follows that our optimization problem can be reformulated as
\begin{align}
\operatorname{minimize}_{x,u,y,z} & \quad y + a^T x \\
\text{subject to} & \quad Bx \leq b \\
& \quad \left \| \begin{bmatrix} 2u \\ y - z \end{bmatrix} \right \|_2 \leq y + z\\
& \quad z = 1 \\
& \quad u = L^T x.
\end{align}
This is a second-order cone program.