# Gram-Schmidt orthogonalization basis for Continuous functions

Use Gram-Schmidt orthogonalization process to find an orthogonal basis of

1. the subspace of $\mathbb{R}^4$ spanned by $v_1=(1,1,0,0),v_2=(1,1,1,0) \,and, v_3=(1,1,1,1)$ with respect to the (standard) inner product $<(x_1,x_2,x_3,x_4),(y_1,y_2,y_3,y_4)>=x_1y_1+x_2y_2+x_3y_3+x_4y_4$.
2. the subspace of $\mathbb{R}^4$ spanned by $V_1=(1,1,0,0),v_2=(1,1,1,0) \,and, v_3=(1,1,1,1)$ with respect to the inner product $<(x_1,x_2,x_3,x_4),(y_1,y_2,y_3,y_4)>=x_1y_1+2x_2y_2+x_3y_3+2x_4y_4$.
3. the subspaces of $W_1$, where $W_1$ is the subspace of C(0,1); spanned by the functions $\{e^x,xe^x,x^2e^x\}$ with the inner product $<f,g>=\int_0^1f(x)g(x)\,dx$

$\textbf{Orthogonal basis for Part a}$ \begin{cases} \overrightarrow{y_1}=v_1=(1,1,0,0) \\ \overrightarrow{y_2}=v_2-P_{\overrightarrow{y_1}} v_2=v_2-\overrightarrow{y_1}\frac{<\overrightarrow{y_1},v_2>}{<\overrightarrow{y_1},\overrightarrow{y_1}>}=(1,1,1,0)-(1,1,0,0)\frac{2}{2}=(0,0,1,0) \\ \overrightarrow{y_3}=v_3-P_{\overrightarrow{y_1}}v_3-P_{\overrightarrow{y_2}}v_3=(1,1,1,1)-(1,1,0,0)\frac{2}{2}-(0,0,1,0)\frac{1}{1}=(0,0,0,1) \\ \end{cases}

Hence the orthogonal basis is $\{(1,1,0,0);(0,0,1,0);(0,0,0,1)\}$.

$\textbf{Orthogonal basis for Part b}$ \begin{cases} \overrightarrow{y_1}=v_1=(1,1,0,0) \\ \overrightarrow{y_2}=v_2-P_{\overrightarrow{y_1}} v_2=v_2-\overrightarrow{y_1}\frac{<\overrightarrow{y_1},v_2>}{<\overrightarrow{y_1},\overrightarrow{y_1}>}=(1,1,1,0)-(1,1,0,0)\frac{3}{3}=(0,0,1,0) \\ \overrightarrow{y_3}=v_3-P_{\overrightarrow{y_1}}v_3-P_{\overrightarrow{y_2}}v_3=(1,1,1,1)-(1,1,0,0)\frac{3}{3}-(0,0,1,0)\frac{1}{1}=(0,0,0,1) \\ \end{cases} ]

Hence the orthogonal basis is $\{(1,1,0,0);(0,0,1,0);(0,0,0,1)\}$.

$\textbf{Orthogonal basis for Part c}$ \begin{cases} \overrightarrow{y_1}=v_1 \\ \overrightarrow{y_2}=v_2-P_{\overrightarrow{y_1}} v_2=v_2-\overrightarrow{y_1}\frac{<\overrightarrow{y_1},v_2>}{<\overrightarrow{y_1},\overrightarrow{y_1}>} \\ \overrightarrow{y_3}=v_3-P_{\overrightarrow{y_1}}v_3-P_{\overrightarrow{y_2}}v_3\\ \end{cases}

How would I do the process for this one?

• You need to evaluate all the terms in the expression for $y_2$. Presumably $v_2$ and $y_1$ are easy -- they're functions you already have written down. Can you evaluate $\langle y_1, v_2\rangle$? You'll need to actually compute an integral to do so. – John Hughes Sep 17 '14 at 20:21
• But what do I call $v_1$ and so on? – Username Unknown Sep 17 '14 at 20:29
• $v_1$ is the function $x \mapsto e^x$; $v_2$ is the function $x \mapsto xe^x$, etc. – John Hughes Sep 17 '14 at 20:30
• So just to clarify I name f(x)=x and g(x) whichever element in the basis of $W_1$? – Username Unknown Sep 17 '14 at 20:32
• No. First, $y_1$ is just $v_1$ which is $x \mapsto e^x$. So to find $y_2$, you need to compute, for starters, $\langle y_1, y_1 \rangle$. The definition of the inner product that's given says that this is $\int_0^1 y_1(x) y_1(x) ~dx = \int_0^1 e^x e^x ~dx = \int_0^1 e^{2x}~dx$. I'll let you go ahead and evaluate that. – John Hughes Sep 17 '14 at 20:35