Let X be a convex subset of a real vector space and let f:X→R be a function. Then f is called convex if and only if For all 0≤t≤1 and all x1,x2∈X: f(tx1+(1−t)x2)≤tf(x1)+(1−t)f(x2)