Convex Function

A function is convex if its domain is a convex set, and:

  1. (Zeroth-Order Condition) For all points and , the graph of lies below (or on) the line segment connecting and , such that
  2. (First-Order Condition) If is differentiable, it holds that for all , the tangent line (or tangent plane in higher dimensions) at any point lies below the function everywhere else:
  3. (Second-Order Condition) If is twice-differentiable, it holds that the Hessian of for all is positive semi-definite (i.e., ).

If is convex, then is said to be concave. The following is a visual interpretation of the Zeroth-Order Condition for convexity:

\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
 \begin{axis}[
   xlabel={$x$}, xlabel style={align=left},
   ylabel={$f(x)$},
   ytick=0,
   xtick=0,
   domain=0:6,               % choose a domain that avoids the asymptote at x=1 if desired
   samples=200,
   restrict y to domain=0:20,  % only show y-values that are positive (and up to 20)
   unbounded coords=jump,      % jump over undefined/infinite parts
   axis lines=center,
   clip mode=individual]
   % Plot the function's positive part using max(0, f(x)):
   \addplot[thick, clip=true] {max(0, x^2/3 + 1/(x-1))};
   
   \draw[dashed, thick] (axis cs:5.41,0) -- (axis cs:5.41,10) node[at start, below]{$x_{2}$} node[right]{$f(x_{2})$};
   \filldraw (axis cs:5.41,10) circle (2pt);
   \draw[dashed, thick] (axis cs:1.17,0) -- (axis cs:1.17,6.3) node[at start, below]{$x_{1}$} node[left]{$f(x_{1})$};
   \filldraw (axis cs:1.17,6.3) circle (2pt);
   \draw (axis cs:1.17,6.3) -- (axis cs:5.41,10) node[midway, above, sloped]{$\alpha f(x_{1})+(1-\alpha)f(x_{2})$};
   
   \draw[dotted, thick] (axis cs:3.5,0) -- (axis cs:3.5,8.335) node[at start, below]{$z=\alpha x_1+(1-\alpha)x_2$};
   \filldraw (axis cs:3.5,4.48) circle (2pt) node[below right]{$f(z)$};
   \filldraw (axis cs:3.5,8.335) circle (1pt);
 \end{axis}
\end{tikzpicture}
\end{document}

Furthermore, a function is strongly convex if there exists some , such that

is convex. Note that strong convexity implies strict convexity,

Properties

(Envelope Representation) If is convex and l.s.c., , where is a collection of affine functions such that for all .

You can imagine all of ‘s tangents “enveloping” : they only intersect one point of , which, in terms of all tangent lines on , constructs . The largest value of any affine on will be the point where the affine tangent intersects . We use the supremum instead of the maximum to keep the behavior well-defined for discontinuities.

Examples

Zeroth-Order Condition on Parametrized Functions

Consider a convex function . Given two arbitrary points , we define the scalar function as follows:

The function is the restriction of the function to a line parametrized by a scalar .

Zeroth-Order Condition on Composite Functions

Consider two functions and . Define the composite function such that . Assume that for every in the domain of , the point is in the domain of , which implies that is defined for every in the domain of . Assume that all of the following conditions hold:

  • and are both convex, and may be non-differentiable

  • is a non-decreasing function, meaning that for all such that

Second-Order Condition

Consider the function , defined as

where is some constant