Is there a generalization of the Cauchy-Schwarz inequality along the following lines? Let $V$ be an inner product space (for simplicity of notation, let us work over the real numbers). Let $v\_1, \ldots, v\_n$ be in $V$. Let $G$ denote the Gram matrix of the $v\_i$, namely, $G$ consists of all possible $(v\_i, v\_j)$, as $i,j = 1, \ldots, n$, where $(-,-)$ is the inner product in $V$. The usual Cauchy-Schwarz inequality, with $n=2$, can be written as follows, to get rid of square roots:


$$ \det(G) = (v\_1,v\_1)(v\_2,v\_2) - (v\_1,v\_2)^2 \geq 0, $$


with equality iff $v\_1$ and $v\_2$ both belong to some $1$-dimensional subspace of $V$. So in this case, for $n=2$, the LHS is a homogeneous polynomial in $G$ of degree $2$, and equality is achieved iff $v\_1$ and $v\_2$ both belong to some $1$-dimensional subspace.


For the general $n$ case, is there a higher degree homogeneous polynomial in $G$ which is non-negative for any $v\_1, \ldots, v\_n$ in $V$, and which vanishes iff the $v\_i$, for $i = 1,\ldots, n$ all lie in some $1$-dimensional subspace of $V$?


(I suspect there may be such a polynomial of degree $2 \lfloor \frac{n(n+1)}{4} \rfloor$. So for instance, if $n=2$, the expected degree is $2$. If $n=3$, the expected degree is $6$, and so on.)



Higher order generalization of Cauchy-Schwarz?
Yes, because the OP stated that the ground field is $\mathbb{R}$, one can simply take the octic polynomial
$$
Q(v\_1,v\_2,\ldots,v\_n) = \sum\_{1\le i < j\le n} \bigl((v\_i,v\_i)(v\_j,v\_j)-(v\_i,v\_j)^2\bigr)^2,
$$
which will do the trick.


