Distance to origin of tangent plane to ellipsoid We have an $n$-dimensional ellipsoid described by: $$\frac{x_1^2}{a_1^2}+\dots+\frac{x_n^2}{a_n^2}=1$$ and we construct the hyperplane through any $x \in$ the ellipsoid which is tangent to the ellipsoid at $x$. 
Prove that $D(x)$, the distance from this hyperplane to the origin, is: $$D(x)=\frac{1}{\sqrt{\frac{x_1^2}{a_1^4}+\dots+\frac{x_n^2}{a_n^4}}}$$
I know that the plane tangent to the ellipsoid at a point on the ellipsoid we can call $y_0=(y_1,\dots,y_n)$ can be written as: $$\frac{x_1y_1}{a_1^2}+\dots+\frac{x_ny_n}{a_n^2}=1$$ 
I don't see how to get from this description of the tangent plane to an expression for the distance to the origin only in terms of $x$. How do we deal with the fact that the description is at a specific point?
Edit: fixed the equation for D
 A: I believe there is an error in the formula for the distance.
If $(x_1,\cdots,x_n)$ is your point on the ellipsoid, we can find a vector orthogonal to the ellipsoid by taking the gradient of the function
\begin{equation}
F = \frac{x_1^2}{a_1^2}+\frac{x_2^2}{a_2^2}+\cdots+\frac{x_n^2}{a_n^2}-1
\end{equation}
so we'll have
\begin{equation}
\nabla F =2 \left(\frac{x_1}{a_1^2},\frac{x_2}{a_2^2},\cdots,\frac{x_n}{a_n^2}\right)
\end{equation}
The distance of the tangent plane from the origin can be found by finding a number $\lambda$ such that $\lambda\nabla F$ belongs to the plane. In this way you'll get that the distance is $\|\lambda\nabla F\|$.
In particular, we have that
\begin{equation}
y_i=2\lambda\frac{x_i}{a_i^2}
\end{equation}
so we should solve
\begin{equation}
2\lambda\left(\frac{x_1^2}{a_1^4}+\frac{x_2^2}{a_2^4}+\cdots+\frac{x_n^2}{a_n^4}\right)-1=0
\end{equation}
which yelds
\begin{equation}
\lambda=\frac{1}{2}\left(\frac{x_1^2}{a_1^4}+\frac{x_2^2}{a_2^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{-1}
\end{equation}
Now,
\begin{equation}
\|\lambda\nabla F\|=\lambda\|\nabla F\|=\lambda \cdot 2\left(\frac{x_1^2}{a_1^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{1/2}
\end{equation}
so
\begin{equation}
\|\lambda\nabla F\|=\frac{1}{2}\left(\frac{x_1^2}{a_1^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{-1}\cdot 2\left(\frac{x_1^2}{a_1^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{1/2}=\left(\frac{x_1^2}{a_1^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{-1/2}
\end{equation}
A: $$
\frac{x_1y_1}{a_1^2}+\dots+\frac{x_ny_n}{a_n^2}=1 \tag 0
$$
The question is: what is the distance from the plane whose equation appears above, to the origin?  The equation above can be written as
$$
\left( \frac{y_1}{a_1^2}, \ldots, \frac {y_n}{a_n^2} \right) \cdot (x_1,\ldots, x_n) = 1,
$$
which let us abbreviate thus:
$$
\mathbf{y}\cdot\mathbf x = 1. \tag 1
$$
The equation $(1)$ holds at all points in the plane, so if we have two such points, say $\mathbf x$ and $\mathbf w$, we must then have
$$
\mathbf y \cdot (\mathbf x - \mathbf w) = 0.
$$
Thus $\mathbf y$ is orthogonal to every vector pointing from one location to another within the plane, and thus orthogonal to the plane itself.  Therefore the point on the plane that is closest to the origin must be a scalar multiple of $\mathbb y$, say $c\mathbb y$.  Find the value of $c$ for which $c\mathbb y$ in the role of $\mathbb x$ satisfies the equation $(0)$. That means you have
$$
\frac{(cy_1)y_1}{a_1^2}+\dots+\frac{(cy_n)y_n}{a_n^2}=1
$$
That is the point in the plane that is closest to the origin.  Then find the distance.
