Inner product of polynomials defined using determinant. The following question was on my qualifying exam. I'd like to understand this question, but I've never seen anything like this, so I don't even know what key words to research or where to look for more information. I'm not necessarily looking for an answer to the following question. Rather, in years past, exams have routinely featured a question that explores the connection between determinants and polynomials, such as the following question. So any sources with more information about this topic, or any hints about the following problem, would be much appreciated!

Question.
Consider a continuous function $f: \mathbb{R} \rightarrow (0, \infty)$ such that $\int_{-\infty}^\infty |x|^j f(x) \ dx < \infty$ for all $j \geq 0$. Denote by $\mathcal{P}_m$ the vector space of all real-valued polynomials of degree at most $m$, equipped with the inner product $$\langle g, h \rangle = \int_{-\infty}^\infty g(x)h(x)f(x) \ dx.$$ Let $m_j = \int_{-\infty}^\infty x^j f(x) \ dx \ (j = 0, 1, 2, \dots)$ and consider the polynomials $p_0(x) = m_0$ and
\begin{align}
p_n(x) = \det \left( \begin{matrix} 
m_0 & m_1 & m_2 & \dots & m_n \\
m_1 & m_2 & m_3 & \dots & m_{n+1} \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
m_{n-1} & m_n & m_{n+1} & \dots & m_{2n-1} \\
1 & x & x^2 & \dots & x^n 
\end{matrix} \right) \ \ \ \ n = 1, 2, \dots
\end{align}
Prove that $p_0, \dots, p_m$ are orthogonal in $\mathcal{P}_m$.

Observations. I have been able to ascertain the following intuition: Any (nonzero) polynomial cannot be integrated from $-\infty$ to $\infty$, so for polynomials $g, h \in \mathcal{P}_m$, their product will certainly fail to have an integral. Therefore, the function $f$ is introduced. The function $f$ must have tails that go to zero fast enough so that not only can $f$ can be integrated across all of $\mathbb{R}$, but also $f$ modulates the end behavior of the term $x^j$ so that it can be integrated. Then, the product of $f$ and $g$ will be a polynomial, the integral of a polynomial can be split across the terms, the coefficients pulled out of the integrals, and the result will be of the form $\sum_{j=1}^{2m} a_j \int_{-\infty}^\infty x^j f(x) \ dx = \sum_{j=1}^{2m} a_j m_j$, where $a_j$ is some constant and $m_j$ is defined as per the problem.
Lastly, I have checked a couple of lower order polynomials and confirmed that their inner product is zero. The computations have felt a little like the kind of index-tracking exercises that I've done during my limited exposure to multilinear algebra. So I am thinking that maybe with more powerful tools for tracking indices, I can prove the desired result. Or maybe it is an induction on $m$. Or maybe it has something to do with somehow forcing a determinant to have linearly dependent rows. If you have read this far, bless your heart!
 A: Note that every $p_n(x)$ is a linear combination of $1, x, \ldots,x^n$ ( the expansion of the determinant w r to last row). So, to show that $p_n(x)$ is orthogonal to all the $p_0,\ldots,p_{n-1}$ - all linear combinations of $1, \ldots, x^{n-1}$, it is enough to show that $p_n$ is orthogonal to all the $x^k$, $k=0, 1, \ldots, n-1$. But notice that the inner product with $x^k$ is a determinant similar to the one given, except that the last row is the inner products of $1, \ldots, x^n$ with $x^k$. Now, if $0\le k\le n-1$, this will give a determinant with $2$ equal rows, and hence $0$.
A: OP here. I was able to answer this question (I think), thanks to the excellent hint from orangeskid. If you spot any errors in this answer, be sure to let me know!

Solution.
For any $k$, polynomial $p_k(x) = \sum_{j=0}^k a_j x^j$ where each $a_j$ is some constant, and so for any $k < n \leq m$, we have $\langle p_k(x), p_n(x) \rangle = \sum_{j=0}^k a_j \langle x^j, p_n(x) \rangle$. Therefore, it suffices to show that $\langle x^j, p_n(x) \rangle = 0$ for $j < n$.
We expand $p_n(x)$ along the bottom row of the determinant, obtaining $p_n(x) = C_0 + C_1x + \dots + C_n x^n$ where each $C_i$ is the cofactor obtained by removing the bottom row and the $i$-th column of the determinant matrix of $p_n(x)$. Now observe that
\begin{align}
    \langle x^j, p_n(x) \rangle &= \int_{-\infty}^{\infty} x^j p_n(x) f(x) \ dx \nonumber \\
    &= \int_{-\infty}^{\infty} x^j (C_0 + C_1x + \dots + C_n x^n) f(x) \ dx \nonumber \\
    &= C_0 \int_{-\infty}^{\infty} x^j f(x) \ dx + C_1 \int_{-\infty}^{\infty} x^{j+1} f(x) \ dx + \dots + C_n \int_{-\infty}^{\infty} x^{j+n} f(x) \ dx \\
    &= C_0 m_j + C_1 m_{j+1} + \dots + C_n m_{j+n}
\end{align}
where the $C_i$ can be pulled out of the integrals in the third line because each $C_i$ is just a constant. Now, observe that the result in the fourth line can be rewritten as
\begin{align}
    C_0 m_j + C_1 m_{j+1} + \dots + C_n m_{j+n} =
    \det \left( \begin{matrix} 
    m_0 & m_1 & m_2 & \dots & m_n \\
    m_1 & m_2 & m_3 & \dots & m_{n+1} \\
    \vdots & \vdots & \vdots & \ddots & \vdots \\
    m_{n-1} & m_n & m_{n+1} & \dots & m_{2n-1} \\
    m_j & m_{j+1} & m_{j+2} & \dots & m_{j+n} 
    \end{matrix} \right)
\end{align}
If $j < n$ then the final row of the determinant above is equal to the $j+1$ row, so that the determinant is zero. Hence, for all $j < n$, we have $\langle x^j, p_n(x) \rangle = 0$. And finally, for any $k < n \leq m$, the polynomial $p_k(x)$ is a linear combination of such $x^j$, so that $\langle p_k(x), p_n(x) \rangle = 0$ as desired.
