L​et us for a moment summarise all we have learned about convexity.

D​efinition and corrections

L​et us address the definition for the single-variate case first (the multi-variate is a simple generalization as we discussed): the function is convex on the segment $$[a; b]$$ if the function's graph on any subsegment $$[c; d]$$ is below the segment connecting points $$(c , f(c))$$ and $$(d, f(d))$$.

W​e came up with a more algebraic way to write it:

A​ttention : there is a correction in comparison with our slides – strict inequality has become a not strict one! Why the latter one is the correct one?

H​int : what happens if $$\alpha =0 $$ or $$\alpha =1$$

B​ut what if the equality is reached not only on the border, but on subsegement? What can we say about the function then? If we think about the concave definition, the equality also fulfills this definition too! Which function is simultaneously concave and convex? It is simple – the linear one; such cases are called degenerate ones.

S​econd derivative

F​ollowing the correction above, we should also address the sign in the second derivative inequalit y for the convexity: $$ f''(x) \ge 0 $$.

C​onsider the example for $$f(x)=x^4$$. It is clearly convex, but its second derivative is 0 at $$x=0$$. So it happen that $$ f''(x)=0$$ at some point but the function is still convex!

B​ut what if it is not an isolated point but a segment? As ealier, it is a degenerate case of the linear function!

A​ttention : remember that in multi-variable case we have the strict inequality, but zeros there only mean that we have no answer and need to look and investigate the function differently !