2

Problem: Prove that $\displaystyle f(x) = \log(\sum_{k=1}^n\exp(x^Tw_k))$ is convex.

My attempt: For $x,y \in D$ and $t \in (0,1)$ we have \begin{eqnarray} f(tx+(1-t)y) = \log(\sum_{k=1}^n\exp(tx^Tw_k)\cdot \exp((1-t)y^Tw_k)) \end{eqnarray}

Now, I am stuck here since I don't know there exists a inequality $$\log(a_1b_1 + a_2b_2+...+a_nb_n) \le \log(a_1b_1)+...+\log(a_nb_n).$$ If this inequality exists then the problem will be solved. Thanks for any help.

ohana
  • 869
  • 4
  • 10

1 Answers1

2

So $x \mapsto \sum_{k=1}^n\exp(x^Tw_k)$ is log-convex, which means that $f$ is convex.


For a direct proof one can proceed as in Why is log-of-sum-of-exponentials $f(x)=\log\left(\sum_{i=1}^n e^ {x_i}\right)$ a convex function for $x \in\mathbb R^n$?, using the Cauchy-Schwarz inequality: $$ f(\frac{x+y}{2}) = \log \left( \sum_{k=1}^n \exp(x^Tw_k/2) \cdot \exp(y^T w_k/2)\right) \\ \le \log \left( \sqrt{\sum_{k=1}^n \exp(x^T w_k)} \cdot \sqrt{\sum_{k=1}^n \exp(y^T w_k)}\right) \\ = \frac 12 \left( f(x) + f(y) \right) \, . $$ This shows that $f$ is midpoint-convex, and therefore convex (since $f$ is continous).

Martin R
  • 113,040