Let $v \in \Bbb R^n$, and $f:\Bbb R^n \to \Bbb R^n$ with $f(x)=\langle x,(vv^T)x\rangle$. Show that $f$ is convex.
I'm looking for different approaches to solve this (rather simple) problem. Every tools are allowed. This is one solution:
The Hessian of $f$ at $x$ is $H_f(x)=2vv^T$, then $\langle y,H_f(x)y\rangle= 2 (v^Ty)^2 \geq 0$ for every $y \in \Bbb R^n$ and thus $H_f(x)$ is positive semi-definite and by the second order condition for convex functions it follows that $f$ is convex.