Calculate the minimum distance from the origin to the curve


The only method I know of is Lagrange multipliers. Is there any other method for questions of such type? Any help appreciated.


Hint: $4xy \le 2(x^2+y^2), 3x^2+3y^2 = 3(x^2+y^2) \implies 5(x^2+y^2) \ge 20 \implies x^2+y^2 \ge .....$

  • $\begingroup$ sorry, i dont see how it helps. can u elaborate? $\endgroup$ – Shobhit Jan 9 '17 at 14:22
  • $\begingroup$ Maybe you coul add that the equality can be achieved and the bound is tight. $\endgroup$ – Yves Daoust Jan 10 '17 at 8:44

You can always try to write it in polar coordinates:

$$3r^2+4r^2\sin\theta\cos\theta=20$$ $$r^2=\frac{20}{3+2\sin2\theta}\ge\frac{20}{3+2}=4$$

  • 6
    $\begingroup$ Nice solution - excellent example of how change-of-coordinates can really help. $\endgroup$ – FundThmCalculus Jan 9 '17 at 15:47

This ellipse is centered at the orgin.

The distance you seek equals the length of the minor axis.

Next thing to know is that it has been rotate 45 degrees.

$x = \frac {\sqrt 2}{2} x' + \frac {\sqrt 2}{2} y'\\ y = -\frac {\sqrt 2}{2} x' + \frac {\sqrt 2}{2} y'$

Will rotate it into standard position.

Or, the egienvalues of $\begin{bmatrix} 3&2\\2&3\end{bmatrix}$ are $1$ and $5$

$x'^2 + 5y'^2 = 20\\ \frac {x'^2}{20} + \frac {y'^2}{4} = 1$



We have the (non-convex) quadratically constrained quadratic program (QCQP)

$$\begin{array}{ll} \text{minimize} & \| \mathrm x \|_2^2\\ \text{subject to} & \mathrm x^{\top} \mathrm A \mathrm x = 1\end{array}$$


$$\mathrm A = \frac{1}{20} \begin{bmatrix} 3 & 2\\ 2 & 3\end{bmatrix}$$

Since $\mathrm A$ is symmetric, its eigenvalues are real. We define the Lagrangian

$$\mathcal L (\mathrm x, \mu) := \| \mathrm x \|_2^2 - \mu (\mathrm x^{\top} \mathrm A \mathrm x - 1)$$

Taking the partial derivatives and finding where they vanish, we obtain

$$(\mathrm I_2 - \mu \mathrm A) \, \mathrm x = 0_2 \qquad \qquad \qquad \mathrm x^{\top} \mathrm A \mathrm x = 1$$

Hence, the Lagrange multiplier is the inverse of the maximum eigenvalue of $\mathrm A$

$$\mu^* = \frac{1}{\lambda_{\max} (\mathrm A)} = 4$$

and the corresponding eigenspace is $\{ \gamma 1_2 \mid \gamma \in \mathbb R\}$. Let $\mathrm x^* = t 1_2$ be the minimizer. From $\mathrm x^{\top} \mathrm A \mathrm x = 1$,

$$t^2 = \frac{1}{1_2^{\top} \mathrm A 1_2} = 2$$

Therefore, $t = \pm \sqrt 2$ and $\mathrm x^* = \pm \sqrt 2 \, 1_2$. The distance between the ellipse and the origin is, thus, $$\| \mathrm x^* \|_2 = \sqrt 2 \, \| 1_2 \|_2 = 2$$

enter image description here

  • $\begingroup$ Awesome approach _ $\endgroup$ – Shobhit Jan 10 '17 at 2:49

By inspection (or see this for additional reference if required), we can see that this is an ellipse with centre at origin and axes of symmetry $y=\pm x$. Substituting into the ellipse equation gives end points of minor and major axes respectively: $$\\\begin{align} 3x^2\pm 4x^2+3x^2&=20\\ 2x^2, 10x^2, &=20\\ x&=\pm\sqrt{2}, \pm\sqrt{10}\end{align}$$ Distance from origin to semi-major/semi-minor axes is given by $\sqrt{x^2+y^2}=|x|\sqrt{2}$.
Shortest distance from origin to ellipse is semi-minor axis, i.e. $$\sqrt{2}\cdot \sqrt{2}=\color{red}2$$

  • $\begingroup$ @RodrigodeAzevedo - Corrected - Thanks!. $\endgroup$ – hypergeometric Jan 10 '17 at 3:15

Taking into account that it is an ellipse with short axis $y=x$ find crossings of this line with the ellipse.

enter image description here


we have $$d(x,y)=\sqrt{x^2+y^2}$$ we get that $y$ from the curve: $$y_{1,2}=-\frac{2}{3}x\pm\sqrt{\frac{20}{3}-\frac{5}{9}x^2}$$ can you proceed?

  • 3
    $\begingroup$ substituting and differentiating to find minima would be very long method. $\endgroup$ – Shobhit Jan 9 '17 at 14:21
  • 2
    $\begingroup$ should i do it for you? $\endgroup$ – Dr. Sonnhard Graubner Jan 9 '17 at 14:23
  • 1
    $\begingroup$ oh no, i just want to know if there is a smarter, shorter method to solve above question. $\endgroup$ – Shobhit Jan 9 '17 at 14:24

Let be $(x_0,y_0)$ a point of max/min distance the the origin. The (easily calculable) tangent to the ellipse in $(x_0,y_0)$ must be orthogonal to the line $x_0 y = y_0 x$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.