Extreme Value Problem: Minimizing vs. Maximizing Problem:
Determine the distance between $(0,0,0)$ and the straight line which we get by intersecting the two planes $x-y+z=1$ and $x+y-z=0$.
Distance between a point and origin: $f(x,y,z)=\sqrt{x^2+y^2+z^2}$ with $g_1=x-y+z-1=0$ and $g_2=x+y-z=0$
I think that $f$ gives us the distance between any point on the straight line of the two planes and the origin. By saying "the distance" we actually mean the shortest (the one orthogonal on the line). So we "minimize" the problem.
We can also take the quadratic of $f$ to make it easier.
So we get the lagrangian function:
$L=x^2+y^2+z^2-\lambda(x-y+z-1)-\mu(x+y-z)$
$\partial_xL=2x-\lambda-\mu=0 \Rightarrow \mu=2x-\lambda$
$\partial_yL=2+\lambda-\mu \Rightarrow \mu=2y+\lambda$
$\partial_zL=2z-\lambda+\mu=0 \Rightarrow \mu=-2z+\lambda$
Using the 2nd and 3th eq. we get $y=-z$
using $g_1, g_2$ we get the system of equations:
x-y+z=1
x+y-z=0
z+y=0
Which is solved by $p=(1/2, -1/4, 1/4)$
The wanted distance is now: $d=f(p)=\sqrt{6}/4$
Question
Now, what I don't get is where we actually did the minimizing or asked differently: How would I maximie this problem?
My thoughts: The thing we did above was just getting all extremal values. When minimizing, we'd choose the minimum and when maximizing, we'd choose the maximum. That's correct?
 A: The parametric equation of the line of intersection of the planes is $$ x=1/2, y=-t/2, z=1/2 - t/2$$
The distance from the origin satisfies $$d^2 = 1/4 +t^2/4+(1-t)^2/4 $$
The minimum distance happens at $t=1/2$ and it is $d= \sqrt 6 /4.$ 
There is no maximum value as the distance grows without bound. 
A: In Calc 3 (or the equivalent) we normally don't do much with the 2nd-derivative test.  The one for two-variable functions, the $$D= f_{xx}f_{yy} - f_{xy}^2$$ thing is about the limit of what most students can handle.  But this is an example of the Hessian.  There is a Hessian for the Lagrangian which is essentially the 2nd-derivative test for max vs. min vs. saddle point.  For your example, the Hessian is the determinant of a $5\times 5$ matrix (because there are 5 variables.)  If you determine whether the Hessian matrix is "positive definite", at the critical point, then you know that the point is a local min.  (Note that the $D$ above is the determinant of a $2\times 2$ matrix.)
If you look at the wiki page for "Hessian" you'll find more than you want to know.
The short answer to your question is that often we use intuition to decide whether a point is a max or min, rather than mess with the Hessian.
