Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can we find the shortest distance from the origin to the following quadric surface?

$$3x^2+y^2-4xz = 4$$

I see lagrangian multipliers being used, partials and such, but have trouble organizing into a different setting. Thanks.

share|cite|improve this question
Please use LaTeX when writing mathematical expressions - makes your question easier to read :) – Johnny Westerling Sep 25 '12 at 9:40
up vote 2 down vote accepted

Minimize $x^2+y^2+z^2$ given $g(x,y,z)=3x^2+y^2-4xz=4$

Let $f(x,y,z,\lambda)=x^2+y^2+z^2+\lambda (3x^2+y^2-4xz-4)$

Now, using Lagrange Multiplier Method,

$\frac{\partial f}{\partial x}=2x+6\lambda x-4\lambda z=0$

$\frac{\partial f}{\partial y}=2y+2y\lambda = 0$

$\frac{\partial f}{\partial z}=2z-4x\lambda = 0$

Also $3x^2+y^2-4xz=4 $

Solve these four equations in four variables, you will get the nearest point $(x,y,z)$

But, check Hessian also to assure whether point gives minima or maxima or saddle point.

share|cite|improve this answer

You want to minimize the function


which represents the distance squared of a point with coordinates $(x,y,z)$ to the origin $(0,0,0)$ provided that point also lies on a quadratic surface with equation

$$g(x,y,z)=3x^2+y^2-4xz=4 \; .$$

Several techniques are possible. You could find an explicit formula for the coordinate $z$ in terms of $(x,y)$:


and substitute it into $f(x,y,z)$ which will give you a new function $\tilde{f}(x,y)$ of two variables. You now have to look for the minimum of this function. Also note that by constructing the explicit formula, we divided by $x$ and have excluded potential minima with $x=0$. These have to be handled separately.

The other most common technique is the technique of the Lagrange multipliers. Again, starting from the function and condition, you construct the Lagrangian

$$L(x,y,z,\lambda)=f(x,y,z)-\lambda(g(x,y,z)-4) \; .$$

You know look for the critical points of this Lagrangian by computing the partial derivatives to every variable and then equating the results to 0 each time. You thus obtain a set of 4 equations for 4 variables. The solutions of these equations are candidate minima for the function $f(x,y,z)$ satisfying the constraint $g(x,y,z)=4$. You thus are left with checking which of those are indeed minima.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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