Final exam

Question 1. (10 points)

(a) What is the definition that {v1,...,vn}\set{v_1, ..., v_n} forms a basis for a vector space VV.

{v1,...,vn}\set{v_1, ..., v_n} forms a basis for a vector space VV if and only if they are linearly independent and spans the space VV.

(b) What is the definition of the dimension of a vector space VV?

The dimension of a vector space VV is the number of vectors in a basis of VV.

(c) Explain why the vector space M3,2\mathcal{M}_{3,2}, the set of all 3×23 × 2 matrices has dimension 66.

Consider a matrix [abcdef]M3,2\begin{bmatrix} a & b \\ c & d \\ e & f \end{bmatrix}\in\mathcal{M}_{3,2}. This matrix can be expanded as

[abcdef]=a[100000]+b[010000]+c[001000]+d[000100]+e[000010]+f[000001].\begin{split} \begin{bmatrix} a & b \\ c & d \\ e & f \end{bmatrix} &= a \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ 0 & 0 \end{bmatrix} + b \begin{bmatrix} 0 & 1 \\ 0 & 0 \\ 0 & 0 \end{bmatrix} + c \begin{bmatrix} 0 & 0 \\ 1 & 0 \\ 0 & 0 \end{bmatrix} \\ &\quad+ d \begin{bmatrix} 0 & 0 \\ 0 & 1 \\ 0 & 0 \end{bmatrix} + e \begin{bmatrix} 0 & 0 \\ 0 & 0 \\ 1 & 0 \end{bmatrix} + f \begin{bmatrix} 0 & 0 \\ 0 & 0 \\ 0 & 1 \end{bmatrix}. \end{split}

By inspection,

{[100000],[010000],[001000][000100],[000010],[000001]}\Set{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \\ 0 & 0 \end{bmatrix} \\ \begin{bmatrix} 0 & 0 \\ 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 0 \\ 0 & 1 \end{bmatrix} }

are linearly independent and and every matrix in M3,2\mathcal{M}_{3,2} can be expanded by them. Hence, it forms a basis of M3,2\mathcal{M}_{3,2} and its dimension is six.

Question 2. (10 points) Find the answer of the following problem. Write a brief solution to explain.

a. Suppose that AA is a 8×178 ×17 matrix and the kernel of AA has dimension 1212. What is the dimension of Im(A)\operatorname{Im}(A)?

If dimker(A)=12\dim\ker(A) = 12, then finding rref(A)\operatorname{rref}(A) will yield five pivot columns because the rest are free variables.

The corresponding pivot column on AA will make up a basis of Im(A)\operatorname{Im}(A). As such, the dimension of Im(A)\operatorname{Im}(A) is five.

b.Find the inverse of the matrix (cosθsinθsinθcosθ).\begin{pmatrix}\cos \theta & \sin \theta \\ −\sin \theta & \cos \theta\end{pmatrix}.

(cosθsinθsinθcosθ)1=1cos2θ+sin2θ(cosθsinθsinθcosθ)=(cosθsinθsinθcosθ)\begin{pmatrix} \cos \theta & \sin \theta \\ −\sin \theta & \cos \theta \end{pmatrix}^{-1} = \frac{1}{\cos^2\theta+\sin^2\theta}\begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}

c. Find the dimension of the following subspace on R4\R^4. W={(x,y,z,w):x+y+z+w=0}.W = \set{(x,y,z,w) : x + y + z + w = 0}.

x=yzwW={(yzwyzw):y,z,wR}=span{(1100),(1010),(1001)}dimW=3x = -y-z-w \\ W = \Set{ \begin{pmatrix} -y-z-w \\ y \\ z \\ w \end{pmatrix}: y,z,w \in\R } = \operatorname{span}\Set{ \begin{pmatrix} -1 \\ 1 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} -1 \\ 0 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} -1 \\ 0 \\ 0 \\ 1 \end{pmatrix} } \\ \therefore \dim W = 3

d. Find the determinant of the matrix A=(111123100100100).A = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 100 & 100 & 100\end{pmatrix}.

(111123100100100)R2R1(111012100100100)R3100R1(111012000)detA=110=0\begin{pmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 100 & 100 & 100 \end{pmatrix} \xrightarrow{R_2 - R_1} \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \\ 100 & 100 & 100 \end{pmatrix} \xrightarrow{R_3 - 100R_1} \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{pmatrix} \\[1em] \therefore \det A = 1\cdot1\cdot0 = 0

Question 3. (15 points) Let A=[1345002600000000]A = \begin{bmatrix} 1 & 3 & 4 & 5 \\ 0 & 0 & 2 & 6 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0\end{bmatrix}

(a) Using Gram-Schmidt Process, find an orthogonal basis for the Im(A)\operatorname{Im}(A).

rref(A)=[1307001300000000]    Im(A)=span{(1000),(4200)}\operatorname{rref}(A) = \begin{bmatrix} 1 & 3 & 0 & -7 \\ 0 & 0 & 1 & 3 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix} \implies \operatorname{Im}(A) = \operatorname{span}\Set{ \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 4 \\ 2 \\ 0 \\ 0 \end{pmatrix} }

Let v1=(1000)\vector{v}_1 = \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}. Then:

v2=(4200)(4200),(1000)(1000)2(1000)=(4200)4(1000)=(0200)\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \vector{v}_2 &= \begin{pmatrix} 4 \\ 2 \\ 0 \\ 0 \end{pmatrix} - \frac{<\begin{pmatrix} 4 \\ 2 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}>}{ \norm{\begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}}^2 }\begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix} \\ &= \begin{pmatrix} 4 \\ 2 \\ 0 \\ 0 \end{pmatrix} - 4\begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix} \\ &= \begin{pmatrix} 0 \\ 2 \\ 0 \\ 0 \end{pmatrix} \end{align*}

As such, an orthogonal basis for Im(A)\operatorname{Im}(A) is {v1,v2}={(1000),(0200)}\set{\vector{v}_1, \vector{v}_2} = \Set{ \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix},\begin{pmatrix} 0 \\ 2 \\ 0 \\ 0 \end{pmatrix} }.

(b) Find the basis for the orthogonal complement for the Im(A)\operatorname{Im}(A).

A=[1000300042005600]    rref(A)=[1000010000000000]Im(A)=ker(A)=span{(0010),(0001)}A^\top = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 3 & 0 & 0 & 0\\ 4 & 2 & 0 & 0\\ 5 & 6 & 0 & 0 \end{bmatrix} \implies \operatorname{rref}(A^\top) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{bmatrix} \\[1em] \therefore\operatorname{Im}(A)^\perp = \ker(A^\top) = \operatorname{span}\Set{ \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} }

As such, the basis for the orthogonal complement of Im(A)\operatorname{Im}(A) is {(0010),(0001)}\Set{ \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} }.

(c) Let b=(0211)\mathbf{b} = \begin{pmatrix}0 \\2 \\1 \\ −1\end{pmatrix}

(i) Find the orthogonal projection of b\mathbf{b} onto Im(A)\operatorname{Im}(A).

From (a), an orthogonal basis for Im(A)\operatorname{Im}(A) is {(1000),(0200)}\Set{ \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix},\begin{pmatrix} 0 \\ 2 \\ 0 \\ 0 \end{pmatrix} }. As such:

projIm(A)(b)=(0211),(1000)(1000)2(1000)+(0211),(0200)(0200)2(0200)=0(1000)+44(0200)=(0200)\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \operatorname{proj}_{\operatorname{Im}(A)} (\mathbf{b}) &= \frac{<\begin{pmatrix} 0 \\ 2 \\ 1 \\ -1 \end{pmatrix}, \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}>}{\norm{ \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix} }^2}\begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix} + \frac{<\begin{pmatrix} 0 \\ 2 \\ 1 \\ -1 \end{pmatrix}, \begin{pmatrix} 0 \\ 2 \\ 0 \\ 0 \end{pmatrix}>}{\norm{ \begin{pmatrix} 0 \\ 2 \\ 0 \\ 0 \end{pmatrix} }^2}\begin{pmatrix} 0 \\ 2 \\ 0 \\ 0 \end{pmatrix} \\ &= 0 \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix} + \frac{4}{4}\begin{pmatrix} 0 \\ 2 \\ 0 \\ 0 \end{pmatrix} \\ &= \begin{pmatrix} 0 \\ 2 \\ 0 \\ 0 \end{pmatrix} \end{align*}

(i) Find the orthogonal projection of b\mathbf{b} onto the orthogonal complement of Im(A)\operatorname{Im}(A)

From (b), the orthogonal complement of Im(A)\operatorname{Im}(A) is {(0010),(0001)}\Set{ \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} } As such:

projIm(A)(b)=(0211),(0010)(0010)2(0010)+(0211),(0001)(0001)2(0001)=11(0010)11(0001)=(0011)\def<{\left\langle} \def>{\right\rangle} \def\norm#1{\left|\left|#1\right|\right|} \begin{align*} \operatorname{proj}_{\operatorname{Im}(A)^\perp} (\mathbf{b}) &= \frac{<\begin{pmatrix} 0 \\ 2 \\ 1 \\ -1 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix}>}{\norm{ \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix} }^2}\begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix} + \frac{<\begin{pmatrix} 0 \\ 2 \\ 1 \\ -1 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix}>}{\norm{ \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} }^2}\begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} \\ &= \frac{1}{1} \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix} - \frac{1}{1} \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} \\ &= \begin{pmatrix} 0 \\ 0 \\ 1 \\ -1 \end{pmatrix} \end{align*}

Question 4. (10 points) Suppose that we want to find the least square best fitting hyperplane z=Ax+By+Cz = Ax + By + C for a set of datas (x1,y1,z1),...,(xk,yk,zk)(x_1,y_1,z_1),...,(x_k,y_k,z_k). Explain step by step the procedure we need to do.

First, interpret the data points (x1,y1,z1),...,(xk,yk,zk)(x_1,y_1,z_1),...,(x_k,y_k,z_k), as a system of equation:

{z1=Ax1+By1+Czk=Axk+Byk+C\left\{\begin{array}{c} z_1 = Ax_1 + By_1 + C \\ \vdots \\ z_k = Ax_k + By_k + C \end{array}\right.

Then, they can be written in the form b=Ax^\vector{b}=A\mathbf{\hat{x}}.

[z1zk]=[x1y11xkyk1](A^B^C^)\begin{bmatrix} z_1 \\ \vdots \\ z_k \end{bmatrix} = \begin{bmatrix} x_1 & y_1 & 1 \\[.5em] & \ddots & \\ x_k & y_k & 1 \end{bmatrix} \begin{pmatrix} \hat{A} \\ \hat{B} \\ \hat{C} \end{pmatrix}

Finally, to find x^\mathbf{\hat{x}}, we apply AA^\top to both sides.

Ax^=bAAx^=Abx^=(AA)1AbA\mathbf{\hat{x}} = \vector{b} \\ A^\top A\mathbf{\hat{x}} = A^\top\vector{b} \\ \therefore \mathbf{\hat{x}} = (A^\top A)^{-1}A^\top \vector{b}

Thus, x^=(A^B^C^)\mathbf{\hat{x}} = \begin{pmatrix} \hat{A} \\ \hat{B} \\ \hat{C} \end{pmatrix} is the least squared solution, giving us the best fitting hyperplane z=A^x+B^y+C^z = \hat{A}x + \hat{B}y + \hat{C}.

Question 5 (15 points)

(a) State the definition of eigenvalue and eigenvectors of a matrix AA.

We say that λ\lambda is an eigenvalue of AA if we can find some vector v0\vector{v}\neq\vector{0} such that Av=λvA\vector{v}=\lambda\vector{v}. Subsequently, v\vector{v} is the corresponding eigenvectors associated with λ\lambda.

(b) State the definition of geometric multiplicity and algebraic multiplicity of the eigenvalue λλ for the matrix AA.

The geometric multiplicity of an eigenvalue λ\lambda is dimker(AλI)\dim\ker(A-\lambda I).

The algebraic multiplicity of an eigenvalue λi\lambda_i is the highest power pp such that (λλi)p(\lambda − \lambda_i)^p is a factor of det(AλI)\det(A − \lambda I).

(c) Let A=(3244102211121123)A = \begin{pmatrix} 3 & −2 & 4 & −4 \\ 1 & 0 & 2 & −2 \\ −1 & 1 & −1 & 2 \\ −1 & 1 & −2 & 3\end{pmatrix} Find the eigenvalues of AA (computer is allowed, but you need to write down the polynomial equation required to solve) and determine if AA is diagonalizable.

AλI=(3λ24410λ22111λ21123λ)det(AλI)=(λ1)3(λ2)=0λ=1,2A-\lambda I = \begin{pmatrix} 3-\lambda & −2 & 4 & −4 \\ 1 & 0-\lambda & 2 & −2 \\ −1 & 1 & −1-\lambda & 2 \\ −1 & 1 & −2 & 3-\lambda \end{pmatrix} \\[1em] \det(A-\lambda I) = (\lambda-1)^3(\lambda-2) = 0 \\ \therefore\lambda = 1,2

The eigenvalues of AA are 11 and 22 with algebraic multiplicities of 33 and 22, respectively.

For AA to be diagonalizable, the geometric multiplicities must be equal to the algebraic multiplicities for all corresponding eigenvectors.

For λ=1\lambda = 1,

rref(AI)=rref(31244101221111211231)=(1122000000000000)\operatorname{rref}(A-I) = \operatorname{rref}\begin{pmatrix} 3-1 & −2 & 4 & −4 \\ 1 & 0-1 & 2 & −2 \\ −1 & 1 & −1-1 & 2 \\ −1 & 1 & −2 & 3-1 \end{pmatrix} = \begin{pmatrix} 1 & -1 & 2 & -2 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}

There are three free variables, as such dimker(AI)=3\dim\ker(A-I)=3. So the geometric and algebraic multiplicity for λ=1\lambda=1 matches.

For λ=2\lambda = 2,

rref(A2I)=rref(32244102221112211232)=(1002010100110000)\operatorname{rref}(A-2I) = \operatorname{rref}\begin{pmatrix} 3-2 & −2 & 4 & −4 \\ 1 & 0-2 & 2 & −2 \\ −1 & 1 & −1-2 & 2 \\ −1 & 1 & −2 & 3-2 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 & 2 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & -1 \\ 0 & 0 & 0 & 0 \end{pmatrix}

There is one free variable, as such dimker(A2I)=1\dim\ker(A-2I)=1. And so, the geometric and algebraic multiplicity for λ=2\lambda=2 also matches.

As such, we conclude that AA is diagonalizable.

Question 6. (10 points) Let v1,v2,v3,v4,v5\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4, \mathbf{v}_5 be any 5 vectors in a vector space VV of dimension 44. Determine if the following statements are correct. Explain.

(i) These 5 vectors must be linearly dependent.

True. Since these vectors are of dimension four, at least one of them must be the same vector or a multiple or each other.

(ii) We can always extract a basis for VV from these 5 vectors.

False. Consider v1=v2=v3=v4=v5\mathbf{v}_1 = \mathbf{v}_2 = \mathbf{v}_3 = \mathbf{v}_4 = \mathbf{v}_5.

(iii) We can always extract a basis for the subspace span{v1,v2,v3,v4,v5}\operatorname{span}\set{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4, \mathbf{v}_5} from these 5 vectors.

True. Let WVW\subseteq V be a subspace where W=span{v1,v2,v3,v4,v5}W=\operatorname{span}\set{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4, \mathbf{v}_5}. A basis of WW would just be the set of linearly independent vectors in the span of WW. Just to be clear, this only applies to WW and may not necessarily span the vector space VV.

Question 7. (15 points)

(a) Define rigorously the definition of the least square solution for the system Ax=bA\mathbf{x} = b. Using your definition, explain why if the system Ax=bA\mathbf{x} = b has a solution x0x_0, then x0x_0 must be the least square solution.

The least square solution for the system Ax=bA\mathbf{x}=b is a vector x^\mathbf{\hat{x}} such that bAx^||b-A\mathbf{\hat{x}}|| is minimized. More concretely, it is a solution such that

bAx^bAx||b-A\mathbf{\hat{x}}|| \le ||b-A\mathbf{x}||

for all other x\mathbf{x}. In other words, the whole point of finding the least square solution is to satisfy the system Ax=bA\mathbf{x}=b as closely as possible.

However, if Ax=bA\mathbf{x}=b has a solution x0x_0, then bAx0=0||b-Ax_0|| = 0. Which means that x0x_0 is a solution such that the distance is minimized. Hence, x0x_0 must be the least square solution.

(b). Let AA be an m×nm × n matrix with rank(A)=n\operatorname{rank}(A) = n. Let also A=UΣVTA = UΣV^T be its singular value decomposition. Show that the least square solution of the system Ax=bA\mathbf{x} = \mathbf{b} is equal to x^=b,u1σ1v1++b,unσnvn\hat{\mathbf{x}} = \frac{\lang \mathbf{b}, \mathbf{u}_1 \rang}{\sigma_1}\mathbf{v}_1 + \cdots + \frac{\lang \mathbf{b}, \mathbf{u}_n \rang}{\sigma_n}\mathbf{v}_n

If AA is an m×nm\times n matrix with rank(A)=n\operatorname{rank}(A)=n. Then, AAA^\top A is an m×mm\times m matrix with rank(AA)=m\operatorname{rank}(A^\top A)=m.

Then, let

U=[u1un],Σ=[σ10σn0],V=[v1vn],U = \begin{bmatrix} | && | \\ \mathbf{u}_1 & \cdots & \mathbf{u}_n \\ | && | \end{bmatrix},\quad \Sigma = \begin{bmatrix} \sigma_1 && & 0 \\ & \ddots && \vdots\\ && \sigma_n & 0 \end{bmatrix},\quad V = \begin{bmatrix} | && | \\ \mathbf{v}_1 & \cdots & \mathbf{v}_n \\ | && | \end{bmatrix},

where UU=IU^\top U = I and VV=IV^\top V = I.

Since AAA^\top A is invertible, the least square solution of the system Ax=bA\mathbf{x}=\mathbf{b} is

x^=(AA)1Ab.\mathbf{\hat{x}} = (A^\top A)^{-1} A^\top \mathbf{b}.

Now, let’s unpack AAA^\top A.

A=UΣV    A=VΣUAA=VΣUUIΣV=V[σ1σn00][σ10σn0]V=V[σ12σn2]VA = U\Sigma V^\top \implies A^\top = V\Sigma^\top U^\top \\[1em] \begin{align*} A^\top A &= V\Sigma^\top \underbrace{U^\top U}_I \Sigma V^\top \\ &= V\begin{bmatrix} \sigma_1 & \\ & \ddots & \\ && \sigma_n \\ 0 &\cdots & 0 \end{bmatrix}\begin{bmatrix} \sigma_1 && & 0 \\ & \ddots && \vdots\\ && \sigma_n & 0 \end{bmatrix}V^\top \\ &= V\begin{bmatrix} \sigma_1^2 && \\ & \ddots &\\ && \sigma_n^2 \end{bmatrix}V^\top \end{align*}

Then, taking the inverse yields:

(AA)1=(V[σ12σn2]V)1=V[1σ121σn2]V\begin{align*} (A^\top A)^{-1} &= \(V\begin{bmatrix} \sigma_1^2 && \\ & \ddots &\\ && \sigma_n^2 \end{bmatrix}V^\top\)^{-1} \\ &= V\begin{bmatrix} \frac{1}{\sigma_1^2} && \\ & \ddots &\\ && \frac{1}{\sigma_n^2} \end{bmatrix}V^\top \end{align*}

Finally, plugging it into the expression for x^\mathbf{\hat{x}}:

x^=(AA)1Ab=V[1σ121σn2]VVIΣUb=[v1vn][1σ121σn2][σ10σn0][u1un]b=[v1vn][1σ11σn][b,u1b,un]=[v1vn][b,u1σ1b,unσn]=b,u1σ1v1++b,unσnvn\def<{\left\langle} \def>{\right\rangle} \begin{align*} \mathbf{\hat{x}} &= (A^\top A)^{-1} A^\top \mathbf{b} \\ &= V\begin{bmatrix} \frac{1}{\sigma_1^2} && \\ & \ddots &\\ && \frac{1}{\sigma_n^2} \end{bmatrix}\underbrace{V^\top V}_I \Sigma^\top U^\top \mathbf{b} \\ &= \begin{bmatrix} | && | \\ \mathbf{v}_1 & \cdots & \mathbf{v}_n \\ | && | \end{bmatrix} \begin{bmatrix} \frac{1}{\sigma_1^2} && \\ & \ddots &\\ && \frac{1}{\sigma_n^2} \end{bmatrix} \begin{bmatrix} \sigma_1 && & 0 \\ & \ddots && \vdots\\ && \sigma_n & 0 \end{bmatrix} \begin{bmatrix} \mathbf{u}_1 \\ \vdots \\ \mathbf{u}_n \end{bmatrix} \mathbf{b} \\ &= \begin{bmatrix} | && | \\ \mathbf{v}_1 & \cdots & \mathbf{v}_n \\ | && | \end{bmatrix} \begin{bmatrix} \frac{1}{\sigma_1} && \\ & \ddots &\\ && \frac{1}{\sigma_n} \end{bmatrix} \begin{bmatrix} <\mathbf{b}, \mathbf{u}_1> \\ \vdots \\ <\mathbf{b}, \mathbf{u}_n> \end{bmatrix} \\ &= \begin{bmatrix} | && | \\ \mathbf{v}_1 & \cdots & \mathbf{v}_n \\ | && | \end{bmatrix} \begin{bmatrix} \frac{<\mathbf{b}, \mathbf{u}_1>}{\sigma_1} \\ \vdots \\ \frac{<\mathbf{b}, \mathbf{u}_n>}{\sigma_n} \end{bmatrix} \\ &= \frac{\lang \mathbf{b}, \mathbf{u}_1 \rang}{\sigma_1}\mathbf{v}_1 + \cdots + \frac{\lang \mathbf{b}, \mathbf{u}_n \rang}{\sigma_n}\mathbf{v}_n \end{align*}

Question 8. (15 points) Let Pn\mathcal{P}_n be the vector space of polynomials of degree at most nn. Let W1={P(x)=a0+a1x+a2x2+....+anxn:P(1)=0}.W_1 = \set{P(x) = a_0 + a_1x + a_2x^2 + .... + a_nx^n : P(1) = 0}.

(i) Show that W1W_1 is a subspace of Pn\mathcal{P}_n.

Checking if W1W_1 is closed under addition

Consider P1,P2W1P_1,P_2\in W_1. Then, P1(1)=0P_1(1) = 0 and P2(1)=0P_2(1) = 0. Subsequently,

(P1+P2)(1)=P1(1)+P2(1)=0+0=0.(P_1 + P_2)(1) = P_1(1) + P_2(1) = 0 + 0 = 0.

Hence, P1+P2W1P_1 + P_2\in W_1.

Checking if W1W_1 is closed under scalar multiplication

Consider PW1P\in W_1 and αR\alpha\in\R. Then, P(1)=0P(1) = 0 and αP(1)=α(0)=0\alpha P(1) = \alpha(0) = 0.

Hence, αPW1\alpha P\in W_1.

Since W1W_1 is closed under addition and scalar multiplication, it is a subspace of Pn\mathcal{P}_n.

(ii) Find a basis for W1W_1.

Consider a set of polynomial P1,P2,,PnW1P_1,P_2,\ldots,P_n\in W_1, where:

P1(x)=a0+a1xP2(x)=a0+a1x+a2x2Pn(x)=a0+a1x+a2x2++anxn\begin{align*} P_1(x) &= a_0 + a_1x \\ P_2(x) &= a_0 + a_1x + a_2x^2 \\ &\vdots \\ P_n(x) &= a_0 + a_1x + a_2x^2 + \cdots + a_nx^n \\ \end{align*}

For some PW1P\in W_1, we need P(1)=0P(1)=0.

P(1)=a0+a1(1)+a2(1)2++an(1)n=0=a0+a1+a2++an=0a0+a1+a2++an=0\begin{align*} P(1) &= a_0 + a_1(1) + a_2(1)^2 + \cdots + a_n(1)^n &= 0 \\ &= a_0 + a_1 + a_2 + \cdots + a_n &= 0 \end{align*} \\ \therefore a_0 + a_1 + a_2 + \cdots + a_n = 0

So, we need the sum of the coefficients to be zero. An easy way to satisfy this is to:

 a0+a1x+a2x2++an1xn1+anxna0=1an=11xn\begin{CD} \text{ $a_0 + \cancel{a_1 x + a_2x^2 + \cdots + a_{n-1}x^{n-1}} + a_nx^n $}\\ @V\text{$a_0 = 1$}\quad V \quad\text{$a_n=-1$}V \\ \text{$1 - x^n$} \end{CD}

Simply put, we want to kill off the middle terms so that we get polynomials that will give us 11n=01-1^n=0.

And so, we have:

P1(x)=1xP2(x)=1x2Pn(x)=1xn\begin{align*} P_1(x) &= 1 - x \\ P_2(x) &= 1 - x^2 \\ \vdots \\ P_n(x) &= 1-x^n \end{align*}

By observation, we can see that Pi(1)=0P_i(1) = 0 for all iZ+i\in\Z^+.

Let c1,c2,,cnRc_1,c_2, \ldots, c_n \in\R be some scalars. Then, using the abovementioned, we have that

c1P1(x)+c2P2(x)++cnPn(x)=c1(0)+c2(0)++cn(0)=0.\begin{align*} & c_1P_1(x) + c_2P_2(x) + \cdots + c_nP_n(x) \\ &= c_1(0) + c_2(0) + \cdots + c_n(0) \\ &= 0. \end{align*}

As such, a basis of W1W_1 is {1x,1x2,,1xn}\Set{1-x, 1-x^2, \cdots, 1-x^n}.

We now let W={P(x)=a0+a1x+a2x2+....+anxn:P(i)=0,for all i=1,2,,n}.W = \set{P(x) = a_0 + a_1x + a_2x^2 + .... + a_nx^n : P(i) = 0, \text{for all $i = 1, 2,\cdots, n$}}. (iii) Google online the definition of the “Vandermonde matrix” and write down the determinant of the Vandermonde matrix.

From Wikipedia:

In linear algebra, a Vandermonde matrix, named after Alexandre-Théophile Vandermonde, is a matrix with the terms of a geometric progression in each row: an (m+1)×(n+1)(m + 1) \times (n + 1) matrix

V=V(x0,x1,,xm)=[1x0x02x0n1x1x12x1n1x2x22x2n1xmxm2xmn]V = V(x_0, x_1, \cdots, x_m) = \begin{bmatrix} 1 & x_0 & x_0^2 & \dots & x_0^n \\ 1 & x_1 & x_1^2 & \dots & x_1^n \\ 1 & x_2 & x_2^2 & \dots & x_2^n \\ \vdots & \vdots & \vdots & \ddots &\vdots \\ 1 & x_m & x_m^2 & \dots & x_m^n \end{bmatrix}

with entries Vi,j=xijV_{i,j} = x_i^j, the jjth power of the number xix_i, for all zero-based indices ii and jj.

The determinant of a square Vandermonde matrix (when n=mn=m) is called a Vandermonde determinant or Vandermonde polynomial. Its value is:

det(V)=0i<jn(xjxi).\det(V) = \prod_{0 \le i < j \le n} (x_j - x_i).

This is non-zero if and only if all xix_i are distinct (no two are equal), making the Vandermonde matrix invertible.

(iv) Use Vandermonde matrix, show that W={0}W = \set{0}.

If PWP\in W, then it is a polynomial in the form

P(x)=a0+a1x+a2x2++anxnP(x) = a_0 + a_1x + a_2x^2 + \cdots + a_nx^n

such that it satisfies

P(x0)=y0,P(x1)=y1,,P(xm)=ym.P(x_0) = y_0, P(x_1) = y_1, \ldots, P(x_m) = y_m.

In our case, we have that

x=[x0x1x2xm]=[123m]andy=[y0y1y2ym]=[P(x0)P(x1)P(x2)P(xm)]=[0000].\vector{x} = \begin{bmatrix} x_0 \\ x_1 \\ x_2 \\ \vdots \\ x_m \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\ 3 \\ \vdots \\ m \end{bmatrix} \quad\text{and}\quad \vector{y} = \begin{bmatrix} y_0 \\ y_1 \\ y_2 \\ \vdots \\ y_m \end{bmatrix} = \begin{bmatrix} P(x_0) \\ P(x_1) \\ P(x_2) \\ \vdots \\ P(x_m) \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \vdots \\ 0 \end{bmatrix}.

Here, we note that y=0\vector{y}=\vector{0} because

PW    P(x0)=P(x1)=P(x2)==P(xm)=0    P(1)=P(2)=P(3)==P(m)=0.\begin{align*} P\in W &\iff P(x_0) = P(x_1) = P(x_2) = \cdots = P(x_m) = 0 \\ &\iff P(1) = P(2) = P(3) = \cdots = P(m) = 0. \end{align*}

Then, our Vandermonde matrix VV is given by:

V=[1x0x02x0n1x1x12x1n1x2x22x2n1xmxm2xmn]=[11121n12222n13323n1mm2mn]V= \begin{bmatrix} 1 & x_0 & x_0^2 & \cdots & x_0^n \\ 1 & x_1 & x_1^2 & \cdots & x_1^n \\ 1 & x_2 & x_2^2 & \cdots & x_2^n \\ \vdots & \vdots & \vdots & \ddots &\vdots \\ 1 & x_m & x_m^2 & \cdots & x_m^n \end{bmatrix}= \begin{bmatrix} 1 & 1 & 1^2 & \cdots & 1^n \\ 1 & 2 & 2^2 & \cdots & 2^n \\ 1 & 3 & 3^2 & \cdots & 3^n \\ \vdots & \vdots & \vdots & \ddots &\vdots \\ 1 & m & m^2 & \cdots & m^n \end{bmatrix}

Let a=[a0a1a2an]\vector{a} = \begin{bmatrix} a_0 \\ a_1 \\ a_2 \\ \vdots \\ a_n \end{bmatrix} be a column vector representing the coefficients. Then, we can construct a system Va=yV\vector{a} = \vector{y}. Since y=0\vector{y}=\vector{0}, we just have a homogenous system.

Va=y[11121n12222n13323n1mm2mn][a0a1a2an]=[0000]V\vector{a} = \vector{y} \\ \begin{bmatrix} 1 & 1 & 1^2 & \cdots & 1^n \\ 1 & 2 & 2^2 & \cdots & 2^n \\ 1 & 3 & 3^2 & \cdots & 3^n \\ \vdots & \vdots & \vdots & \ddots &\vdots \\ 1 & m & m^2 & \cdots & m^n \end{bmatrix} \begin{bmatrix} a_0 \\ a_1 \\ a_2 \\ \vdots \\ a_n \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \vdots \\ 0 \end{bmatrix}

As such, we know there exists a trivial solution for a\vector{a}.

Finally, since our xix_i terms are distinct (ascending natural numbers), det(V)0\det(V)\neq0. Therefore, this system contains only trivial solution.

Further, given that m=nm=n, VV is also invertible. As such, PP can be obtained by finding that a=V1y=0\vector{a}=V^{-1}\vector{y}=\vector{0}.

Since

a=0    a0==an=0,\vector{a} = \vector{0} \implies a_0=\cdots=a_n=0,

then such a polynomial PWP\in W must be zero. Hence, WW is a trivial subspace.

Final exam

Question 1. (10 points)

Question 2. (10 points) Find the answer of the following problem. Write a brief solution to explain.

Question 3. (15 points) Let A=[1345002600000000]A = \begin{bmatrix} 1 & 3 & 4 & 5 \\ 0 & 0 & 2 & 6 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0\end{bmatrix}

Question 5 (15 points)

Question 6. (10 points) Let v1,v2,v3,v4,v5\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4, \mathbf{v}_5 be any 5 vectors in a vector space VV of dimension 44. Determine if the following statements are correct. Explain.

Question 7. (15 points)

Question 8. (15 points) Let Pn\mathcal{P}_n be the vector space of polynomials of degree at most nn. Let W1={P(x)=a0+a1x+a2x2+....+anxn:P(1)=0}.W_1 = \set{P(x) = a_0 + a_1x + a_2x^2 + .... + a_nx^n : P(1) = 0}.