Let $A$ be a matrix whose entries are given by a polynomial,

$$ A_{ij} = p(\lambda_i, \lambda_j) $$ where $p(\lambda_i,\lambda_j) = p(\lambda_j,\lambda_i)$ is symmetric.

Are there standard methods for showing that $A\geq 0$ is positive semidefinite, given a polynomial $p$?

I could imagine that there are some sum-of-squares methods, but I don't know exactly how to use these here. Also, I think these sort of matrices are known as polynomial matrix, usually they defined by a univariate polynomial however. I would be very happy for any pointers.

**edit**: In particular, I have the following polynomial as "kernel"
$$
p(\lambda_i,\lambda_j) = x^4 \lambda_i \lambda_j + x^2 \lambda_i^2 \lambda_j^2 - 3x^2 \lambda_i \lambda_i + 1
$$
where $x\geq 0$ is some constant. Clearly, one has $p(\lambda_i,\lambda_j) \geq 0$ when $\lambda_i,\lambda_j\geq 0$.

I believe that $A\geq 0$ when $0 \leq x\leq 1$ and $0\leq\lambda_i\leq 1$ with $\sum_i \lambda_i = 1$.

Setting $y=\lambda_i=\lambda_j$, one retrieves the Motzkin polynomial $$ p(x,y) = x^4 y^2 + x^2 y^4 - 3x^2 y^2 + 1 $$

3more comments