How to obtain the equation of the projection/shadow of an ellipsoid into 2D plane?

Given an ellipsoid equation of the form $$$$\label{eq_1}x'Ax=1$$$$ where $$A\in\mathbb{R}^{n\times n}$$ is positive definite and non-diagonal and $$x\in\mathbb{R}^n$$. So, how can I obtain the projection or shadow of the ellipsoid into a 2D plane?

part of this question was answered, but I need a general way to find an expression of the ellipse in the 2D plane for a given $$A$$.

• What type of projection do you have in mind?
– amd
Commented Sep 16, 2017 at 0:42
• You already know how to project to the coordinate planes. But the result is true for any plane. Hints: WLOG, pick a plane that passes through the origin. Then, if n is the unit vector perpendiclar to that plane, note that the the projection is $\mathbf{x^p}=\mathbf{x}-\mathbf{n}(\mathbf{n} \cdot \mathbf{x})$ Commented Sep 16, 2017 at 3:27
• Thank you for taking your time to answer. I need a projection in any 2D plane. For instance, if x=[x1,x2,x3,x4], I need the projection in the plane x1-x2. Commented Sep 18, 2017 at 3:03
• I am not sured if the solution in the links I mentioned above are complete. I do not see how to get the equation of an ellipse from that. I really appreciate all the help you can provide. Commented Sep 18, 2017 at 3:12
• @JairoGiraldo Got it. Wrote you an answer. Commented Sep 23, 2017 at 13:49

Let $f(\mathbf{x})=\mathbf{x'}A\mathbf{x}-1$. The projection you seek into the $(x1,x2)$ plane is the set of points (see Christian Blatter's answer here) where the gradient $\nabla f$ has no $x_3,...,x_n$ components. Since $\nabla f = 2 A x$, this means you have n-2 linear equations relating $x_1, ..., x_n$. For example, in the 4 dimensional case, you will have 2 equations $$a_{13}x_1+ a_{23}x_2 + a_{33}x_3 + a_{43}x_4 = 0$$ and $$a_{14}x_1+ a_{24}x_2 + a_{34}x_3 + a_{44}x_4 = 0$$ This lets you solve for $x_3,...,x_n$ in terms of $x_1$ and $x_2$.
For the more general n-dimensional case, partition the matrix A into submatrices in this way: $$\mathbf{A}= \left[\begin{array}{r|r} J & L' \\ \hline L & K \\ \end{array} \right]$$
where $J$ is a $2\times 2$ submatrix, $L$ is $(n-2) \times 2$, and $K$ is $(n-2) \times (n-2)$. Let $\mathbf{y}$ be the vector $(x_1,x_2)$ and let $\mathbf{z}$ be the vector $(x_3,...,x_n)$ The conditions I mentioned from the gradient would be $$L\mathbf{y}+K\mathbf{z} =0$$. Solve this along with the equation of the original ellipsoid $$\left( \begin{array}{r|r} \mathbf{y'} | \mathbf{z'} \\ \end{array}\right) \left[\begin{array}{r|r} J & L' \\ \hline L & K \\ \end{array} \right] \left( \begin{array}{r} \mathbf{y} \\ \hline \mathbf{z} \\ \end{array}\right) = 1$$
This gives the equation of the curve you seek as $$\mathbf{y'} \left( J - L'K^{-1}L\right)\mathbf{y}= 1$$
Please see Jean Marie's answer to my question (specific 3-d case of the multi-dimensional case in your question) to see that $J - L'K^{-1}L$, a Schur complement, is also positive definite. This shows that the projection is an ellipse.