# Gram Schmidt process on a polynomial

I'm currently learning Linear Algebra and I was asked to calculate the orthogonal projection of the vector $x^3$ on a subspace of $R_5[x]$ - $U = Sp\{1, x, x^2\}$ with the integral dot product in $[0,1]$.

I'm trying to get the orthogonal base of $U$, but I'm having trouble with the Gram-Schmidt process.

Can someone please help me get the orthogonal base of $U$? I keep getting the same non-orthogonal base using the Gram-Schmidt process...

The base I get is $\{1, x-\frac12, x^2-x-\frac56\}$, and the dot product of the last two vectors isn't zero...

• For us to find your error, you must show us your calculations. Mar 30, 2018 at 11:59
• Let's mark $v_1=1, v_2=x, v_3=x^2$. $u_1=v_1=1$, $u_2 = v_2 - <v_2, u_1>/<u_1, u_1> = x - 1/2$, $u_3 = v_3 - <v_3, u_1>/<u_1, u_1> - <v_3, u_2>/<u_2, u_2> = x^2-x-5/6$ Mar 30, 2018 at 13:04
• That doesn’t really show your calculations. My guess is that you’re making some error in computing an inner product. Try doing this orthogonalization in $\mathbb R^3$ instead, with the inner product $\langle x,y\rangle = x^TAy$ for a suitable matrix $A$. Computing $A$ only involves integrating $x^0$ through $x^4$, so there’s little room for error there.
– amd
Mar 30, 2018 at 17:43

There's another problem with your answer: the second and the third functions don't have norm $$1$$. Did you forget to divide by the norm? What I got was$$\bigl\{1,\sqrt3(2x-1),\sqrt5\left(6x^2-6x+1\right)\bigr\}.$$