Take $a \in \mathbb{R}^+$ and $B,X \in \mathbb{R}^{d\times d}$ where $B=B^T$ and $X = X^T$, $a$ and $B$ are fixed.
Is then the function $$f(X) = ae^{\operatorname{tr}(BX)}$$ convex in X?
For $d=1$ this is definitely the case, but the introduction of the trace is what confounds me.
Yes, because if $X_1,X_2\in\mathbb{R}^{d\times d}$ and $t\in[0,1]$, then\begin{align}f\bigl(tX_1+(1-t)X_2\bigr)&=\exp\bigl(\operatorname{tr}\bigl(B.(tX_1+(1-t)X_2)\bigr)\bigr)\\&=\exp\bigl(\operatorname{tr}\bigl(tBX_1+(1-t)BX_2\bigr)\bigr)\\&=\exp\bigl(t\operatorname{tr}\bigl(BX_1\bigr)+(1-t)\operatorname{tr}\bigl(BX_2\bigr)\bigr)\\&\leqslant t\exp\bigl(\operatorname{tr}\bigl(BX_1\bigr)\bigr)+(1-t)\exp\bigl(\operatorname{tr}\bigl(BX_2\bigr)\bigr)\\&=tf(X_1)+(1-t)f(X_2).\end{align}