6

I came across the following in my reading, and I like to know why this is true.

"$\dots$ but, the fuction $F:\mathbb{R}^n \to \mathbb {R}$ is nonconvex since it has several local minima $\dots$"

What does the number of local minima have to do with convexity?

user74261
  • 2,286

2 Answers2

6

It's actually possible for a convex function to have multiple local minima, but the set of local minima must in that case form a convex set, and they must all have the same value. So, for instance, the convex function $f(x)=\max\{\|x\|-1,0\}$ has a minimum of $0$ for all $\|x\|\leq 1$. (In one dimension, a convex set is just an interval.)

In particular, what is not possible is for a convex function to have multiple disjoint local minima. For instance, the nonconvex function $f(x)=(x^2-1)^2$ obtains a minimum of $0$ when $x=\pm 1$.

Consider also the nonconvex function in $\mathbb{R}^n$, $f(x)=(\|x\|^2-1)^2$. This function obtains a minimum of $0$ when $\|x\|=1$, the unit ball. This optimal set is connected when $n\geq 2$, but not convex.

Of course, a convex function need not have a minimum at all; for instance $f(x)=e^x$. But if a convex function has a local minimum, it is a global minimum, and this and all other points that achieve this same value form a convex set.

Michael Grant
  • 19,450
  • The reason why it it not possible to have multiple disjoint local minima is because a convex set in $\mathbb{R}^n$ is connected? – user74261 May 04 '15 at 22:55
  • That's right. The set of points that achieve the minimum value of a convex function must form a convex set, and convex sets are connected. – Michael Grant May 04 '15 at 22:57
  • What is the idea behind that the set of minimizers of a convex function necessarily forms a convex set? – user74261 May 04 '15 at 23:03
  • I'm not sure what to say here. It is simply a consequence of the definition of convexity. It's not just the set of minimizers, either. All sub-level sets ${x,|,f(x)\leq a}$, where $f$ is a convex function and $a$ is a constant, are convex. That is a necessary but not sufficient condition for convexity. So if $a=\min_x f(x)$, you have the above result. – Michael Grant May 04 '15 at 23:05
0

Indeed a convex function can only have one local max (which is therefore a global max). Think about this in the case $n=1$. Draw a smooth function with two local maxima and you'll see there has to be an inflection point where it goes from convex to concave.

Gregory Grant
  • 14,874
  • This can be adapted to higher dimensions. Let $x_1$ and $x_2$ be two local minima (in $\mathbb{R}^n$). Then, consider the restriction of the function to the line containing these two points. The restriction of a local min is a local min, and the restriction of a convex function is convex. Then, Gregory's comment applies. – Michael Burr May 04 '15 at 20:06
  • What if two local minima give the same minimum value? i.e. $f(x_1)=f(x_2)?$ – user74261 May 04 '15 at 20:07
  • Well conceivably the function could become constant at some point, but if there are only finitely many local minima then it would have to change inflection between them. One could argue a constant function has many local minima (ever point is a minimum) but it is still convex (as well as concave) (I think) – Gregory Grant May 04 '15 at 20:09
  • 1
    Slight correction: a convex function can only have one local minima. – Michael Grant May 04 '15 at 22:38