[Math] Finding an orthonormal basis using Gram Schmidt process

linear algebravector-spaces

OK, here's a question with polynomials. We want to find an orthonormal basis using Gram Schmift.

Assuming that we are in a vector space V, $R^2[X]$ where {$f = \lambda_0+\lambda_1X+\lambda_2X^2$}. Since X is a polynomial it gets treated differently than if it were just a variable, correct? because if we are defining the inner product as $\langle f,g \rangle = \int^1_0 f \centerdot g \ dx$ and the basis B is $B= ${$3, 1+X, X^2$} the first vector is simply $v_1=3$. The next one I am not sure about, because of the integral. And because it's a polynomial. I am unsure of how to apply Gram Schmidt here. WHen I apply the formula — or try to — I get some weird results. My first thought was to do this:

$$v_2= b_2 – \frac{\langle b_2, v_1 \rangle}{ \lVert v_1 \rVert^2} v_1$$ and get $$v_2= 1+X – \frac{\langle 1+X, 3 \rangle}{ \lVert 3 \rVert^2} 3$$ but something tells me that's wrong. I know I am supposed to work the integral in there but I am not sure how, because X is a polynomial and not a variable.

Best Answer

Hint: The norm associated with an inner product is defined by $$ \|f\|^2=\langle f,f\rangle. $$ So, for instance, $$ \|1+x\|^2=\langle 1+x,1+x\rangle=\int_0^1(1+x)(1+x)\,dx=\frac{7}{3}, $$ and so $\|1+x\|=\sqrt{\frac{7}{3}}$.

So, to perform Gram-Schmidt: say we are given $f_1(x)=3$, $f_2(x)=1+x$, and $f_3(x)=x^2$, and we want to come up with an orthonormal basis $\{e_1,e_2,e_3\}$.

We start by taking $v_1=f_1=3$; then $e_1=\frac{v_1}{\|v_1\|}$. But $$ \|v_1\|^2=\langle v_1,v_1\rangle=\int_0^1 v_1\cdot v_1\,dx=\int_0^19\,dx=9, $$ and so $\| v_1\|=3$; hence $e_1=\frac{3}{3}=1$.

Now, we take $v_2:=f_2-\text{proj}_{e_1}(f_2)$, where $\text{proj}_a(b)$ is the projection of $b$ on to $a$. We have $$ \text{proj}_{1}(1+x)=\frac{\langle 1,1+x\rangle}{\|e_1\|^2}\cdot 1=\frac{\int_0^1 1\cdot(1+x)\,dx}{1^2}\cdot1=\frac{3}{2}, $$ so that $v_2=(1+x)-\frac{3}{2}=-\frac{1}{2}+x$. If you check, you will find that $v_2$ is orthogonal to $e_1$, as it should be! So, we make it a unit vector by dividing by its norm. Here, $$ \left\|-\frac{1}{2}+x\right\|^2=\left\langle-\frac{1}{2}+x,-\frac{1}{2}+x\right\rangle=\int_0^1\left(-\frac{1}{2}+x\right)^2\,dx=\frac{1}{12}, $$ so that $\|-\frac{1}{2}+x\|=\frac{1}{2\sqrt{3}}$, and we define $$ e_2=\frac{v_2}{\|v_2\|}=-\sqrt{3}+2\sqrt{3}x. $$ See if you can get the last one from there.