Hyperellipsis: Find lengths from center to sides along different orthogonal basis Assume I have an (arbitrarily oriented) hyperellipsis in $\mathbb{R}^n$ whose principal axes vectors I know. I want to find the lengths of the $n$ vectors along the coordinate system's orthogonal basis which touch the surface of the hyperellipsoid. Do you have any idea how to achieve this?
I have attached a small image in two dimensions for clarification purposes. I know $\overrightarrow{a}$ and $\overrightarrow{b}$, and would like to find $\overrightarrow{x}$ and $\overrightarrow{y}$ (and their higher-dimensional equivalents).

 A: You’re essentially looking for the intersections of the coordinate axes with the ellipsoid. You can find these by setting all but one of the variables in the ellipsoid’s implicit Cartesian equation to zero. You haven’t stated so explicitly, but I’m assuming for simplicity that the ellipsoid is centered at the origin. Its implicit equation can be represented in matrix form as $$\mathbf x^TQ\mathbf x=1, \tag1$$ where $Q$ is a positive-definite matrix. We then have for the intersections with the $x_i$ axis $$(0,0,\dots,x_i,\dots,0)\,Q\,(0,0,\dots,x_i,\dots,0)^T = q_{ii}x_i^2 = 1,$$ from which $x_i = q_{ii}^{-1/2}$, i.e., the reciprocal square root of the corresponding diagonal element of $Q$. (If you expand equation (1), $q_{ii}$ is the coefficient of the $x_i^2$ term.)  
So, how to find these coefficients? One way is to construct $Q$. The principal axis vectors form an orthogonal basis in which the ellipsoid is a sphere—its matrix in that basis is simply the identity matrix. If $P$ is the matrix with these vectors as its columns, $P$ maps from this basis to the standard basis, so the matrix of the ellipsoid in the standard basis is $$P^{-T}IP^{-1} = P^{-T}P^{-1} = (PP^T)^{-1}. \tag2$$ The last form might not be the most convenient for computation since it requires computing the entire matrix when you only need the diagonal elements.  
You can avoid a matrix inversion by taking advantage of the orthogonality of $P$’s columns. Factor $P$ into $UD$, where $U$ is $P$ with its columns $\mathbf p_i$ normalized and $D$ is a diagonal matrix with $d_{ii} = \|\mathbf p_i\|$. Then we have $$PP^T = (UD)(UD)^T = UD^2U^T$$ and $$(PP^T)^{-1} = (UD^2U^T)^{-1} = U(D^2)^{-1}U^T. \tag3$$ The diagonal elements of $(D^2)^{-1}$ are, of course, simply $1/\|\mathbf p_i\|^2 = 1/(\mathbf p_i\cdot\mathbf p_i)$.  
For example, let’s say that we have $\mathbf p_1 = (6,2)^T$ and $\mathbf p_2 = (-1,3)^T$. Then $$(PP^T)^{-1} = \begin{bmatrix}37&9\\9&13\end{bmatrix}^{-1} = \frac1{400} \begin{bmatrix}13&-9\\-9&37\end{bmatrix},$$ and so the $x$- and $y$-intercepts are ${20\over\sqrt{13}}$ and ${20\over\sqrt{37}}$, respectively.  
If the ellipsoid is not centered at the origin, then you can still use a similar process. You will end up with a quadratic equation in $x_i$ for the intercepts, which, of course, might have one or no solutions.
