  Let $\Gamma$ be a finitely presented group and $G$ a linear algebraic group
over $\mathbb{R}$. A representation $\rho:\Gamma\rightarrow G(\mathbb{R})$ can
be seen as an $\mathbb{R}$-point of the representation variety
$\mathfrak{R}(\Gamma, G)$. It is known from the work of Goldman and Millson
that if $\Gamma$ is the fundamental group of a compact K{\"a}hler manifold and
$\rho$ has image contained in a compact subgroup then $\rho$ is analytically
defined by homogeneous quadratic equations in $\mathfrak{R}(\Gamma, G)$. When
$X$ is a smooth complex algebraic variety, we study a certain criterion under
which this same conclusion holds.
