# Does having a minimum along all lines imply that the function has a minimum?

Let $f:\mathbb{R}^2 \rightarrow \mathbb{R}$, with $f \in C^k$, $k \geq 2$. Suppose that $f$ has a local minimum at the origin along all lines. That is, for all $(x, y) \in \mathbb{R}^2$, the function $g_{x, y}(t) = f(tx, ty)$ has a local minimum at $t=0$. Does it then follow that $f$ has a local minimum at the origin?

I suppose I need to show that the Hessian of $f$ is positive definite, but I'm not sure how.

-
I suspect not, but I cannot construct a counterexample quite yet. –  Arkamis Jul 3 '14 at 22:54

Let $f(x,y)=(y-x^2)(y-3x^2)=y^2-4x^2y+3x^4$. Then $f$ does not have a local minimum at the origin, since $f(0,0)=0$ but $f(x,2x^2)=-x^4<0$ for $x\ne0$.

However, $f$ has a local minimum at $(0,0)$ on every line through the origin:

a) on the line $y=mx$, $f(x,mx)=m^2x^2-4mx^3+3x^4=x^2(m^2-4mx+3x^2)>0$ for $x$ close to $0$ (but $x\ne0$) since $m^2-4mx+3x^2>0$ for $x$ close to $0$.

b) on the y-axis, $f(0,y)=y^2>0$ for $y\ne0$.

-
Very nice. Any remark on the thought process of coming up with this? –  user182973 Jul 4 '14 at 1:36
@user182973, draw the parabolas $y=x^2$, $y=3x^2$ and the lines through the origin, –  Martín-Blas Pérez Pinilla Jul 4 '14 at 10:15

Notice that the Hessian is positive definite if and only if the second derivative of $f$ in all directions is positive. $$\forall f \in C^2(\mathbb{R}^d) \forall x \in \mathbb{R}^d : \left(\operatorname{Hess}_x(f) >0 \Leftrightarrow \forall v \in \mathbb{R}^d : \partial^2_t f(x+t v)>0\right)$$

However the Hessian being positive at a critical point is sufficient but not necessary for a local minimum.

-