Shortly, the LQR problem says that: for $\begin{cases} x'=Ax+Bu \\ x(t_0)=x_0\end{cases}$ find:
$$\min_{u\in L^2(t_0,T; \mathbb{R}^m)} J(u)=\frac{1}{2}\left\{\int_{t_0}^T x^TQx+u^TRu+2x^TNu\ dt + x(T)^TPx(T)\right\}$$
where $Q,P$ are positive semi-definite matrices and $R$ is positive definite.
I know that there is an entire theory of finding the optimal control $u^*$ (see https://en.wikipedia.org/wiki/Linear%E2%80%93quadratic_regulator or http://www.joinville.udesc.br/portal/professores/marianasantos/materiais/lqrnotes_Regra_de_Bryson.pdf)
Why is so important that the matrices $Q,P,R$ be positive definite like I mentioned before? I know that there is a scalar product induced by this type of matrices, but is this so important?
For the problem
$$ \begin{aligned} \min J &= \int_{t_0}^{t_f} x^TQx + u^TRu \; dt + \left[ x^TPx \right|_{t_f}\\ \text{Subject to:} \; x' &= Ax + Bu \end{aligned} $$
for $Q \geq 0$, $R > 0$, and $P \geq 0$, then you have
$$ 0 \leq J \leq \infty $$
Requiring $Q$ and $R$ to be positive (semi)definite prevents the integral from becoming unbounded on the lower end. Requiring $P$ to be positive semidefinite is the same idea, just not under the integral. Minimizing a function whose lower bound is $-\infty$ causes difficulties, if not impossible. Take this idea and extend it with the extra $x^TNu$ term, which is a bit more complicated since, in general, setting $N > 0$ will not prevent a lower unbounded integral.