For certain polynomials $p(t), q(t)$ and $r(t)$, say we are given the following inner products.
$\begin{array} {|c|c|c|c|} \hline \langle, \rangle & p & q & r \\ \hline p & 4 & 0 & 8 \\ \hline q & 0 & 1 & 0 \\ \hline r & 8 & 0 & 50 \\ \hline \end{array}$
For example, $\langle q, r \rangle = \langle r, q \rangle = 0$. Let $E$ be the span of $p$ and $q$. Find the orthogonal projection $\text{Proj}_E r$ (express it as linear combination of $p$ and $q$) and an orthonormal basis of the span of that three polynomials in linear combination form.
Usually, I encounter a problem that the polynomials already given and then it can be easier to determine the orthonormal basis in that case. However, I have read my textbook and about orthogonal projection I don't have much idea to show. How that is and what about the orthonormal basis? How can we determine it by just looking at the table of inner products given above?
You use the definition: since $p,q$ are mutually orthogonal,
$$ \text{Proj}_Er=\frac{\langle r,p\rangle} {\langle p,p\rangle}\,p +\frac{\langle r,q\rangle} {\langle q,q\rangle}\,q. $$