# Linear Algebra inner products & orthonormal basis

Let \begin{align}f(x)&=4 \\ g(x)&=−5x+1 \\ h(x)&=−2x^2+2x−6\end{align} Consider the inner product $$\langle p(x),q(x)\rangle :=p(−1)q(−1)+p(0)q(0)+p(1)q(1)$$ in the vector space $\mathcal P_2$ of polynomials of degree at most $2$. Use the Gram-Schmidt process to determine an orthonormal basis for the subspace of $\mathcal P_2$ spanned by the polynomials $f(x)$, $g(x)$, and $h(x)$.

I know the formula for the Gram-Schmidt process where $V_1 = S_1$ and $V_2 = S_2 - \operatorname{proj}_{S_1} V_1$, etc. I'm not sure how to do this in terms of inner products though and what exactly the process I should be going through is.

• The projection of $A$ onto $B$ is $<A,B'>B'$ where $B'=B/\|B\|$ where $\|B\|$ is the square root of $<B,B>$.. Dec 7, 2015 at 3:26
• @user254665 Or equivalently (since $\|B\|$ appears as a factor twice in the denominator), ${\langle A,B\rangle\over\langle B,B\rangle} B$.
– amd
Dec 7, 2015 at 7:54

The general Gram-Schmidt Procedure is as follows. Given an Inner Product Space $V$ equipped with the inner product $\langle \circ,\circ\rangle$, and a basis $v_1,...,v_n$, the $j^{th}$ orthonormal vector given by the Gram-Schmidt Procedure is: $$e_j=\frac{v_j-\langle v_j,e_1\rangle e_1 -\dots-\langle v_j,e_{j-1}\rangle e_{j-1}}{\lVert v_j - \langle v_j,e_1\rangle e_1-\dots-\langle v_j,e_{j-1}\rangle e_{j-1}\rVert}.$$ Then, $e_1,...,e_n$ is an orthonormal basis for the space. Note that $$\langle v,e_j\rangle e_j$$ is the projection onto $e_j$ of the vector $v\in V$. So, if we define the inner product on the space to be $$\langle p(x),q(x)\rangle:=p(-1)q(-1)+p(0)q(0)+p(1)q(1),$$ We can compute the orthonormal basis by fixing $$e_1=\frac{4}{\lVert 4\rVert}.$$ Can you complete the process?