Is this matrix defined from an integral of a non-negative function positive definite?

50 Views Asked by At

I have a function $f(x)$ defined as

\begin{equation} f(x) := \sum_{n = 1}^N c_n f_n(x) = \mathbf{f}(x)^T \mathbf{c}, \end{equation}

where

\begin{align} \mathbf{f}(x) := \begin{bmatrix} f_1(x) \\ f_2(x) \\ \vdots \\ f_N(x) \end{bmatrix}, \quad \mathbf{c} := \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_N \end{bmatrix}. \end{align}

Think of the $f_n(x)$ as polynomials and $c_n \in \mathbb{R}$. I am interested in the following integral over some domain $D$:

\begin{equation} \int_D f(x)^2 \, \mathrm{d}x. \end{equation}

Substituting the definition of $f(x)$ and simplifying a bit, we get

\begin{align} \int_D f(x)^2 \, \mathrm{d}x &= \int_D (\mathbf{f}(x)^T \mathbf{c})^2 \, \mathrm{d}x \\ &= \int_D (\mathbf{f}(x)^T \mathbf{c}) (\mathbf{f}(x)^T \mathbf{c}) \, \mathrm{d}x \\ &= \int_D \mathbf{c}^T \mathbf{f}(x) \mathbf{f}(x)^T \mathbf{c} \, \mathrm{d}x \quad \text{(transpose of scalar)} \\ &= \mathbf{c}^T \int_D \mathbf{f}(x) \mathbf{f}(x)^T \, \mathrm{d}x \, \mathbf{c} \\ \end{align}

Let us define the matrix $F := \int_D \mathbf{f}(x) \mathbf{f}(x)^T \, \mathrm{d}x$. Notice that $F$ is square and symmetric. We finally obtain

\begin{equation} \int_D f(x)^2 \, \mathrm{d}x = \mathbf{c}^T \, F \, \mathbf{c}. \end{equation}

I believe that the last equality proves that the matrix $F$ is positive definite, but Matlab disagrees with me. Is my reasoning correct, or am I missing something?