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.

  • $\begingroup$ Great. Thank you for the response. Besides the obvious linear parameterization case, $x(\theta) = \sum_i c_i\theta_i$, would there be a simple way of knowing which cases admit convexity? Or does it simply boil down to a case-by-case basis requiring the calculation of the Hessian every time? $\endgroup$ – G Flash May 12 '20 at 14:54
  • $\begingroup$ @GFlash, Maybe you can refer to Stephen Boyd's Book convex optimization (Page. 83), They analyze the convexity of some specific composite functions. (But it seems that the situation you are considering is not included) $\endgroup$ – Ze-Nan Li May 13 '20 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.