Throughout, convexity of a subset of Rn+1 is understood as in Segments and Convex Subsets of Rn (i) and Segments and Convex Subsets of Rn (ii), with n+1 in place of n, membership in epif is read off from Epigraph of a Real-Valued Function on a Subset of Rn (i), and pairs are combined and compared as in Convex Functions on Rn: Standing Notation (ii): a point of Rn+1 determines its pair uniquely, and for x,y∈Rn and μ,ν,t∈R,
(1−t)(x,μ)+t(y,ν)=((1−t)x+ty, (1−t)μ+tν).
Suppose first that f is convex. Let (x,μ) and (y,ν) be points of epif and let t∈[0,1]. Then x,y∈C, μ≥f(x) and ν≥f(y). The point (1−t)x+ty lies in C because C is convex, and the convexity inequality of Convex Function on a Convex Subset of Rn (i), together with 1−t≥0 and t≥0, gives
f((1−t)x+ty)≤(1−t)f(x)+tf(y)≤(1−t)μ+tν.
By the displayed formula for combinations of pairs, this says that (1−t)(x,μ)+t(y,ν) lies in epif. Hence epif is convex.
Conversely, suppose that epif is convex, and let x,y∈C and t∈[0,1]. The points (x,f(x)) and (y,f(y)) lie in epif, and therefore so does their combination
(1−t)(x,f(x))+t(y,f(y))=((1−t)x+ty, (1−t)f(x)+tf(y)).
Since a point of Rn+1 determines its pair uniquely, membership in the epigraph says that the second entry is at least the value of f at the first entry:
f((1−t)x+ty)≤(1−t)f(x)+tf(y).
This is the inequality of Convex Function on a Convex Subset of Rn (i), so f is convex.