As above, how would one mathematically prove that a linear combination of convex functions is also convex?
We know a function defined on a convex set $S$ is convex if:
$$f(tx_1+(1-t)x_2)\leq tf(x_1)+(1-t)f(x_2)$$
where $t$ is from $0$ to $1$
We must prove that $\sum_{i=1}^n a_i f_i(x)$ is also convex given a bunch of functions $f_1, f_2$ etc.
How do i approach this problem? I could say the following:
$tf(x_1)+(1-t)f(x_2)+tg(x_1)+(1-t)g(x_2)=t(f(x_1)+g(x_1))+(1-t)(f(x_2)+g(x_2))$
$f(tx_1+(1-t)x_2)+g(tx_1+(1-t)x_2)\leq t(f(x_1)+g(x_1))+(1-t)(f(x_2)+g(x_2))$
Is this how we show it?
Secondly, how would we prove the same thing for a concave function? Isn't it just adding a – sign? How would i mathematically prove it?
Best Answer
In general your statement is false. The function $f(x)=x^2$ is convex, while $-f$ is not convex. It is true if you consider so-called conical combinations, i.e. all coefficients are supposed to be nonnegative.
The proof is trivial bacause it is enough to multiply the inequalities by nonnegative scalars and sum them up.