# For what functions $f(x)$ is $f(x)f(y)$ convex?

For which functions $f\colon [0,1] \to [0,1]$ is the function $g(x,y)=f(x)f(y)$ convex over $(x,y) \in [0,1]\times [0,1]$ ? Is there a nice characterization of such functions $f$?

The obvious examples are exponentials of the form $e^{ax+b}$ and their convex combinations. Anything else?

EDIT: This is a simple observation summarizing the status of this question so far. The class of such functions f includes all log-convex functions, and is included in the class of convex functions. So now, the question becomes: are there any functions $f$ that are not log-convex yet $g(x,y)=f(x)f(y)$ is convex?

EDIT: Jonas Meyer observed that, by setting $x=y$, the determinant of the hessian of $g(x,y)$ is positive if and only if $f$ is a log-convex. This resolves the problem for twice continuously differentiable $f$. Namely: if $f$ is $C^2$, then $g(x,y)$ is convex if and only if $f$ is log-convex.

-

1
In the $C^2$ case you can use the criterion of positivity of the Hessian, which leads you to look for nonnegative convex $f$ such that $f'(x)^2f'(y)^2\leq f''(x)f(x)f''(y)f(y)$ for all $x$ and $y$. – Jonas Meyer Dec 28 '10 at 3:06

3
log-convexity might be a helpful search term. – user1709 Dec 28 '10 at 8:37
Good point Slowsolver. This gives more examples: log convexity of $f(x)$ is a sufficient condition for $g(x,y)$ to be convex. Now, is it also necessary? – shaddin Dec 28 '10 at 20:45

2
@user5159: In the $C^2$ case it is necessary, as can be seen by letting $x=y$ in the inequality in my previous comment, yielding $f'^2\leq f''f$, which is equivalent to $(\log f)''\geq 0$. – Jonas Meyer Dec 30 '10 at 9:03
@Jonas Meyer Nice! As far as I'm concerned this resolves the question -- I'm only really interested in $C^2$ functions. Moreover, I suspect something similar is probably true in general. Feel free to post an answer and I'll vote / accept it. – shaddin Dec 31 '10 at 0:05

## 2 Answers

Suppose $f$ is $C^2$. First of all, because $g$ is convex in each variable, it follows that $f$ is convex, and hence $f''\geq0$. I did not initially have Slowsolver's insight that log convexity would be a criterion to look for, but naïvely checking for positivity of the Hessian of $g$ leads to the inequalities

$$f''(x)f(y)+f(x)f''(y)\geq0$$ and $$f'(x)^2f'(y)^2\leq f''(x)f(x)f''(y)f(y)$$ for all $x$ and $y$, coming from the fact that a real symmetric $2$-by-$2$ matrix is positive semidefinite if and only if its trace and determinant are nonnegative. The first inequality follows from nonnegativity of $f$ and $f''$. The second inequality is equivalent to $f'^2\leq f''f$. To see the equivalence in one direction, just set $x=y$ and take square roots; in the other direction, multiply the inequalities at $x$ and $y$. Since $\log(f)''=\frac{f''f-f'^2}{f^2}$, this condition is equivalent to $\log(f)''\geq0$, meaning that $\log(f)$ is convex.

-

This may just be a silly observation.

But, let $\alpha=(a_1,a_2)$ and $\beta=(b_1,b_2)$. If $f$ is convex and the sum of $g$ at the four corners of the square formed by $\alpha$ and $\beta$ is non-positive, then $g(t\alpha + (1-t)\beta) \leq tg(\alpha)+(1-t)g(\beta)$, where $t \in [0,1]$

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 56, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9500267505645752, "perplexity_flag": "head"}