  We consider a primitive distance-regular graph $\Gamma$ with diameter at
least $3$. We use the intersection numbers of $\Gamma$ to find a positive
semidefinite matrix $G$ with integer entries. We show that $G$ has determinant
zero if and only if $\Gamma$ is $Q$-polynomial.
