0

Let $a_i \in \mathbb R^n$ for $i = 1, 2, \dots, m$. Prove that $f(x) = \ln(\sum_{i=1}^m e^{\langle a_i, x\rangle})$ is convex.

So far I have only got: $f(\alpha x_1 + (1-\alpha) x_2) = \ln (\sum_{k=1}^m e^{\langle a_i, \alpha x_1 + (1-\alpha)x_2\rangle}) = \ln (\sum_{k=1}^m e^{\alpha \langle a_i, x_1\rangle}\cdot e^{(1-\alpha)\langle a_i, x_2\rangle})$, and cannot see how can I get an inequality with $\alpha f(x_1) + (1-\alpha)f(x_2)$.

Keio203
  • 561
  • 1
    Do you mean $f(x) = \ln ( \sum_{i=1}^m e^{\langle a_i, x\rangle} )$ ? – Martin R Jun 08 '21 at 05:10
  • @MartinR Yes, I forgot to add the logarithm. – Keio203 Jun 08 '21 at 05:40
  • 1
    The functions $x \mapsto e^{\langle a_i, x\rangle}$ are log-convex, and the sum of log-convex functions is again log-convex, see for example https://math.stackexchange.com/q/665768/42969 . – Martin R Jun 08 '21 at 06:44

1 Answers1

1

Sums of convex functions are convex (easy exercise) so it suffices to prove that $g(x) = e^{\langle u,x\rangle}$ is convex for some fixed $u \in \mathbb{R}^n$. Set $h(x) = e^x$ and $l(x) = \langle u,x\rangle$. Then we have $$g(\lambda x + (1-\lambda)y) = e^{l(\lambda x + (1-\lambda)y)}= e^{\lambda l(x) + (1-\lambda)l(y)} \leq \lambda e^{l(x)} + (1-\lambda)e^{l(y)} = \lambda g(x) + (1-\lambda)g(y)$$ Here we used the fact that $l$ is linear (and so convex) and that the exponential function is convex (can be proven by taking the second derivative). There are several results characterizing when compositions of convex/concave functions with monotone or affine functions are convex, see the book of Boyd/Vandenberghe for more details.

E G
  • 1,016
  • Sorry but I forgot to include the natural logarithm in the definition of $f$ (I already edited it). In this case, what can we do to show the convexity? The natural logarithm is concave and $\sum_{i=1}^m e^{\langle a_i, x\rangle}$ is not necessarily a increasing/decreasing function, so I think that the composition argument does not work here. – Keio203 Jun 08 '21 at 06:04