Homework 10

1. Consider R4\R^4. Let u=[1234]\mathbf{u} = \begin{bmatrix} 1 \\ 2 \\ 3 \\ 4\end{bmatrix} and v=[5678]\mathbf{v} = \begin{bmatrix} 5 \\ 6 \\ 7 \\ 8\end{bmatrix}. Find the basis for the orthogonal complement of W=span{u,v}W = \operatorname{span}\set{\mathbf{u}, \mathbf{v}}.

Let A=[uv]A = \begin{bmatrix} | & | \\ \mathbf{u} & \mathbf{v} \\ | & | \end{bmatrix}. Then, W=kerA=ker[12345678]W^\perp = \ker A^\top = \ker\begin{bmatrix} 1 & 2 & 3 & 4 \\ 5 & 6 & 7 & 8 \end{bmatrix}.

rref[12345678]=[10120123]y=2z3wx=z+2wz,wR\operatorname{rref}\begin{bmatrix} 1 & 2 & 3 & 4 \\ 5 & 6 & 7 & 8 \end{bmatrix} = \begin{bmatrix} 1 & 0 & -1 & -2 \\ 0 & 1 & 2 & 3 \end{bmatrix} \\[1em] \therefore y = -2z-3w \\ x = z + 2w \\ z,w\in\R

As such,

W={[z+2w2z3wzw]:z,wR}=span{[1210],[2301]}.W^\perp = \Set{ \begin{bmatrix} z + 2w \\ -2z-3w \\ z \\ w \end{bmatrix} : z,w \in\R } = \operatorname{span}\Set{ \begin{bmatrix} 1 \\ -2 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 2 \\ -3 \\ 0 \\ 1 \end{bmatrix} }.

2. Find the orthogonal projection of the vector (1,1,1)(1, 1, 1) onto the subspace defined by the equations {x+y+z=0,xy2z=0,\begin{cases}x + y + z = 0, \\x − y − 2z = 0, \\\end{cases}

Let WW be the subspace defined by the above equation.

rref[111112]=[10120132]y=32zx=12zzRW={[12z32zz]:zR}=span{[12321]}\operatorname{rref}\begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & -2 \end{bmatrix} = \begin{bmatrix} 1 & 0 & -\frac{1}{2} \\[.5em] 0 & 1 & \frac{3}{2} \end{bmatrix} \\[1em] \therefore y = -\frac{3}{2}z \\[.5em] x = \frac{1}{2}z \\[.5em] z\in\R \\[.5em] \therefore W = \Set{ \begin{bmatrix} \frac{1}{2}z \\[.5em] -\frac{3}{2}z \\[.5em] z \end{bmatrix}: z\in\R } = \operatorname{span}\Set{ \begin{bmatrix} \frac{1}{2} \\[.5em] -\frac{3}{2} \\[.5em] 1 \end{bmatrix} }

Let x=[111]\vector{x}=\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} and v=[12321]\vector{v}=\begin{bmatrix} \frac{1}{2} \\[.5em] -\frac{3}{2} \\[.5em] 1 \end{bmatrix}. Then, the orthogonal projection of x=[111]\vector{x}=\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} is given by

projW(x)=x,vv2v=[111],[12321][12321]2[12321]=1232+114+94+1[12321]=0.\begin{align*} \operatorname{proj}_W(\vector{x}) = \frac{\langle\vector{x},\vector{v}\rangle}{||\vector{v}||^2}\vector{v} &= \frac{\left\langle\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix},\begin{bmatrix} \frac{1}{2} \\[.5em] -\frac{3}{2} \\[.5em] 1 \end{bmatrix}\right\rangle} {\left|\left|\begin{bmatrix} \frac{1}{2} \\[.5em] -\frac{3}{2} \\[.5em] 1 \end{bmatrix}\right|\right|^2} \begin{bmatrix} \frac{1}{2} \\[.5em] -\frac{3}{2} \\[.5em] 1 \end{bmatrix} \\ &= \frac{\frac{1}{2}-\frac{3}{2}+1} {\frac{1}{4}+\frac{9}{4}+1}\begin{bmatrix} \frac{1}{2} \\[.5em] -\frac{3}{2} \\[.5em] 1 \end{bmatrix} \\ &= \vector{0}. \end{align*}

3. Find the orthogonal basis of R3\R^3 with [110]\begin{bmatrix} 1 \\ 1 \\ 0\end{bmatrix} as one of the vectors. Hint: You can use Gram-Schmidt process on a basis with [110]\begin{bmatrix} 1 \\ 1 \\ 0\end{bmatrix} as the first vector. e.g. {[110],[010],[001]}.\Set{ \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}}.

Let w1=[110]\vector{w}_1 = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}, w2=[010]\vector{w}_2 = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, and w3=[001]\vector{w}_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}.

Let v1=w1=[110]\vector{v}_1 = \vector{w}_1 = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}. Then, using the Gram–Schmidt process, the orthogonal vectors v2\vector{v}_2 and v3\vector{v}_3 are given by the following.

v2=w2projv1(w2)=w2w2,v1v12v1=[010][010],[110][110]2[110]=[010]0(1)+1(1)+0(0)12+12+02[110]=[12120]v3=w3projv1(w3)projv2(w3)=w3w3,v1v12v1w3,v2v22v2=[001][001],[110][110]2[110][001],[12120][12120]2[12120]=[001]0[110]0[12120]=[001]\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \vector{v}_2 &= \vector{w}_2 - \operatorname{proj}_{\vector{v_1}}(\vector{w}_2) \\ &= \vector{w}_2 - \frac{<\vector{w}_2,\vector{v}_1>}{||\vector{v}_1||^2}\vector{v}_1 \\ &= \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} - \frac{<\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}>}{\norm{\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}}^2}\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} \\ &= \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} - \frac{0(1) + 1(1) + 0(0)}{1^2 + 1^2 + 0^2} \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} \\ &= \begin{bmatrix} -\frac{1}{2} \\ \frac{1}{2} \\ 0 \end{bmatrix} \\[3em] \vector{v}_3 &= \vector{w}_3 - \operatorname{proj}_{\vector{v}_1}(\vector{w}_3) - \operatorname{proj}_{\vector{v}_2}(\vector{w}_3) \\ &= \vector{w}_3 - \frac{<\vector{w}_3, \vector{v}_1>}{\norm{\vector{v}_1}^2}\vector{v}_1 - \frac{<\vector{w}_3, \vector{v}_2>}{\norm{\vector{v}_2}^2}\vector{v}_2 \\ &= \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} - \frac{<\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}>}{\norm{\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}}^2}\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} - \frac{<\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} -\frac{1}{2} \\ \frac{1}{2} \\ 0 \end{bmatrix}>}{\norm{\begin{bmatrix} -\frac{1}{2} \\ \frac{1}{2} \\ 0 \end{bmatrix}}^2}\begin{bmatrix} -\frac{1}{2} \\ \frac{1}{2} \\ 0 \end{bmatrix} \\ &= \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} - 0\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} - 0\begin{bmatrix} -\frac{1}{2} \\ \frac{1}{2} \\ 0 \end{bmatrix} \\ &= \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \end{align*}

As such, an orthogonal basis of R3\R^3 is {[110],[12120],[001]}\Set{ \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} -\frac{1}{2} \\ \frac{1}{2} \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} }.

4.

(a) Find an orthonormal basis for the kernel of the following matrix. A=[21013211].A = \begin{bmatrix}2 & 1 & 0 & −1 \\3 & 2 & −1 & −1\end{bmatrix}.

rref(A)=[10110121]y=2zwx=z+wker(A)={[z+w2zwzw]:z,wR}=span{[1210],[1101]}\operatorname{rref}(A) = \begin{bmatrix} 1 & 0 & 1 & -1 \\ 0 & 1 & -2 & 1 \end{bmatrix} \\ \therefore y = 2z-w \\ x = -z+w \\ \ker(A) = \Set{ \begin{bmatrix} -z+w \\ 2z-w \\ z \\ w \end{bmatrix}: z,w\in\R } = \operatorname{span}\Set{ \begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ -1 \\ 0 \\ 1 \end{bmatrix} }

Let u1=[1210],u2=[1101]\vector{u}_1 = \begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix}, \vector{u}_2 = \begin{bmatrix} 1 \\ -1 \\ 0 \\ 1 \end{bmatrix}. Then, {u1,u2}\set{\vector{u}_1, \vector{u}_2} is a basis of ker(A)\ker(A) (and are linearly independent).

To produce an orthogonal basis, we apply the Gram–Schmidt process. Let v1=u1=[1210]\vector{v}_1 = \vector{u}_1 = \begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix}. Then,

v2=u2projv1(u2)=u2u2,v1v12v1=[1101][1101],[1210][1210]2[1210]=[1101]1(1)+(1)2+0(1)+1(0)(1)2+22+12+02[1210]=[120121].\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \vector{v}_2 &= \vector{u}_2 - \operatorname{proj}_{\vector{v}_1}(\vector{u}_2) \\ &= \vector{u}_2 - \frac{<\vector{u}_2,\vector{v}_1>}{||\vector{v}_1||^2}\vector{v}_1 \\ &= \begin{bmatrix} 1 \\ -1 \\ 0 \\ 1 \end{bmatrix} - \frac{<\begin{bmatrix} 1 \\ -1 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix}>}{\norm{\begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix}}^2}\begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix} \\ &= \begin{bmatrix} 1 \\ -1 \\ 0 \\ 1 \end{bmatrix} - \frac{1(-1)+(-1)2+0(1)+1(0)}{(-1)^2 + 2^2 + 1^2 + 0^2}\begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix} \\ &= \begin{bmatrix} \frac{1}{2} \\[.2em] 0 \\[.2em] \frac{1}{2} \\[.2em] 1 \end{bmatrix} \end{align*}.

Hence, {v1,v2}\set{\vector{v}_1, \vector{v}_2} is an orthogonal basis of ker(A)\ker(A). Finally, an orthonormal basis of ker(A)\ker(A) is

{16[1210],132[120121]}={[1623160],[1601623]}.\Set{ \frac{1}{\sqrt{6}}\begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix}, \frac{1}{\sqrt{\frac{3}{2}}}\begin{bmatrix} \frac{1}{2} \\[.5em] 0 \\[.5em] \frac{1}{2} \\[.5em] 1 \end{bmatrix} } = \Set{ \begin{bmatrix} -\frac{1}{\sqrt{6}} \\[.5em] \sqrt{\frac{2}{3}} \\[.5em] \frac{1}{\sqrt{6}} \\[.5em] 0 \end{bmatrix}, \begin{bmatrix} \frac{1}{\sqrt{6}} \\[.5em] 0 \\ \frac{1}{\sqrt{6}} \\[.5em] \sqrt{\frac{2}{3}} \end{bmatrix} }.

(b) Find an orthonormal basis for (ker(A))(\ker(A))^\perp, the orthogonal complement of ker(A)\ker(A).

Since (ker(A))=Im(A)=Im[23120111](\ker(A))^\perp = \operatorname{Im}(A^\top) = \operatorname{Im}\begin{bmatrix} 2 & 3 \\ 1 & 2 \\ 0 & -1 \\ -1 & -1 \end{bmatrix}.

rref(A)=[10010000]Im(A)=span{[2101],[3211]}\operatorname{rref}(A^\top) = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ 0 & 0 \end{bmatrix} \\ \therefore \operatorname{Im}(A^\top) = \operatorname{span}\Set{ \begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix}, \begin{bmatrix} 3 \\ 2 \\ -1 \\ -1 \end{bmatrix} }

Let u1=[2101],u2=[3211]\vector{u}_1 = \begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix}, \vector{u}_2 = \begin{bmatrix} 3 \\ 2 \\ -1 \\ -1 \end{bmatrix}. {u1,u2}\set{\vector{u}_1, \vector{u}_2} is a basis of Im(A)\operatorname{Im}(A^\top). Then, we apply Gram–Schmidt to orthogonalize them.

Let v1=u1=[2101]\vector{v}_1 = \vector{u}_1 = \begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix}. Then,

v2=u2projv1(u2)=u2u2,v1v12v1=[3211][3211],[2101][2101]2[2101]=[3211]3(2)+2(1)+(1)(0)+(1)(1)22+12+02+(1)2[2101]=[012112].\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \vector{v}_2 &= \vector{u}_2 - \operatorname{proj}_{\vector{v}_1}(\vector{u}_2) \\ &= \vector{u}_2 - \frac{<\vector{u}_2,\vector{v}_1>}{||\vector{v}_1||^2}\vector{v}_1 \\ &= \begin{bmatrix} 3 \\ 2 \\ -1 \\ -1 \end{bmatrix} - \frac{<\begin{bmatrix} 3 \\ 2 \\ -1 \\ -1 \end{bmatrix}, \begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix}>}{\norm{\begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix}}^2}\begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix} \\ &= \begin{bmatrix} 3 \\ 2 \\ -1 \\ -1 \end{bmatrix} - \frac{3(2)+2(1)+(-1)(0)+(-1)(-1)}{2^2+1^2+0^2+(-1)^2}\begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix} \\ &= \begin{bmatrix} 0 \\ \frac{1}{2} \\ -1 \\ \frac{1}{2} \end{bmatrix}. \end{align*}

Then, {v1,v2}\set{\vector{v}_1, \vector{v}_2} is an orthogonal basis of (ker(A))(\ker(A))^\perp. Finally, an orthonormal basis of (ker(A))(\ker(A))^\perp is

{16[2101],132[012112]}={[2316016],[0162316]}.\Set{ \frac{1}{\sqrt{6}}\begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix}, \frac{1}{\sqrt{\frac{3}{2}}}\begin{bmatrix} 0 \\ \frac{1}{2} \\ -1 \\ \frac{1}{2} \end{bmatrix} } = \Set{ \begin{bmatrix} \sqrt{\frac{2}{3}} \\ \frac{1}{\sqrt{6}} \\ 0 \\ -\frac{1}{\sqrt{6}} \end{bmatrix}, \begin{bmatrix} 0 \\ \frac{1}{\sqrt{6}} \\ -\sqrt{\frac{2}{3}} \\ \frac{1}{\sqrt{6}} \end{bmatrix} }.

(c) Does the orthonormal basis in (i) combined with the orthonormal basis in (ii)for an orthonormal basis for R4\R^4? Explain.

The union of the orthonormal bases for AA and AA^\top found in parts (i) and (ii) is

{16[1210],132[120121],16[2101],132[012112]}.\Set{ \frac{1}{\sqrt{6}}\begin{bmatrix} -1 \\ 2 \\ 1 \\ 0 \end{bmatrix}, \frac{1}{\sqrt{\frac{3}{2}}}\begin{bmatrix} \frac{1}{2} \\[.5em] 0 \\[.5em] \frac{1}{2} \\[.5em] 1 \end{bmatrix}, \frac{1}{\sqrt{6}}\begin{bmatrix} 2 \\ 1 \\ 0 \\ -1 \end{bmatrix}, \frac{1}{\sqrt{\frac{3}{2}}}\begin{bmatrix} 0 \\ \frac{1}{2} \\ -1 \\ \frac{1}{2} \end{bmatrix} }.

Placing them as column vectors in a matrix:

rref[1616230230161616160230231616]=[1000010000100001]\operatorname{rref}\begin{bmatrix} -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}}& \sqrt{\frac{2}{3}} & 0 \\ \sqrt{\frac{2}{3}} & 0 & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}} \\ \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}} & 0 & -\sqrt{\frac{2}{3}} \\ 0 & \sqrt{\frac{2}{3}} & -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}} \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}

We find that the reduced-row echelon form is full rank. As such, these vectors span R4\R^4.

Then, we need to check if they are mutually orthogonal to determine if they are an orthonormal basis of R4\R^4. By checking all pairs in the set, we find that they are orthogonal.

As such, the abovementioned set is an orthonormal basis of R4\R^4.

5. Consider the following subspace of R4\R^4 V=span{[1111],[1001],[0211]}V = \operatorname{span}\Set{ \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 2 \\ 1 \\ -1 \end{bmatrix}}

(i) What is the dimension of VV?

rref[110102101111]=[100010001000]\operatorname{rref}\begin{bmatrix} 1 & 1 & 0 \\ 1 & 0 & 2 \\ 1 & 0 & 1 \\ 1 & 1 & -1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}

A matrix composed of the three vectors has a full column rank. As such, they form a basis of VV and thus dimV=3\dim V = 3.

(ii) Using Gram-Schmidt Process, find an orthogonal basis for VV.

Let u1=[1111]\vector{u}_1 = \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}, u2=[1001]\vector{u}_2 = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix}, and u3=[0211]\vector{u}_3 = \begin{bmatrix} 0 \\ 2 \\ 1 \\ -1 \end{bmatrix}. As shown in (i), {u1,u2,u3}\set{\vector{u}_1, \vector{u}_2, \vector{u}_3} is a basis of VV.

Now let v1=u1=[1111]\vector{v}_1 = \vector{u}_1 = \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}. Then, applying Gram–Schmidt:

v2=u2projv1(u2)=u2u2,v1v12v1=[1001][1001],[1111][1111]2[1111]=[1001]1(1)+0(1)+0(1)+0(1)+1(1)12+12+12+12[1111]=[12121212]v3=u3projv1(u3)projv2(u3)=u3u3,v1v12v1u3,v2v22v2=[0211][0211],[1111][1111]2[1111][0211],[12121212][12121212]2[12121212]=[0211]0(1)+2(1)+1(1)+(1)(1)12+12+12+12[1111]0(12)+2(12)+1(12)+(1)(12)(12)2+(12)2+(12)2+(12)2[12121212]=[12121212]\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \vector{v}_2 &= \vector{u}_2 - \operatorname{proj}_{\vector{v}_1}(\vector{u}_2) \\ &= \vector{u}_2 - \frac{<\vector{u}_2,\vector{v}_1>}{||\vector{v}_1||^2}\vector{v}_1 \\ &= \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix} - \frac{<\begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix},\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}>}{\norm{\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}}^2}\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} \\ &= \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix} - \frac{1(1)+0(1)+0(1)+0(1)+1(1)}{1^2+1^2+1^2+1^2}\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} \\ &= \begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix} \\[3em] \vector{v}_3 &= \vector{u}_3 - \operatorname{proj}_{\vector{v}_1}(\vector{u}_3) - \operatorname{proj}_{\vector{v}_2}(\vector{u}_3) \\ &= \vector{u}_3 - \frac{<\vector{u}_3, \vector{v}_1>}{\norm{\vector{v}_1}^2}\vector{v}_1 - \frac{<\vector{u}_3, \vector{v}_2>}{\norm{\vector{v}_2}^2}\vector{v}_2 \\ &= \begin{bmatrix} 0 \\ 2 \\ 1 \\ -1 \end{bmatrix} - \frac{<\begin{bmatrix} 0 \\ 2 \\ 1 \\ -1 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}>}{\norm{\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}}^2}\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} - \frac{<\begin{bmatrix} 0 \\ 2 \\ 1 \\ -1 \end{bmatrix}, \begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix}>}{\norm{\begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix}}^2}\begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix} \\ &= \begin{bmatrix} 0 \\ 2 \\ 1 \\ -1 \end{bmatrix} - \frac{0(1)+2(1)+1(1)+(-1)(1)}{1^2+1^2+1^2+1^2}\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} - \frac{0(\frac{1}{2})+2(-\frac{1}{2})+1(-\frac{1}{2})+(-1)(\frac{1}{2})}{(\frac{1}{2})^2 + (-\frac{1}{2})^2 + (-\frac{1}{2})^2 + (\frac{1}{2})^2}\begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix} \\ &= \begin{bmatrix} \frac{1}{2} \\[.3em] \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \end{bmatrix} \end{align*}

And so, an orthogonal basis of VV is {[1111],[12121212],[12121212]}\Set{\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix},\begin{bmatrix} \frac{1}{2} \\[.3em] \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \end{bmatrix} }.

(iii) Find the orthogonal projection of [1234]\begin{bmatrix} 1 \\ 2 \\ 3 \\ 4\end{bmatrix} to VV.

From (ii), {[1111],[12121212],[12121212]}\Set{\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix},\begin{bmatrix} \frac{1}{2} \\[.3em] \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \end{bmatrix} } is an orthogonal basis of VV. As such,

projV[1234]=[1234],[1111][1111]2[1111]+[1234],[12121212][12121212]2[12121212]+[1234],[12121212][12121212]2[12121212]=1(1)+2(1)+3(1)+4(1)12+12+12+12[1111]+0[12121212]+1(12)+2(12)+3(12)+4(12)(12)2+(12)2+(12)2+(12)2[12121212]=12[3377].\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \operatorname{proj}_V \begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \end{bmatrix} &= \frac{<\begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}>}{\norm{\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}}^2}\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} + \frac{<\begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \end{bmatrix}, \begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix}>}{\norm{\begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix}}^2}\begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix} + \frac{<\begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \end{bmatrix}, \begin{bmatrix} \frac{1}{2} \\[.3em] \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \end{bmatrix}>}{\norm{\begin{bmatrix} \frac{1}{2} \\[.3em] \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \end{bmatrix}}^2}\begin{bmatrix} \frac{1}{2} \\[.3em] \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \end{bmatrix} \\ &= \frac{1(1)+2(1)+3(1)+4(1)}{1^2+1^2+1^2+1^2}\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} + 0 \begin{bmatrix} \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] \frac{1}{2} \end{bmatrix} + \frac{1(\frac{1}{2})+2(\frac{1}{2})+3(-\frac{1}{2})+4(-\frac{1}{2})}{(\frac{1}{2})^2+(\frac{1}{2})^2+(-\frac{1}{2})^2+(-\frac{1}{2})^2}\begin{bmatrix} \frac{1}{2} \\[.3em] \frac{1}{2} \\[.3em] -\frac{1}{2} \\[.3em] -\frac{1}{2} \end{bmatrix} \\ &= \frac{1}{2}\begin{bmatrix} 3 \\ 3 \\ 7 \\ 7 \end{bmatrix}. \end{align*}

6.

(i) Find the least square solution of the following system [23421520]x=[2113]\begin{bmatrix}2 & 3 \\4 & −2 \\1 & 5 \\2 & 0\end{bmatrix}\mathbf{x} =\begin{bmatrix}2 \\−1 \\1 \\3\end{bmatrix}

Let A=[23421520]A = \begin{bmatrix}2 & 3 \\4 & −2 \\1 & 5 \\2 & 0\end{bmatrix} and b=[2113]\vector{b}=\begin{bmatrix}2 \\−1 \\1 \\3\end{bmatrix}. Then, A=[24123250]A^\top = \begin{bmatrix} 2 & 4 & 1 & 2 \\ 3 & -2 & 5 & 0 \end{bmatrix}.

Since AA=[24123250][23421520]=[253338]A^\top A = \begin{bmatrix} 2 & 4 & 1 & 2 \\ 3 & -2 & 5 & 0 \end{bmatrix}\begin{bmatrix}2 & 3 \\4 & −2 \\1 & 5 \\2 & 0\end{bmatrix} = \begin{bmatrix} 25 & 3 \\ 3 & 38 \end{bmatrix} and its inverse exists. Then, the least square solution x^\mathbf{\hat{x}} can be derived by applying AA^\top to both sides.

AAx^=Abx^=(AA)1Ab=[253338]1[24123250][2113]=1941[227304]A^\top A\mathbf{\hat{x}} = A^\top\vector{b} \\[1em] \begin{align*} \therefore \mathbf{\hat{x}} &= (A^\top A)^{-1} A^\top\vector{b} \\ &= \begin{bmatrix} 25 & 3 \\ 3 & 38 \end{bmatrix}^{-1}\begin{bmatrix} 2 & 4 & 1 & 2 \\ 3 & -2 & 5 & 0 \end{bmatrix} \begin{bmatrix}2 \\−1 \\1 \\3\end{bmatrix} \\ &= \frac{1}{941}\begin{bmatrix} 227 \\ 304 \end{bmatrix} \end{align*}

(ii) Find the orthogonal projection of bb onto the image of AA using the least square solution.

From (i), where A=[23421520]A = \begin{bmatrix}2 & 3 \\4 & −2 \\1 & 5 \\2 & 0\end{bmatrix} and x^=1941[227304]\mathbf{\hat{x}}= \displaystyle\frac{1}{941}\begin{bmatrix} 227 \\ 304 \end{bmatrix}. Then,

b=Ax^=[23421520]1941[227304]=1941[13663001747454].\vector{b} = A\mathbf{\hat{x}} = \begin{bmatrix} 2 & 3 \\ 4 & −2 \\ 1 & 5 \\2 & 0 \end{bmatrix} \frac{1}{941} \begin{bmatrix} 227 \\ 304 \end{bmatrix} = \frac{1}{941} \begin{bmatrix} 1366 \\ 300 \\ 1747 \\ 454 \end{bmatrix}.

7. Find the least square fitting straight line y=C+Dty = C + Dt given the following set of data. ti2013yi0125\begin{array}{|c|c|c|c|c|}\hline t_i & -2 & 0 & 1 & 3 \\\hline y_i & 0 & 1 & 2 & 5\\\hline\end{array}

Using the equation of a straight line, we have the following system of equation:

{0=C+D(2)1=C+D(0)2=C+D(1)5=C+D(3)    [0125]=[12101113][CD]\begin{cases} 0 &= C+D(-2) \\ 1 &= C+D(0) \\ 2 &= C+D(1) \\ 5 &= C+D(3) \end{cases} \iff \begin{bmatrix} 0 \\ 1 \\ 2 \\ 5 \end{bmatrix} = \begin{bmatrix} 1 & -2 \\ 1 & 0 \\ 1 & 1 \\ 1 & 3 \end{bmatrix}\begin{bmatrix} C \\ D \end{bmatrix}

Let b=[0125]\vector{b} = \begin{bmatrix} 0 \\ 1 \\ 2 \\ 5 \end{bmatrix}, A=[12101113]A = \begin{bmatrix} 1 & -2 \\ 1 & 0 \\ 1 & 1 \\ 1 & 3 \end{bmatrix}, and x=[CD]\vector{x} = \begin{bmatrix} C \\ D \end{bmatrix}. Here, we want to find x\vector{x} such that Ax=bA\vector{x} = \vector{b}, will produce an inconsistent solution. Instead, we find a least square solution for x^=[C^D^]\mathbf{\hat{x}}=\begin{bmatrix} \hat{C} \\ \hat{D} \end{bmatrix} by applying AA^\top to both sides, such that

AAx^=Ab.A^\top A\mathbf{\hat{x}} = A^\top\vector{b}.

As such, we have:

[11112013][12101113][C^D^]=[11112013][0125][42214][C^D^]=[817][C^D^]=[42214]1[817]=[321]\begin{bmatrix} 1 & 1 & 1 & 1 \\ -2 & 0 & 1 & 3 \end{bmatrix} \begin{bmatrix} 1 & -2 \\ 1 & 0 \\ 1 & 1 \\ 1 & 3 \end{bmatrix} \begin{bmatrix} \hat{C} \\ \hat{D} \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 & 1 \\ -2 & 0 & 1 & 3 \end{bmatrix} \begin{bmatrix} 0 \\ 1 \\ 2 \\ 5 \end{bmatrix} \\ \begin{bmatrix} 4 & 2 \\ 2 & 14 \end{bmatrix} \begin{bmatrix} \hat{C} \\ \hat{D} \end{bmatrix} = \begin{bmatrix} 8 \\ 17 \end{bmatrix} \\ \therefore \begin{bmatrix} \hat{C} \\ \hat{D} \end{bmatrix} = \begin{bmatrix} 4 & 2 \\ 2 & 14 \end{bmatrix}^{-1} \begin{bmatrix} 8 \\ 17 \end{bmatrix} = \begin{bmatrix} \frac{3}{2} \\[.3em] 1 \end{bmatrix}

Therefore, our line of best fit is given by the equation y=32+ty=\frac{3}{2}+t.

8. Consider the non-standard inner product on R2\R^2. u,v=[u1u2][1225][v1v2]\langle\mathbf{u},\mathbf{v}\rangle = \begin{bmatrix} u_1 & u_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5\end{bmatrix} \begin{bmatrix} v_1 \\ v_2\end{bmatrix}

(a) Verify this is an inner product of R2\R^2.

First, notice that this definition results in a 1×11\times1 matrix. For u,vR2\vector{u},\vector{v}\in\R^2,

u,v=[u1u2][1225][v1v2]=[v1(u1+2u2)+v2(2u1+5u2)]\begin{align*} \langle\vector{u},\vector{v}\rangle &= \begin{bmatrix} u_1 & u_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} \\ &= \begin{bmatrix}v_1(u_1+2u_2) + v_2(2u_1+5u_2)\end{bmatrix} \end{align*}

Symmetry and bilinearity should be quiet obvious since we can just apply commutative, associative, and distributive properties of addition and multiplication here.

But for the sake of completion, consider u,v,wR2\vector{u},\vector{v},\vector{w}\in\R^2 and c,dRc,d\in\R.

Symmetry

u,v=[u1u2][1225][v1v2]=[v1(u1+2u2)+v2(2u1+5u2)]v,u=[v1v2][1225][u1u2]=[u1(v1+2v2)+u2(2v1+5v2)]\begin{align*} \langle\vector{u},\vector{v}\rangle &= \begin{bmatrix} u_1 & u_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} \\ &= \begin{bmatrix}v_1(u_1+2u_2) + v_2(2u_1+5u_2)\end{bmatrix} \\ \langle\vector{v},\vector{u}\rangle &= \begin{bmatrix} v_1 & v_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} u_1 \\ u_2 \end{bmatrix} \\ &= \begin{bmatrix}u_1(v_1+2v_2) + u_2(2v_1+5v_2)\end{bmatrix} \end{align*}

And indeed,

v1(u1+2u2)+v2(2u1+5u2)=u1(v1+2v2)+u2(2v1+5v2)v_1(u_1+2u_2) + v_2(2u_1+5u_2) = u_1(v_1+2v_2) + u_2(2v_1+5v_2)

if you expand each of the term. Hence, u,v=v,u\langle\vector{u},\vector{v}\rangle=\langle\vector{v},\vector{u}\rangle.

Bilinearity

cu,v=[cu1cu2][1225][v1v2]=[v1(cu1+2cu2)+v2(2cu1+5cu2)]=c[u1u2][1225][v1v2]=[cv1(u1+2u2)+cv2(2u1+5u2)]=cu,v=[c(v1(u1+2u2)+v2(2u1+5u2))]\begin{align*} \langle c\vector{u},\vector{v}\rangle &= \begin{bmatrix} cu_1 & cu_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} &&= \begin{bmatrix}v_1(cu_1+2cu_2) + v_2(2cu_1+5cu_2)\end{bmatrix} \\ &= c\begin{bmatrix} u_1 & u_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} &&= \begin{bmatrix}cv_1(u_1+2u_2) + cv_2(2u_1+5u_2)\end{bmatrix} \\ &= c \langle \vector{u},\vector{v}\rangle &&= \begin{bmatrix}c(v_1(u_1+2u_2) + v_2(2u_1+5u_2))\end{bmatrix} \end{align*}

Hence, cu,v=cu,v\langle c\vector{u},\vector{v}\rangle = c \langle \vector{u},\vector{v}\rangle.

u,v=[u1u2][1225][v1v2]=[v1(u1+2u2)+v2(2u1+5u2)]w,v=[w1w2][1225][v1v2]=[v1(w1+2w2)+v2(2w1+5w2)]u+w,v=[u1+w1u2+w2][1225][v1v2]=[v1(u1+w1+2(u2+w2))+v2(2(u1+w1)+5(u2+w2))]\begin{align*} \langle\vector{u},\vector{v}\rangle &= \begin{bmatrix} u_1 & u_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} \\ &= \begin{bmatrix}v_1(u_1+2u_2) + v_2(2u_1+5u_2)\end{bmatrix} \\ \langle\vector{w},\vector{v}\rangle &= \begin{bmatrix} w_1 & w_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} \\ &= \begin{bmatrix}v_1(w_1+2w_2) + v_2(2w_1+5w_2)\end{bmatrix} \\ \langle \vector{u} + \vector{w}, \vector{v}\rangle &= \begin{bmatrix} u_1+w_1 & u_2+w_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} \\ &= \begin{bmatrix}v_1(u_1+w_1+2(u_2+w_2)) + v_2(2(u_1+w_1) + 5(u_2+w_2))\end{bmatrix} \end{align*}

By inspection, combining the first term in u,v\langle\vector{u},\vector{v}\rangle and w,v\langle\vector{w},\vector{v}\rangle together produces the first term in u+w,v\langle\vector{u}+\vector{w},\vector{v}\rangle. And the same applies for the second term.

u,v+w,v=[v1(u1+2u2)+v2(2u1+5u2)+v1(w1+2w2)+v2(2w1+5w2)]=[v1(u1+2u2)+v1(w1+2w2)+v2(2u1+5u2)+v2(2w1+5w2)]=[v1(u1+w1+2(u2+w2))+v2(2(u1+w1)+5(u2+w2))]=u+w,v\begin{align*} \langle\vector{u},\vector{v}\rangle + \langle\vector{w},\vector{v}\rangle &= &&\big[ v_1(u_1+2u_2) + v_2(2u_1+5u_2) + v_1(w_1+2w_2) + v_2(2w_1+5w_2) &\big] \\ &= &&\big[ v_1(u_1+2u_2) + v_1(w_1+2w_2) + v_2(2u_1+5u_2) + v_2(2w_1+5w_2) &\big] \\ &= &&\big[ v_1(u_1+w_1+2(u_2+w_2)) + v_2(2(u_1+w_1) + 5(u_2+w_2)) &\big] \\ &= &&\langle \vector{u} + \vector{w}, \vector{v}\rangle \end{align*}

Hence, u,v+w,v=u+w,v\langle\vector{u},\vector{v}\rangle + \langle\vector{w},\vector{v}\rangle=\langle \vector{u} + \vector{w}, \vector{v}\rangle. As such, this inner product satisfies bilinearity.

Positive-definite

u,u=[u1u2][1225][u1u2]=[u1(u1+2u2)+u2(2u1+5u2)]=[u12+5u22+4u1u2]\begin{align*} \langle\vector{u},\vector{u}\rangle &= \begin{bmatrix} u_1 & u_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} u_1 \\ u_2 \end{bmatrix} \\ &= \begin{bmatrix}u_1(u_1+2u_2) + u_2(2u_1+5u_2)\end{bmatrix} \\ &= \begin{bmatrix}u_1^2 + 5u_2^2 + 4u_1u_2\end{bmatrix} \end{align*}

Notice that u,u\langle\vector{u},\vector{u}\rangle is positive for all real u1,u2u_1, u_2 and that u,u=0    u1=u2=0\langle\vector{u},\vector{u}\rangle = 0 \iff u_1 = u_2 = 0. As such, u,u=0    u=0\langle\vector{u},\vector{u}\rangle=0 \iff \vector{u}=\vector{0} and u,u0\langle\vector{u},\vector{u}\rangle\ge 0 for all uR2\vector{u}\in\R^2.

Thus, satisfying the properties of an inner product space.

(b) Using Gram-Schmidt process, starting with the vectors [10]\begin{bmatrix} 1 \\ 0\end{bmatrix} and [01]\begin{bmatrix} 0 \\ 1\end{bmatrix}, find an orthogonal basis under this inner product.

For this part, we will interpret the output of the inner product (the 1×11\times1 matrix) as a scalar. Otherwise, we will not be able to define an orthogonal basis because division is not generally defined as a matrix operation.

Let v1=e1=[10]\vector{v}_1 = \vector{e}_1 = \begin{bmatrix} 1 \\ 0\end{bmatrix} and e2=[01]\vector{e}_2 = \begin{bmatrix} 0 \\ 1\end{bmatrix}. Then,

v2=u2projv1(e2)=e2e2,v1v12v1=[01][01],[10][10]2[10]=[01][01][1225][10][10][1225][10][10]=[01]21[10]=[21]\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \vector{v}_2 &= \vector{u}_2 - \operatorname{proj}_{\vector{v}_1}(\vector{e}_2) \\ &= \vector{e}_2 - \frac{<\vector{e}_2,\vector{v}_1>}{||\vector{v}_1||^2}\vector{v}_1 \\ &= \begin{bmatrix} 0 \\ 1\end{bmatrix} - \frac{<\begin{bmatrix} 0 \\ 1\end{bmatrix},\begin{bmatrix} 1 \\ 0\end{bmatrix}>}{\norm{\begin{bmatrix} 1 \\ 0\end{bmatrix}}^2}\begin{bmatrix} 1 \\ 0\end{bmatrix} \\ &= \begin{bmatrix} 0 \\ 1\end{bmatrix} - \frac{ \begin{bmatrix} 0 & 1 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} }{ \begin{bmatrix} 1 & 0 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} }\begin{bmatrix} 1 \\ 0\end{bmatrix} \\ &= \begin{bmatrix} 0 \\ 1\end{bmatrix} - \frac{2}{1}\begin{bmatrix} 1 \\ 0\end{bmatrix} \\ &= \begin{bmatrix} -2 \\ 1 \end{bmatrix} \end{align*}

And so, an orthogonal basis under this inner product is {[10],[21]}\Set{ \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} -2 \\ 1\end{bmatrix} }.

9. Consider the space of all continuous functions on [0,1][0, 1], C[0,1]C[0, 1] with the standard inner product. f,g=01f(x)g(x) ⁣dx\langle f, g\rangle = \int_0^1 f(x)g(x)\d x

(a) Use Gram-Schmidt process. Find an orthogonal basis using span{x2,x,1}\operatorname{span}\Set{x^2, x, 1}.

Let U1=x2U_1=x^2, U2=xU_2=x, and U3=1U_3=1.

Take V1=U1=x2V_1 = U_1 = x^2. Then,

V2=U2projV1(U2)=U2U2,V1V12V1=xx,x2x22x2=x01xx2 ⁣dx01x2x2 ⁣dxx2=x54x2V3=U3projV1(U3)projV2(U3)=U3U3,V1V12V1U3,V2V22V2=11,x2x22x21,x54x2x54x22(x54x2)=1011x2 ⁣dx01(x2)2 ⁣dxx2011(x54x2) ⁣dx01(x54x2)2 ⁣dx(x54x2)=10x212x3+1\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \href{https://www.wolframalpha.com/input?i=x+-+%5Cfrac%7B%5Cint_0%5E1+x%5Ccdot+x%5E2+dx%7D%7B%5Cint_0%5E1+x%5E2%5Ccdot+x%5E2+dx%7Dx%5E2+} {V_2} &= U_2 - \operatorname{proj}_{V_1}(U_2) \\ &= U_2 - \frac{<U_2,V_1>}{||V_1||^2}V_1 \\ &= x - \frac{<x,x^2>}{||x^2||^2}x^2 \\ &= x - \frac{\int_0^1 x\cdot x^2 \d x}{\int_0^1 x^2\cdot x^2 \d x}x^2 \\ &= x - \frac{5}{4}x^2 \\[2em] \href{https://www.wolframalpha.com/input?i=1%5C%3A-%5C%3A%5Cfrac%7B%5Cint+_0%5E1%5C%3A1%5Ccdot+%5C%3Ax%5E2dx%7D%7B%5Cint+_0%5E1%5C%3Ax%5E2%5Ccdot+%5C%3Ax%5E2%5C%3Adx%7Dx%5E2%5C%3A-%5Cfrac%7B%5Cint+_0%5E1%5C%3A1%5Ccdot+%5Cleft%28x-%5Cfrac%7B5%7D%7B4%7Dx%5E2%5Cright%29dx%7D%7B%5Cint+_0%5E1%5C%3A%5Cleft%28x-%5Cfrac%7B5%7D%7B4%7Dx%5E2%5Cright%29%5Cleft%28x-%5Cfrac%7B5%7D%7B4%7Dx%5E2%5Cright%29%5C%3Adx%7D%5Cleft%28x-%5Cfrac%7B5%7D%7B4%7Dx%5E2%5Cright%29} {V_3} &= U_3 - \operatorname{proj}_{V_1}(U_3) - \operatorname{proj}_{V_2}(U_3) \\ &= U_3 - \frac{<U_3,V_1>}{||V_1||^2}V_1 - \frac{<U_3,V_2>}{||V_2||^2}V_2 \\ &= 1 - \frac{<1,x^2>}{||x^2||^2}x^2 - \frac{<1,x-\frac{5}{4}x^2>}{||x-\frac{5}{4}x^2||^2}\(x-\frac{5}{4}x^2\) \\ &= 1 - \frac{\int_0^1 1\cdot x^2\d x}{\int_0^1 (x^2)^2 \d x}x^2 - \frac{\int_0^1 1\cdot (x-\frac{5}{4}x^2)\d x}{\int_0^1 (x-\frac{5}{4}x^2)^2 \d x}\(x-\frac{5}{4}x^2\) \\ &= \frac{10x^2 - 12x}{3} + 1 \\ \end{align*}

And so, we have that {x2,x54x2,10x212x3+1}\displaystyle\Set{ x^2, x - \frac{5}{4}x^2, \frac{10x^2 - 12x}{3} + 1 } is an orthogonal basis of this inner product space.

(b) We prove previously that for any mnm\neq n, sin2πmx\sin 2\pi mx and sin2πnx\sin2\pi nx are always mutually orthogonal. Write down the formula of the orthogonal projection of x2x^2 onto the subspace span{1,sin(2πx),sin(2π2x)}.\operatorname{span}\set{1,\sin(2\pi x),\sin(2\pi2x)}. Compute it. You need to do integration by part to find the coefficient, but you can use an online integration calculator to find it.

Let WC[0,1]W\sub C[0,1] be a subspace where {1,sin(2πx),sin(2π2x)}\set{1,\sin(2\pi x),\sin(2\pi2x)} is an orthonormal basis of WW, as shown in the previous homework. Then, the orthogonal projection of x2x^2 on to WW is given by:

projW(x2)=x2,11,11+x2,sin(2πx)sin(2πx),sin(2πx)sin(2πx)+x2,sin(2π2x)sin(2π2x),sin(2π2x)sin(2π2x)=01x21 ⁣dx0112 ⁣dx1+01x2sin(2πx) ⁣dx01sin2(2πx) ⁣dxsin(2πx)+01x2sin(2π2x) ⁣dx01sin2(2π2x) ⁣dxsin(2π2x)=13sin(2πx)πsin(4πx)2π\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \operatorname{proj}_W(x^2) &= \frac{<x^2, 1>}{<1,1>}1 + \frac{<x^2, \sin(2\pi x)>}{<\sin(2\pi x), \sin(2\pi x)>}\sin(2\pi x) + \frac{<x^2, \sin(2\pi2x)>}{<\sin(2\pi2x),\sin(2\pi2x)>}\sin(2\pi2x) \\ &= \frac{\int_0^1 x^2\cdot 1\d x}{\int_0^1 1^2 \d x}1 + \href{https://www.wolframalpha.com/input?i=%5Cfrac%7B%5Cint+_0%5E1%5C%3Ax%5E2%5Ccdot+%5Csin+%5Cleft%282%5Cpi+%5C%3Ax%5Cright%29%5C%3Adx%7D%7B%5Cint+_0%5E1%5C%3A%5Csin+%5E2%5Cleft%282%5Cpi+%5C%3Ax%5Cright%29%5C%3Adx%7D%5Csin+%5Cleft%282%5Cpi+%5C%3Ax%5Cright%29} {\frac{\int_0^1 x^2\cdot \sin(2\pi x) \d x}{\int_0^1 \sin^2(2\pi x) \d x}\sin(2\pi x)} + \href{https://www.wolframalpha.com/input?i=%5Cfrac%7B%5Cint+_0%5E1%5C%3Ax%5E2%5Ccdot+%5Csin+%5Cleft%282%5Cpi+2x%5Cright%29%5C%3Adx%7D%7B%5Cint+_0%5E1%5C%3A%5Csin+%5E2%5Cleft%282%5Cpi+2x%5Cright%29dx%7D%5Csin+%5Cleft%282%5Cpi+2x%5Cright%29} {\frac{\int_0^1 x^2\cdot\sin(2\pi2x) \d x}{\int_0^1 \sin^2(2\pi2x)\d x}\sin(2\pi2x)} \\ &= \frac{1}{3} - \frac{\sin(2\pi x)}{\pi} - \frac{\sin(4\pi x)}{2\pi} \end{align*}

Homework 10

  1. Consider the following subspace of R4\R^4 V=span{[1111],[1001],[0211]}V = \operatorname{span}\Set{ \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 2 \\ 1 \\ -1 \end{bmatrix}}
  1. Consider the non-standard inner product on R2\R^2. u,v=[u1u2][1225][v1v2]\langle\mathbf{u},\mathbf{v}\rangle = \begin{bmatrix} u_1 & u_2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5\end{bmatrix} \begin{bmatrix} v_1 \\ v_2\end{bmatrix}
  1. Consider the space of all continuous functions on [0,1][0, 1], C[0,1]C[0, 1] with the standard inner product. f,g=01f(x)g(x) ⁣dx\langle f, g\rangle = \int_0^1 f(x)g(x)\d x