Possible Duplicate:
Calculating Distance of a Point from an Ellipse Border
Given a point $A = (x_1, y_1)$ and a $2$D ellipse, how could we find a point $B = (x_2, y_2)$ on the ellipse so that it has the shortest distance between point $A$ and $B$?
The point $A$ can be anywhere on the same plane of the ellipse. If possible, please list the final expression of the point $B.$
Not the easiest. Let the unknown point $B$ be $(x, y).$ $B$ is on the ellipse so $$(x/a)^2 + (y/b)^2 = 1,$$ i.e. $y = \frac{b}{a}\sqrt{a^2 - x^2}.$ Hence the squared distance between $A = (x_1, y_1)$ and $B$ is $$\begin{eqnarray} d & = & (x-x_1)^2 + (y -y_1)^2 \\ & = & (x-x_1)^2 + \Big(\frac{b}{a}\sqrt{a^2 - x^2} - y_1 \Big)^2. \end{eqnarray}$$ That's a function in $1$ variable, namely $x$, which you can minimize using calculus.