Constrained optimisation question 
Since $f$ has a local extremum at $x_1$, then surely the LHS of equation (3) always zero?  If so, then isn't lambda always simply zero too? But this cannot be, otherwise the last sentence of the theorem wouldn't be phrased the way it is. What am I missing?

The function $g$ defines a surface(in this case a curve) over which we have to minimize the value of f. The condition simply means that the gradients should be $parallel$ or $anti-parallel$, otherwise we can increase $f$ by moving in the direction of derivative appropriately.
For more read about the method of lagrange multipliers.
