In the summary of the lectures, appears the sentence: "Given a function $f: \mathbb{R}^n \rightarrow \mathbb{R}$, then $x_0$ is a local maximum of $f$ if and only if, for every $0\neq v \in \mathbb{R}^n$, t=0 is a local maximum of $g(t)=f(x_0+tv)$". As it is, the statement isn't true. For example: $f(x, y)=\begin{cases} 1 & \text{ if }\; y=x^2, x>0 \\ 0 & \text{ else } \end{cases}$
But are there any conditions that make the statement true? (Such as continuity in a neighborhood of $x_0$, diffrentiability etc.)
The reason I'm asking the question is related to a chapter that talks about the Hessian matrix. I just can't understand how it is used to determine min/max. I'd be very thankful if someone could send me a link to a good explanation.
Thank you!