Convex functions are characterized by the property that the line segment connecting any two points on the function will always be located above or on the function itself. Intuitively, this implies that a convex function lacks any 'dips' or 'hollows'; it features only one minimum point, making it unimodal. In the context of optimization, the importance of a function being convex lies in the fact that any local minimum will also serve as a global minimum. In contrast, nonconvex functions do not possess these characteristics. They may have several local minima, and the line segment between two points on the function can sometimes fall below the function itself. Nonconvex functions are more versatile and can depict a complex landscape with multiple peaks and valleys. In optimization, locating the global minimum of nonconvex functions is considerably more difficult, as there may be many local minima, not all of which correspond to the global minimum.