Let $a_i \in \mathbb{R}^n, f(x) = \ln\ (\sum_{i=1}^n e^{\langle a_i, x\rangle })$. Show $f(x)$ is convex.
I don't really know where to start on this. Is it safe to say $x \in \mathbb{R}^n$ then or is that not necessary for inner products? I'm also confused because I know $\ln$ is concave so I don't see how ln of the sum would be convex.
I was thinking I needed to show the Hessian is symmetric semi-positive definite, but I'm not sure that's even possible from the info that I am given to work with. I am thinking showing that for all $x,y$, $f(\frac{x+y}{2}) \leq \frac{f(x) + f(y)}{2}$ might be best, but I am getting tripped up on the details there as well. Thoughts?
You must show: $f(\theta x+(1-\theta)y) \le \theta f(x) + (1-\theta)f(y)$
The trick is to use the Hölder's inequality:
$$ \sum_ {i=1}^n u_iv_i \le (\sum_ {i=1}^n|u_i|^p)^{\frac{1}{p}} \cdot (\sum_ {i=1}^n|v_i|^q)^{\frac{1}{q}} $$
with $1/p=\theta, 1/q=1-\theta$ so that $1/p+1/q=1$.
Now the details:
Let $u_i=e^ {\langle a_i, x\rangle} ,v_i=e^ {\langle a_i,y\rangle}$.
\begin{align*} f(\theta x+(1-\theta)y) &= \ln(\sum_ {i=1}^n e^{\theta \langle a_i, x\rangle + (1-\theta)\langle a_i, y\rangle}) \\ &=\ln(\sum_ {i=1}^n u_i^ \theta v_i^{(1-\theta)}) \end{align*}
From Hölder's inequality (your $u_i$ and $v_i$ are positives and $x\mapsto\ln(x)$ is an increasing function):
\begin{align*} \ln(\sum_ {i=1}^n u_i^ \theta v_i^{(1-\theta)}) &\le \ln[(\sum_ {i=1}^n u_i^ {\theta \cdot \frac{1}{\theta}})^ \theta \cdot (\sum_ {i=1}^n v_i^ {1-\theta \cdot \frac{1}{1-\theta}})^ {1-\theta}] \\ &\le \theta \ln\sum_ {i=1}^n u_i+(1-\theta)\ln\sum_ {i=1}^n v_i \end{align*} which proves that $f(\theta x+(1-\theta)y) \le \theta f(x) + (1-\theta)f(y)$.