# When is Multiplication of Convex Functions Convex?

It is generally known that multiplication of convex functions is not convex. Take for example:

$$f_1(x) = 1-x$$, $$f_2(x) = 1+x$$, Then $$f_1(x)f_2(x) = 1-x^2$$

Which is not convex

However, I've encountered situations where convexity appears to hold true in specific scenarios. Take for example:

$$f(x) = a^xb^x$$ where $$a, b >=0$$

Can this be generalized to a broader class of functions? Say for example strictly-convex functions/non-decreasing/non-increasing, a composition of requirements, or something more general. Much would be appreciated even if it is a link to a theorem for said specific case. Thanks!

• I also found this I don't think it is a dupe, as it simply ask to prove that the multiplication of two convex functions is not convex Commented Feb 10 at 18:41
• Yes, there are multiple examples on this site asking about the product of two specific functions. Like you said, these and some others partly answer the question, but not generally. Commented Feb 10 at 18:50

Suppose $$f,g$$ are twice differentiable, convex, both not increasing or not decreasing and positive. Than $$fg$$ is convex
Indeed by the generalised Leibnitz rule we have $$\frac{d^2}{dx^2}(fg)= f''g+ f g'' + 2f'g' \ge 0$$ As $$f'',g'' \ge 0$$ by convexity, $$f'g' \ge 0$$ because the two functions have the same monotonicity and $$f,g \ge0$$ by hypothesis. (at least in one dimension the condition of being twice differentiable is not necessary. See exercise 3.32 (a) of convex optimization, S. Boyd, L. Vandenberghe )
Another sufficient (but not necessary) condition is that the two function are log convex as in that case you can write the product as $$fg(x)=e^{\log(f(x))+\log(g(x))}$$ As the sum of two convex function is convex the product is log-convex, so it is convex (see e.g. this)
• The factor $2$ in front of $f'g'$ missing Commented Feb 10 at 18:57