I understand that the quadratic form, $f(x) = x^TAx$, is convex with respect to $x$ so long as the matrix $A$ is positive semi-definite.
If we assume that $A$ remains positive semi-definite, is the more general expression:
$f(\theta) = x^T(\theta)Ax(\theta)$
also convex with respect to the parameters $\theta$?
Is the answer an obvious yes or is there more to this that I am missing?
In this sense, the function $f$ is actually a composition function, i.e., $f(\theta) = h(g(\theta))$, where $g(\theta) = x(\theta)\colon \mathbb{R}^n \to \mathbb{R}^k$ and $h(x) = x^TAx \colon \mathbb{R}^k \to \mathbb{R}$. If we do not know any more information of function $g$, it is difficult to determine the convexity of $f$.
Here is a counterexample. Let $k=n=2$, $g(\theta) = (\theta_1^2, -\theta_2^2)$, and $A = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$. Now the function \begin{equation} f(\theta) = \theta_1^4 - 2\theta_1^2\theta_2^2 + \theta_2^4 \end{equation} is not convex.