<s>[INST] Shortest distance between ellipsoid and plane Find the shortest distance between the points $A = (x_1,y_1,z_1)$ and $B = (x_2,y_2,z_2)$ if $A$ lies on the plane $x+y+z=2a$ and $B$ lies on the ellipsoid $$\frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1$$
 [/INST] The plane containing $A$:
$$x+y+z=2a \tag{1}$$
Direction ratio of the normal at $A$ is $1:1:1$
Equation of tangent plane at $B(x_2,y_2,z_2)$:
$$\frac{x_2 x}{a^2}+\frac{y_2 y}{b^2}+\frac{z_2 z}{c^2}=1 \tag{2a}$$
Equating the direction ratios of their normals
$$(x_2,y_2,z_2)=t(a^2,b^2,c^2)$$
As $B$ lies on the ellipsoid,
$$\frac{(a^2t)^2}{a^2}+\frac{(b^2t)^2}{b^2}+\frac{(c^2t)^2}{c^2}=1$$
$$t=\frac{1}{\sqrt{a^2+b^2+c^2}}$$
So the tangent plane is
$$x+y+z=\sqrt{a^2+b^2+c^2} \tag{2b}$$
The distance between the two planes
$$\fbox{$\frac{2a}{\sqrt{3}}-\sqrt{\frac{a^2+b^2+c^2}{3}}$}$$
provided $3a^2>b^2+c^2$ for no intersections between the plane and the ellipsoid.

Useful facts
Distance between two parallel planes $Ax+By+Cz=D$ and $Ax+By+Cz=D'$:
$$d=\frac{|D-D'|}{\sqrt{A^2+B^2+C^2}}$$

</s>