A function f : R n → R f:R^n \rightarrow R f:Rn→R is convex if d o m f dom f domf is a convex set and if for all x , y ∈ d o m f x,y \in dom f x,y∈domf, and θ \theta θ with 0 ≤ θ ≤ 1 , 0 \le \theta \le 1, 0≤θ≤1, we have
f ( θ x + ( 1 − θ ) y ) ≤ θ f ( x ) + ( 1 − θ ) f ( y ) . f(\theta x + (1-\theta) y) \le \theta f(x)+(1-\theta)f(y). f(θx+(1−θ)y)≤θf(x)+(1−θ)f(y).
Suppose f f f is differentiable. Then f f f is convex if and only if d o m f dom f domf is convex and
f ( y ) ≥ f ( x ) + ▽ T f ( x ) ( y − x ) f(y) \ge f(x)+\bigtriangledown^Tf(x)(y-x) f(y)≥f(x)+▽Tf(x)(y−x) holds for all x , y ∈ d o m f x,y \in domf x,y∈domf.
We now assume that f f f is twice differentiable, that is, its Hessian or second order derivative ▽ 2 f \bigtriangledown^2f ▽2f exists at each point in d o m f dom f domf, which is open. Then f f f is convex if and only if d o m f dom f domf is convex and its Hessian is positive semidefinite: for all x ∈ d o m f x \in dom f x∈domf, ▽ 2 f ( x ) ⪰ 0. \bigtriangledown^2f(x) \succeq 0. ▽2f(x)⪰0.
The epigraph of a function f : R n → R f:R^n \rightarrow R f:Rn→R is defined as e p i f = { ( x , t ) ∣ x ∈ d o m f , f ( x ) ≤ t } . epi f= \{(x,t) \vert x \in dom f, f(x) \le t\}. epif={(x,t)∣x∈domf,f(x)≤t}.The link between convex sets and convex functions is via the epigraph: A function is convex if and only if its epigraph is a convex set.
f = w 1 f 1 + ⋯ + w m f m f=w_1f_1+\dots+w_mf_m f=w1f1+⋯+wmfm
g ( x ) = f ( A x + b ) g(x)=f(Ax+b) g(x)=f(Ax+b)
f ( x ) = m a x { f 1 ( x ) , f 2 ( x ) } f(x)=max\{f_1(x),f_2(x)\} f(x)=max{f1(x),f2(x)}
Let f : R n → R . f:R^n \rightarrow R. f:Rn→R. The function f ∗ : R n → R , f^*:R^n \rightarrow R, f∗:Rn→R, defined as
f ∗ ( y ) = sup x ∈ d o m f ( y T x − f ( x ) ) , f^*(y)=\sup \limits_{x \in dom f }(y^Tx-f(x)), f∗(y)=x∈domfsup(yTx−f(x)),
is called the conjugate of the function f f f.
We see immediately that f ∗ f^* f∗ is a convex function, since it is the pointwise supremum of a family of convex (indeed, affine) function of y. This is true whether or not f f f is convex.