Usage of Matrices for Lagrange Multipliers

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

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.