I know that quadratic functions, i.e. functions of the form $f(x) = \frac{1}{2}x^TAx+b^Tx+c$ (with $A\in\mathbb{R}^{nxn}$, $b\in\mathbb{R}^n$, $c\in\mathbb{R}$), are convex over $\mathbb{R}^n$ when A is positive semi-definite (PSD).
Is this in general true for functions of the form of $g(x)=f^2(x)$? (i.e. $g(x)=(\frac{1}{2}x^TAx+b^Tx+c)^2$) How can I show this?
Thank you!!
In general, if $f$ is convex on a convex domain $D$, and $h$ is convex and increasing on a set containing $f(D)$, then $h \circ f$ is convex on $D$. That is,
$$ f(t x + (1-t) y) \le t f(x) + (1-t) f(y) $$ implies $$ h(f(t x + (1-t) y)) \le h(t f(x) + (1-t) f(y)) \le t h(f(x)) + (1-t) h(f(y))$$
Since $h(t) = t^2$ is convex and increasing on $[0,\infty)$, $f^2$ will be convex when $f$ is convex and nonnegative. So what you need in your example is $\frac12 x^T A x + b x + c \ge 0$.