# A question regarding local minimizer of a function restricted on a circle

I have a quadratic function $f: \mathbb{R}^2 \rightarrow \mathbb{R}$,

$f(\mathbf{x}) = (\mathbf{x}-\mathbf{p})^\top \mathbf{Q} (\mathbf{x} - \mathbf{p})$

where $\mathbf{Q}$ is positive definite and $\mathbf{p} \in \mathbb{R}^2$.

I want to find $\mathbf{x}$ satisfying $\| \mathbf{x} \|_2 = 1$ that (locally) minimizes $f$. The condition for a point $\mathbf{x}$ to be a critical point should be:

$$\nabla f(\mathbf{x}) = \lambda\mathbf{x}$$ $$2\mathbf{Q}(\mathbf{x}-\mathbf{p}) = \lambda\mathbf{x}$$ for some $\lambda$.

My questions is:

Does the condition that a critical point $\mathbf{x}$ (locally) minimizes $f$ is as follows?

$$\left<\nabla \left<\nabla f(\mathbf{x}), \mathbf{x}^\perp \right>, \mathbf{x}^\perp \right> > 0$$

where $\left< , \right>$ is the dot product, and $\left< \mathbf{x}^\perp, \mathbf{x}\right> = 0$. (the second-order directional derivative of f at $\mathbf{x}$, direction: $\mathbf{x}^\perp$, is greater than zero.)

If not, what is it?

-
There's a factor of $2$ missing; the gradient is $2\mathbf Q(\mathbf x-\mathbf p)$. Of course it doesn't matter since you can absorb the factor into $\lambda$, but then $\lambda$ isn't the same $\lambda$ in those two displayed equations. – joriki Jan 11 '12 at 4:48
Additionally, at critical point, it turns out that: $< \nabla f(x), x^\perp > = < \lambda x, x^\perp > = 0$... Is there something wrong? – peam Jan 11 '12 at 4:56
Thanks, joriki, fixed now. – peam Jan 11 '12 at 4:58