Why is it an ellipsoid?

107 Views Asked by At

I am working on problem 2.19 (c) from Convex Optimization by Boyd and Vandenberghe.

In solutions they say that $X^TQx+2q^Tx \leq r$ is an ellipsoid where $Q$ and $q$ are matrix and vector respectively. I don't understand how this is an ellipsoid, I thought that ellipsoid should be $(x-x_c)P^{-1}(x-x_c)\leq r$. What bothers me is $2q^Tx$.

solution from Boyd

2

There are 2 best solutions below

0
On BEST ANSWER

It's a little like saying (in the plane) that $$4x^2 + 2x + y^2 \le r$$ defines an ellipse (or a "filled ellipse"; ellipse would be what you'd get with equality).

The trick is in "completing the square": you notice that $4x^2 + 2x$ is ALMOST the square of something like $$ (2x + b) $$ where $b$ is as yet unknown. Well, if you squared that, you'd get $$ 4x^2 + 4xb + b^2, $$ right? That means that $2$ has to be the same as $4b$ (because we want $4x^2 + 2x$, where the coefficient of $x$ is $2$, but we have the coefficient of $x$ being $4b$. Hence $b = \frac{1}{2}$. So let's look at $$ (2x + \frac{1}{2})^2. $$ It turns out to be $$ 4x^2 + 2x + \frac{1}{4}. $$ Returning to the original formula, $$4x^2 + 2x + y^2 \le r$$ we do a little fiddling: we add $\frac{1}{4}$ to both sides: \begin{align} 4x^2 + 2x + y^2 &\le r \\ 4x^2 + 2x + \frac{1}{4} + y^2 &\le r + \frac{1}{4} \\ (2x + \frac{1}{2})^2 + y^2 &\le r + \frac{1}{4}. \end{align} That LAST equation is for an ellipse centered at $x = \frac{1}{4}$ and $y = 0$.

Now what about your case? You can do exactly the same thing. First, write $Q$ as $A^t A$ (I'm assuming that $Q$ was said to be symmetric positive definite, so this can be done via the SVD, for example), with $A$ invertible. Your equation is then

\begin{align} (Ax)^t (Ax) + 2q^t x \le r\\ (Ax)^t (Ax) + 2q^t A^{-1} Ax \le r\\ \end{align}

... and can you proceed from here?

0
On

It's not much different from "completing the square" to solve a second-degree equation in one dimension:

If you set $Q=P^{-1}$ and multiply out $(x-x_c)^\top Q(x-x_c)$ you get $$ x^\top Qx - (x_c^\top Q)x - x^\top (Q x_c) + x_c^\top Qx_c \le r $$ which is the same as $$ x^\top Qx -x_c^\top (Q + Q^\top)x \le r - x_c^\top Q x_c $$

You can then get your first form by setting $q=\frac12 x_c^\top(Q+Q^T)$ and declaring the whole right-hand side to be your new $r$.

On the other hand, if you have $q$ and $Q$ where $Q+Q^\top$ happens to be invertible, you can solve $q=\frac12 x_c^\top(Q+Q^\top)$ for $x_c$ and get the first equation into the form you're used to. (Usually $Q$ will be a symmetric matrix, so $\frac12(Q+Q^\top)=Q$, and if it is singular then what you have is not an ellipsoid anyway.)