Consider the vector space of polynomials $\mathbb{R}[x]$. Let $p=\displaystyle \sum_{k=0}^{n} a_kx^k$ and $q= \displaystyle \sum_{j=0}^{n} b_jx^j$ be two polynomials each of degree $n$ in $\mathbb{R}[x]$. Assume that the sequence $\{s_n\}_{n=0}^\infty$ is positive definite and Let $L: \mathbb{R}[x] \rightarrow \mathbb{R}$ be a psoitive semi-definite linear functional suh that $L(x^n) =s_n , n\ge 0$.
This implies that $L(p^2)> 0$ for all $p \in \mathbb{R}[x], p\neq 0$. Then $$\left<p,q \right>:= L(pq), \quad p,q \in \mathbb{R}[x]$$ defines an inner product $\left<.,.\right>$ on $\mathbb{R}[x]$ since
$$ \left<p,q \right> = \left< \sum_{k=0}^{n} a_kx^k, \sum_{j=0}^{n} b_jx^j\right> =L(pq) = \sum_{k,j=0}^{n}s_{k+j}a_kb_j.$$
I was checking that indeed $\left<.,.\right>$ is an inner product. First $$\left<p,p \right> = L(p^2)\ge 0, \forall p \in \mathbb{R}[x].$$ Secondly $$\left<p,q \right>= L(pq)=L(qp) =\left<q,p \right>$$ I checked other properties of an inner product but I am a bit confused if this last property is true $\left<p,p \right>=0$ if and only if $p=0$ since $\{s_n\}_{n=0}^{\infty}$ is positive definite by assumption. It is clear to me that if p=0 then $\left<p,p\right>=0$ but I am not convinced with the reverse direction. Thanks for helping me.
This is not true. Here is a counterexample with $L(p^2)<0$.
Let $s=(1,2,1,\dots)$, $p=x-1$, then $p^2=x^2-2x+1$, and $L(p^2)=1-4+1=-2<0$.