# General quadratic form of two variables

I was referring to this lecture http://www.stanford.edu/class/ee364a/videos/video04.html. and he gave an example of a generalized quadratic equation

f(x,y) = x'Ax + 2x'By + y'Cy


The functions is convex if the matrix

A B

B' C

is positive semidefinite and also the matrix C. I didn't get how this is derived and how the function f(x,y) is a generalized quadratic equation

-

## migrated from stats.stackexchange.comJun 19 '12 at 17:26

This question came from our site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.

Consider $z=\begin{pmatrix} x \\ y\end{pmatrix}$, then $f(x,y)=g(z)$ with $g(z)=z'Mz$ for $M=\begin{pmatrix} A & B \\ B' & C\end{pmatrix}$. Thus, $f$ is quadratic. And $f$ is convex if an only if $M$ is positive semidefinite (and this condition implies that $C$ is positive semidefinite as well hence there is no need to add this further condition).