What is the distribution of $x'Cx$ when $x$ is a standard gaussian vector When $x$ is an '$n$' dimensional standard Gaussian, we have $x'x \sim \chi^2$ with $n$ degrees of freedom. 
Now if I have a symmetric matrix $C$, what will be the distribution of $x'Cx$ ?
$C$ is the inverse of a positive definite matrix, like an inverse covariance matrix for example.
 A: For $C$ idempotent, the distribution is chi-square with degrees of freedom the rank of $C$. 
A: You may look at 
http://en.wikipedia.org/wiki/Wishart_distribution
for $n=1$ (or $p=1$ depending on your taste).
A: $\def\E{\mathbf{E}}\def\V{\mathbf{Var}}\def\T{\mathbf{Tr}}$This may not be particularly helpful, but what you have is called simply the Generalized chi-square distribution.
You can calculate some of its moments without too much difficulty (you should check the calculations, though...)
$$\E(x'Cx) = \E(C_{ij}x_ix_j) = C_{ij}\delta_{ij} = \T(C)$$
$$\begin{align}
\V(x'Cx) & = \E(C_{ij}C_{mn}x_ix_jx_mx_n) - \E(x'Cx)^2\\
& = C_{ij}C_{mn}\E(x_ix_jx_mx_n) - \T(C)^2 \\
& = C_{ij}C_{mn} (\delta_{ij}\delta_{mn} + \delta_{im}\delta_{jn} + \delta_{in}\delta_{jm}) - \T(C)^2 \\
& = \T(C\,'C) + \T(C^2)
\end{align}$$
If you substitute $C=I$ then you recover $\E(x'x)=n$ and $\V(x'x)=2n$, as you'd expected for a regular chi-square distribution.
The Wikipedia article implies that the distribution is equivalent to a sum of independent chi-square distributed random variables, but this is not obvious to me from the definition.
