[Math] Usage of Matrices for Lagrange Multipliers

lagrange multiplierlinear algebra

I am attempting to do a problem where i have to minimize the distance between a point in 3D space and the origin, subject to the constraints that the points lie on the intersection between the planes x+3y+4z and 3x-y+10z=40. When I start to use the Lagrange method of optimization I get a set of 5 equations. I was wondering if I am okay to use a matrix to solve the system of equations, as the algebra involved is fairly lengthy.

I have some concern as the matrix will give me one definite answer, but usually when doing lagrange a number of points that satisfy the equations will be found and need to be checked manually that they are minimums/maximums. Will using a matrix prevent me from seeing all these points or will it automatically give me the minimum?

Thanks

Best Answer

No, using a matrix will not prevent you from seeing all the points that come out as solutions to the equations, because the equations do not care how you arrange them in order to solve them. And no, using a matrix in general will not produce automatically the minimum, unless there are special reasons for that, as there are in your problem.

You ought to be careful though, because in many cases the system of equations is not linear, so the solution of the equations may not be as easy as solving a linear system of equations.

In your specific example, however, the five equations you obtain do indeed form a linear system of equations, because the constraints themselves are given by linear functions, and the gradient of the square of the distance happens to be particularly simple. You do indeed get a unique solution to this system of equations. When you get a unique solution from the system of equations you may deduce that there are no other local extrema under the given constraints, because it is precisely these points that solve the system of equations. To finally decide whether what you've got is a maximum or minimum you must consider the specific underlying problem. In your case, the intersection of the two planes is some straight line, and so there is no maximal distance to the origin, and there is a unique point of minimal distance - and that's the unique point that will come out from solving the equations.

In your specific problem you can reduce the problem to a one-dimensional one, by first computing the line of intersection between the two planes, then parametrising it by some parameter $t$, and expressing the distance to the origin in terms of $t$ only.