Inner Product on the space $P_2$ I would just like some confirmation on a problem and a small hint when starting the next.  The initial question is:

Show that $⟨p,q⟩=p(0)q(0)+p(1)q(1)+p(2)q(2)$ defines an inner product on the space $P_2$  of polynomials of degree at most 2. 

Here's my solution. 
$$\langle p,q \rangle = \langle (p(1),p(2),...,p(n)), (q(1),q(2),...,q(n))\rangle = \sum_{n=0}^\infty p(n)p(n) $$
For a degree 2 polynomial, this becomes $$ \sum_{n=0}^2 p(n)p(n) = p(0)q(0)+p(1)q(1)+p(2)q(2) $$
Therefore, this defines the inner product on the space of $P_2$. 
The next problem is:

Apply the Gram-Schmidt algorithm to the basis $\{1,x,x^2\}$ for $P_2$  to construct a basis $\{p_0,p_1,p_2 \}$  that is orthogonal with respect to the inner product of the previous problem.

I'm not sure how to approach this problem. If I could get a hint on how to set this up with respect to the inner product of the previous problem, I could figure the rest out easily enough. 
Thank you. 

How to perform the Gram-Schmidt algorithm:
Our new orthonormal basis will be $\{b_1, b_2, b_3\}$.  But first let's just find an orthogonal basis $\{c_1, c_2, c_3\}$ and then we'll normalize it.
Start with $c_1 = 1$.  OK, the first one was easy.
Now for $c_2$, we want to take the second basis vector in $\{1, x, x^2\}$ and subtract out its projection onto $c_1$:
$$\begin{align}c_2 &= x - \operatorname{proj}_{1}(x) \\ &= x - \frac{\langle 1,x\rangle}{\langle 1,1\rangle}1 \\ &= x - \frac{(1)(0) + (1)(1) + (1)(2)}{(1)(1)+(1)(1)+(1)(1)}1 \\ &= x - 1\end{align}$$
For $c_3$, we want to take $x^2$ and subtract out its projections onto $c_1$ and $c_2$:
$$\begin{align}
c_3 &= x^2 - \operatorname{proj}_{x-1}(x^2) - \operatorname{proj}_{1}(x^2) \\
&= x^2 - \frac{\langle x-1,x^2\rangle}{\langle x-1,x-1\rangle}(x-1) - \frac{\langle 1,x^2\rangle}{\langle 1,1\rangle}1 \\
&= x^2 - \frac{(-1)(0) + (0)(1) + (1)(4)}{(-1)(-1) + (0)(0) + (1)(1)}(x-1)  - \frac{(1)(0) + (1)(1) + (1)(4)}{(1)(1) + (1)(1) + (1)(1)}1\\
&= x^2 -2(x-1)-\frac 53 \\
&= x^2 - 2x +\frac 13
\end{align}$$
Now just normalize each of these by dividing each $c_i$ by $\sqrt{\langle c_i,c_i\rangle}$ to get your $b_i$'s and you're done.
