I'm just learning about optimization, and having trouble understanding the difference between convex and non-convex optimization. From my understanding, a convex function is one where "the line segment between any two points on the graph of the function lies above or on the graph". In this case, a gradient descent algorithm could be used, because there is a single minimum and the gradients will always take you to that minimum.
However, what about the function in this figure:
Here, the blue line segment crosses below the red function. However, the function still has a single minimum, and so gradient descent would still take you to this minimum.
So my questions are:
1) Is the function in this figure convex, or non-convex?
2) If it is non-convex, then can convex optimization methods (gradient descent) still be applied?