5

Given an ellipsoid equation of the form \begin{equation}\label{eq_1}x'Ax=1\end{equation} 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?

In these links:

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 Sep 16 '17 at 00: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})$ – Mathemagical Sep 16 '17 at 03: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. – Jairo Giraldo Sep 18 '17 at 03: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. – Jairo Giraldo Sep 18 '17 at 03:12
  • @JairoGiraldo Got it. Wrote you an answer. – Mathemagical Sep 23 '17 at 13:49

2 Answers2

10

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.

maero21
  • 113
Mathemagical
  • 3,642
  • Glad you found it helpful. Please do accept, upvote answers that worked for you. You can do that by clicking the check mark (and up arrow) to the left of the answer. – Mathemagical Nov 07 '17 at 23:15
  • Isn't it should be J is n-1 x n-1 sized and K is always 1 x 1 sized for the general case? Projection to nD plane excludes the only dimension, I sure. Projection of nD n-axis rotated ellipsoid on nD plane should be (n-1)D ellipsoid (which is ellipse in 2D). The case which is named "general n-dimensional case" is projection to 2D subspace, I think, not to the plane in the original nD space. – Tomilov Anatoliy Oct 30 '24 at 11:37
0

This is the same result as Mathemagical, but with a geometrical argument. The last step is a bit shaky so apologies.

As a warm up, how do we find the projection of a circle on the x-axis? The equation of a circle is given by $$x^2+y^2=1.$$ To find the projection, we scale the y-coordinate by a large number $\lambda$, i.e. $y\mapsto \lambda y$, and we take the limit. So we get \begin{align} x^2+\lambda^2y^2&=1 \implies x^2=1-\frac{1}{\lambda^2y^2} \end{align} The coordinates are in the ranges $x\in[-1,1]$ and $y\in[-\tfrac1\lambda,\tfrac1\lambda]$. By taking the limit, $y$ will now be $y\in\{0\}$, and the projection will be $x\in[-1,1]$.

Now let's look at the ellipse. I will do a projection on the xy-plane, but this should be generalizable to any plane. It is natural to look at it from the perspective of the inverse $\Sigma=A^{-1}$. This gives $$x'\Sigma^{-1}x=1.$$ Let us define a scaling matrix $$S_\lambda=\pmatrix{1&0&0\\0&1&0\\0&0&\lambda}.$$ The scaled version of the ellipsoid is written as $$x'S_\lambda \Sigma^{-1} S_\lambda x=1.$$ By taking the scaling matrix inside the inverse, we get $$x'(S_{1/\lambda}\Sigma S_{1/\lambda})^{-1}x=1,$$ where I used $(ABC)^{-1}=C^{-1}B^{-1}A^{-1}$. This is where my argument becomes a bit shaky, but in the limit that $\lambda\rightarrow\infty$, the scaling matrix becomes a projection matrix that makes the z-component zero and that makes inverse is undefined. But we know that in the end $z$ will be zero, so I will justify that to use a pseudo-inverse and just ignore the z-coordinate. So the equation will be \begin{align} \lim_{\lambda\rightarrow\infty}x'(S_{1/\lambda}\Sigma S_{1/\lambda})^+x&=1\\ x'_{xy}(P_z\Sigma P_z)^+x_{xy}&=1 \end{align} where $P_z$ projects out z, $x_{xy}=(x,y)$ and $(\cdot)^+$ is the pseudo-inverse. In words, calculate the inverse of $A$. Then select the xy-block, i.e. project out the z component. Finally, calculate the pseudo-inverse of this matrix. This is equivalent to simply calculating the inverse of the non-zero block. The process I described is equivalent to calculating the Schur complement of $A$ in the xy block, and for more details I will refer to Mathemagical's answer.