The distance between a point

on the given plane and the point (0, 2, 4) is

but since

and

share critical points, we can instead consider the problem of optimizing

subject to

.
The Lagrangian is

with partial derivatives (set equal to 0)




Solve for

:


which gives the critical point

We can confirm that this is a minimum by checking the Hessian matrix of

:


is positive definite (we see its determinant and the determinants of its leading principal minors are positive), which indicates that there is a minimum at this critical point.
At this point, we get a distance from (0, 2, 4) of