# Convex function

A convex function is a function such that

$\alpha f(\mathbf{x}) + (1-\alpha)f(\mathbf{y}) \geq f(\alpha \mathbf{x} + (1-\alpha)f(\mathbf{y})$

$\forall \mathbf{x,y}, 0 \leq \alpha \leq 1$

Conceptually (and quite roughly) a convex function can be thought of as being shaped like a "U", where a straight line drawn between any two points on the function always lies on or above the function.

In optimization, convexity of the objective function and constraints is an important property that enables proof of global optimality and allows the use of efficient numerical methods.