# Convexity

## Alexei Gilchrist

### 1 A convex set

A set \(C\) is *convex* if for all \(a,b\in C\) and \(0<\lambda<1\), the element \(\lambda a + (1-\lambda)b\) is also in \(C\).

Geometrically, if a line is connected between \(a\) and \(b\) then every point on the line is also in the set as depicted below.

### 2 A convex function

A function \(f\) is *convex* over the convex domain \(C\) if for all \(x_{1},x_{2}\in C\) and \(\lambda\in[0,1]\)

*strictly convex*if equality only holds for \(\lambda=0\) or \(\lambda=1\). Note that if \(-f\) is convex we call the function

*concave*.

If the domain is the real numbers and \(f\) is twice differentiable then \(d^{2}f/dx^{2}\ge 0\) implies \(f\) is convex, and if \(d^{2}f/dx^{2}> 0\) then \(f\) is strictly convex.

### 3 Jensen’s inequality

For a convex function \(f(x)\),

If equality holds \(\langle f(x) \rangle = f(\langle x\rangle)\) and \(f(x)\) is strictly convex, then \(x_{j}=\langle x\rangle\).

Jensen’s inequality can be easily proved by induction on the number of terms in the average:

With \(m\) terms, the averages are \(\langle x\rangle = \sum_{j=1}^{m} p_{j} x_{j}\) and \(\langle f(x) \rangle= \sum_{j=1}^{m}p_{j} f(x_{j})\) where \(p_{j}\) is the probability of \(x_{j}\). The case \(m=1\) is trivially true. The case \(m=2\) is