**The term convex is used to describe a surface that shows a curvature, with its center being the side with the greatest prominence.**

Therefore, we say, for example, that the exterior of a sphere is convex. This is because its central part is more prominent.

On the other hand, it is possible to analyze whether geometric figures are convex, for example, in the case of a parabola, it is when it is U-shaped.

A teaching trick to remember convexity is to think that the shape of the convex curve is that of a smiley face.

In addition, although we have referred to the property of convexity as something that has a curve, it is also applicable to mathematical functions and polygons, as we will see below.

## How to know if a function is convex?

If the second derivative of a function is greater than zero at a point, then the function is convex at that point, in its graphical representation.

The above, formally, is expressed as follows:

**f »(x)> 0**

For example, the function f (x) = x ^{2} + x + 3. Its first derivative f ‘(x) = 2x +1 and its second derivative f »(x) = 2. Therefore, the function f (x) = x ^{2} + x + 3 is convex for any value of x, as we see in the image below, which is a parabola:

Now let’s imagine this other function f (x) = – x ^{3} + x ^{2} + 3. Its first derivative f ‘(x) = -3x ^{2} + 2x and its second derivative f »(x) = -6x + 2. Once we have the second derivative calculated, we must check for what values of x, the function f (x) = -x ^{3} + x ^{2} + 3 is convex.

So, we set the second derivative equal to 0:

f »(x) = -6x + 2 = 0

6x = 2

x = 0.33

Therefore, the function is convex when x is less than 0.33, since the second derivative of the equation is positive. We can check this by replacing different values of x. Likewise, the function becomes concave when x is greater than 0.33, as we can see in the graph below.

## Convex polygon

A convex polygon is one where it is satisfied that two points, any of the figure, can be joined by a straight line that will always remain within the polygon. Also, all interior angles are less than 180º. We can think, for example, of a square or a regular octagon.

The opposite is a concave polygon. That is, the one where, at least to join two of its points, a line must be drawn that is, partially or totally, outside the figure. As seen in the comparison offered below: