3.1 HW 1, Due sept 18, 2014

  3.1.1 Problem 1.2.7
  3.1.2 Problem 1.2.8
  3.1.3 Problem 1.2.9
  3.1.4 Problem 1.3.2
  3.1.5 Problem 1.3.6
  3.1.6 Problem 1.3.7
  3.1.7 Problem 1.3.8
  3.1.8 Problem 1.3.11
  3.1.9 Problem 1.4.5
  3.1.10 Problem 1.4.7
  3.1.11 Problem 1.4.10
  3.1.12 Problem 1.4.11
  3.1.13 Problem 1.4.12
  3.1.14 Problem 1.5.6
  3.1.15 Problem 1.5.7
  3.1.16 Problem 1.5.11
  3.1.17 Problem 1.5.12
  3.1.18 Problem 1.5.13
PDF (letter size)
PDF (legal size)

3.1.1 Problem 1.2.7

pict
Figure 3.1:the Problem statement

Solution

Multiplying \(LS\) gives

\[\begin{pmatrix} 1 & 0 & 0\\ l_{21} & 1 & 0\\ l_{31} & 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & 0\\ -l_{21} & 1 & 0\\ -l_{31} & 0 & 1 \end{pmatrix} =\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix} \] Since \(LS=I\) then \(L=S^{-1}\) by definition.

3.1.2 Problem 1.2.8

pict
Figure 3.2:the Problem statement

Solution

Multiplying \(LS\) gives

\[\begin{pmatrix} 1 & 0 & 0\\ l_{21} & 1 & 0\\ l_{31} & l_{32} & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & 0\\ -l_{21} & 1 & 0\\ -l_{31} & -l_{32} & 1 \end{pmatrix} =\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ -l_{21}l_{32} & 0 & 1 \end{pmatrix} \] Since \(LS\neq I\) then \(L\) is not the inverse of \(S.\) Now let \(S=E=\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & -l_{32} & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & 0\\ -l_{21} & 1 & 0\\ -l_{31} & 0 & 1 \end{pmatrix} =\begin{pmatrix} 1 & 0 & 0\\ -l_{21} & 1 & 0\\ l_{21}l_{32}-l_{31} & -l_{32} & 1 \end{pmatrix} \) and now evaluating \(LS\) gives

\[\begin{pmatrix} 1 & 0 & 0\\ l_{21} & 1 & 0\\ l_{31} & l_{32} & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & 0\\ -l_{21} & 1 & 0\\ l_{21}l_{32}-l_{31} & -l_{32} & 1 \end{pmatrix} =\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix} \] Therefore, with the new \(S\) matrix, now \(L\) is the inverse of \(S\) since \(LS=I \)

3.1.3 Problem 1.2.9

   3.1.3.1 Part (a)
   3.1.3.2 Part (b)
   3.1.3.3 Part (c)
   3.1.3.4 Part (d)

pict
Figure 3.3:the Problem statement

Solution

3.1.3.1 Part (a)

Take any random \(2\times 2\) matrix \(A=\begin{pmatrix} a & b\\ c & d \end{pmatrix} \), By elimination \(U=\begin{pmatrix} a & b\\ 0 & d-b\frac{c}{a}\end{pmatrix} \) and \(L=\begin{pmatrix} 1 & 0\\ \frac{c}{a} & 1 \end{pmatrix} \). Now \(LU\) is found, giving back \(A\) as expected\[\begin{pmatrix} 1 & 0\\ \frac{c}{a} & 1 \end{pmatrix}\begin{pmatrix} a & b\\ 0 & d-b\frac{c}{a}\end{pmatrix} =\begin{pmatrix} a & b\\ c & d \end{pmatrix} \] \(UL\) is found\[\begin{pmatrix} a & b\\ 0 & d-b\frac{c}{a}\end{pmatrix}\begin{pmatrix} 1 & 0\\ \frac{c}{a} & 1 \end{pmatrix} =\begin{pmatrix} a+\frac{1}{a}bc & b\\ \frac{1}{a}c\left ( d-\frac{1}{a}bc\right ) & d-\frac{1}{a}bc \end{pmatrix} \] Comparing \(LU\) and \(UL\) above, it can be seen that by setting \(b=0\) the \(LU=\begin{pmatrix} a & 0\\ c & d \end{pmatrix} \) while \(UL=\begin{pmatrix} a & 0\\ \frac{1}{a}cd & d \end{pmatrix} \), which means they will be different as long as \(d\neq a\). So picking any \(A \) matrix which has \(b=0\) and which \(d\neq a\) will work. An example is \[ \fbox{$A=\begin{pmatrix} 1 & 0\\ 5 & 2 \end{pmatrix} $} \] To verify, \(U=\begin{pmatrix} 1 & 0\\ 0 & 2 \end{pmatrix} \) and \(L=\begin{pmatrix} 1 & 0\\ 5 & 1 \end{pmatrix} \), hence \(LU=\begin{pmatrix} 1 & 0\\ 5 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0\\ 0 & 2 \end{pmatrix} =\begin{pmatrix} 1 & 0\\ 5 & 2 \end{pmatrix} \) while \(UL=\begin{pmatrix} 1 & 0\\ 0 & 2 \end{pmatrix}\begin{pmatrix} 1 & 0\\ 5 & 1 \end{pmatrix} =\begin{pmatrix} 1 & 0\\ 10 & 2 \end{pmatrix} \). They are different.

3.1.3.2 Part (b)

Take any random \(2\times 2\) matrix \(A=\begin{pmatrix} a & b\\ c & d \end{pmatrix} ,\) then \(A^{2}=\begin{pmatrix} a & b\\ c & d \end{pmatrix}\begin{pmatrix} a & b\\ c & d \end{pmatrix} =\begin{pmatrix} a^{2}+bc & ab+bd\\ ac+cd & d^{2}+bc \end{pmatrix} \) Now solving\[\begin{pmatrix} a^{2}+bc & ab+bd\\ ac+cd & d^{2}+bc \end{pmatrix} =\begin{pmatrix} 1 & 0\\ 0 & 1 \end{pmatrix} \] gives \(4\) equations for \(a,b,c,d\)\begin{align*} a^{2}+bc & =1\\ ab+bd & =0\\ ac+cd & =0\\ d^{2}+bc & =1 \end{align*}

Gives the following solutions\begin{align*} a & =-1,b=0,c=0,d=-1\\ a & =1,b=0,c=0,d=-1\\ a & =-1,b=0,c=0,d=1\\ a & =1,b=0,c=0,d=1 \end{align*}

Any of the above solutions will satisfy \(A^{2}=I\). For example, using the first one gives \[ \fbox{$A=\begin{pmatrix} -1 & 0\\ 0 & -1 \end{pmatrix} $} \]

3.1.3.3 Part (c)

As was done above, the following set of equations are solved.\[\begin{pmatrix} a^{2}+bc & ab+bd\\ ac+cd & d^{2}+bc \end{pmatrix} =\begin{pmatrix} 0 & 0\\ 0 & 0 \end{pmatrix} \] Hence\begin{align*} a^{2}+bc & =0\\ ab+bd & =0\\ ac+cd & =0\\ d^{2}+bc & =0 \end{align*}

Solution is

eq1:=a^2+b*c=0;eq2:=a*b+b*d=0;eq3:=a*c+c*d=0;eq4:=a^2+b*c=0;  
solve({eq1,eq2,eq3,eq4},{a,b,c,d});  
 {a = a, b = b, c = -a^2/b, d = -a}, {a = 0, b = 0, c = 0, d = d}

Since we are looking for non-zero elements in \(B\), then the first solution \(\{a=a,b=b,c=-\frac{a^{2}}{b},d=-a\}\) is used. For example, letting \(a=1,b=2,c=-\frac{1}{2},d=-1\) gives \[ \fbox{$B=\begin{pmatrix} 1 & 2\\ -\frac{1}{2} & -1 \end{pmatrix} $} \] To verify\[\begin{pmatrix} 1 & 2\\ -\frac{1}{2} & -1 \end{pmatrix}\begin{pmatrix} 1 & 2\\ -\frac{1}{2} & -1 \end{pmatrix} =\begin{pmatrix} 0 & 0\\ 0 & 0 \end{pmatrix} \]

3.1.3.4 Part (d)

Let \(C=\begin{pmatrix} a & b\\ c & d \end{pmatrix} ,D=\begin{pmatrix} e & f\\ g & h \end{pmatrix} \), hence we want \(CD=-DC\). To simplify this, let the diagonal be zero in both cases. This reduced the equations to 4 unknowns. Hence Let \(C=\begin{pmatrix} 0 & b\\ c & 0 \end{pmatrix} ,D=\begin{pmatrix} 0 & f\\ g & 0 \end{pmatrix} \) and\begin{align*} CD & =\begin{pmatrix} 0 & b\\ c & 0 \end{pmatrix}\begin{pmatrix} 0 & f\\ g & 0 \end{pmatrix} =\begin{pmatrix} bg & 0\\ 0 & cf \end{pmatrix} \\ DC & =\begin{pmatrix} 0 & f\\ g & 0 \end{pmatrix}\begin{pmatrix} 0 & b\\ c & 0 \end{pmatrix} =\begin{pmatrix} cf & 0\\ 0 & bg \end{pmatrix} \end{align*}

Hence we want to solve \(\begin{pmatrix} bg & 0\\ 0 & cf \end{pmatrix} =-\begin{pmatrix} cf & 0\\ 0 & bg \end{pmatrix} \) Hence this reduces to just solving\[ bg=-cf \] Let \(b=n,c=-n,g=n,f=n\) which satisfies the above. I.e. \(n\times n=-\left ( -n\times n\right ) \Rightarrow n^{2}=n^{2}\), therefore\[ C=\begin{pmatrix} 0 & n\\ -n & 0 \end{pmatrix} ,D=\begin{pmatrix} 0 & n\\ n & 0 \end{pmatrix} \] To verify, \(CD=\begin{pmatrix} 0 & n\\ -n & 0 \end{pmatrix}\begin{pmatrix} 0 & n\\ n & 0 \end{pmatrix} =\begin{pmatrix} n^{2} & 0\\ 0 & -n^{2}\end{pmatrix} \) and \(DC=\begin{pmatrix} 0 & n\\ n & 0 \end{pmatrix}\begin{pmatrix} 0 & n\\ -n & 0 \end{pmatrix} =\begin{pmatrix} -n^{2} & 0\\ 0 & n^{2}\end{pmatrix} \) hence \(DC=-CD\). Let \(n=2\) for example, then \begin{align*} & \fbox{$C=\begin{pmatrix} 0 & 2\\ -2 & 0 \end{pmatrix} $}\\ & \fbox{$D=\begin{pmatrix} 0 & 2\\ 2 & 0 \end{pmatrix} $} \end{align*}

3.1.4 Problem 1.3.2

pict
Figure 3.4:the Problem statement

Solution

\[ A=\begin{pmatrix} 3 & 6\\ 6 & 8 \end{pmatrix} \] Hence \(U=\begin{pmatrix} 3 & 6\\ 0 & -4 \end{pmatrix} \) and \(L=\begin{pmatrix} 1 & 0\\ 2 & 1 \end{pmatrix} \), therefore \(D=\begin{pmatrix} 3 & 0\\ 0 & -4 \end{pmatrix} \). \(D\) has the pivots on its diagonal. The pivots is the diagonal of \(U.\) Therefore\[ LDL^{T}=\begin{pmatrix} 1 & 0\\ 2 & 1 \end{pmatrix}\begin{pmatrix} 3 & 0\\ 0 & -4 \end{pmatrix}\begin{pmatrix} 1 & 0\\ 2 & 1 \end{pmatrix} ^{T}=\begin{pmatrix} 3 & 6\\ 6 & 8 \end{pmatrix} =A \] Since not all the pivots are positive and the matrix is symmetric, then this is not positive definite (P.D.). This can be confirmed by writing\begin{align*} x^{T}Ax & =\begin{pmatrix} x_{1} & x_{2}\end{pmatrix}\begin{pmatrix} 3 & 6\\ 6 & 8 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\end{pmatrix} \\ & =x_{1}\left ( 3x_{1}+6x_{2}\right ) +x_{2}\left ( 6x_{1}+8x_{2}\right ) \\ & =3x_{1}^{2}+12x_{1}x_{2}+8x_{2}^{2} \end{align*}

We now need to complete the squares.\begin{align*} x^{T}Ax & =3\left ( x_{1}+ax_{2}\right ) ^{2}+cx_{2}^{2}\\ & =3\left ( x_{1}^{2}+a^{2}x_{2}^{2}+2ax_{1}x_{2}\right ) +cx_{2}^{2}\\ & =3x_{1}^{2}+\left ( 3a^{2}+c\right ) x_{2}^{2}+6ax_{1}x_{2} \end{align*}

Comparing to \(3x_{1}^{2}+12x_{1}x_{2}+8x_{2}^{2}\) we see that \(a=2\) and \(c=8-3a^{2}=8-12=-4\), hence\[ x^{T}Ax=3\left ( x_{1}+2x_{2}\right ) ^{2}-4x_{2}^{2} \] This shows that \(x^{T}Ax\) is not positive for all \(x\) due to the \(-4\) term. For example, if \(x=\{1,-1\}\) then \(x^{T}Ax=-1\). Basically, we obtain the same result as before. For a symmetric matrix \(A\), if not all the pivots are positive, then the matrix is not P.D. Using \(x^{T}Ax\) is another method to answer the same question. After completing the squares, we look to see if all the coefficients are positive or not.

3.1.5 Problem 1.3.6

pict
Figure 3.5:the Problem statement

Solution

A counter example is \(a=8,b=2,c=4\). We see that \(a+b>2c\) but \(ac=16\) and \(c^{2}=16\), hence \(ac\) is not greater than \(b^{2}\). So \(a+c>2b\) do not guarantee that \(ac>c^{2}\). Therefore, we also can not guarantee that the matrix is P.D. this comes from the pivots. The pivots of \(A=\begin{pmatrix} a & b\\ b & c \end{pmatrix} \) are \(\{a,c-\frac{b^{2}}{a}\}\). Since \(a>0\) as given, then we just need to check if \(c-\frac{b^{2}}{a}>0\). This means \(ac-b^{2}>0\). But since we can’t guarantee that \(ac>b^{2}\) then this means the second pivot can be negative. Hence the matrix \(A\) with such property can not be guaranteed to be P.D.

3.1.6 Problem 1.3.7

pict
Figure 3.6:the Problem statement

Solution

\[ A=\begin{pmatrix} 1 & 1 & 1\\ 1 & 1 & 1\\ 1 & 1 & 1 \end{pmatrix} \] To show if \(A\) is P.D., we need to show that all the pivots are positive. This is the same as showing that \(x^{T}Ax>0\) for all non-zero \(x.\)To obtain the pivots, we generate the \(U\) and look at the diagonal values. From the above, we obtain\[\begin{pmatrix} 1 & 1 & 1\\ 1 & 1 & 1\\ 1 & 1 & 1 \end{pmatrix} \rightarrow \overset{U}{\overbrace{\begin{pmatrix} 1 & 1 & 1\\ 0 & 0 & 0\\ 0 & 0 & 0 \end{pmatrix} }} \] Hence using \(l_{1}=1\) we see that the pivots are not all positive. There are zero pivot. Hence \(A\) is not P.D. For \[ A^{\prime }=\begin{pmatrix} 1 & 1 & 1\\ 1 & 2 & 2\\ 1 & 2 & 3 \end{pmatrix} \rightarrow \begin{pmatrix} 1 & 1 & 1\\ 0 & 1 & 1\\ 0 & 1 & 2 \end{pmatrix} \rightarrow \overset{U}{\overbrace{\begin{pmatrix} 1 & 1 & 1\\ 0 & 1 & 1\\ 0 & 0 & 1 \end{pmatrix} }} \] Hence all the pivots are positive. Therefore \(A^{\prime }\) is P.D. We can write it as \(LDL^{T}\)\begin{align*} A^{\prime } & =\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 1 & 1 \end{pmatrix} ^{T}\\ & =\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 1 & 1\\ 0 & 1 & 1\\ 0 & 0 & 1 \end{pmatrix} \end{align*}

3.1.7 Problem 1.3.8

pict
Figure 3.7:the Problem statement

Solution

\[ A=\begin{pmatrix} c & 1 & 1\\ 1 & c & 1\\ 1 & 1 & c \end{pmatrix} \] \(c>2\) is enough to guarantee row dominant matrix. For P.D., looking at \(x^{T}Ax=\left ( x_{1}+x_{2}+x_{3}\right ) ^{2}+\left ( c-1\right ) \left ( x_{1}^{2}+x_{2}^{2}+x_{3}^{2}\right ) \) shows that \(c-1>0\) is the condition for P.D. which implies \(c>1\). Hence it is enough that \(c>1\).

3.1.8 Problem 1.3.11

pict
Figure 3.8:the Problem statement

Solution

For \(F_{1}=x^{2}-x^{2}y^{2}+y^{2}+y^{3}\), we find \(\frac{\partial F_{1}}{\partial y}=-2x^{2}y+2y+3y^{2}=0\) at \(x=0,y=0\). And \(\frac{\partial F_{1}}{\partial x}=2x-2xy^{2}=0\) at \(x=0,y=0\). Now we need to look at the P.D. of\[\begin{pmatrix} \frac{\partial ^{2}F_{1}}{\partial x^{2}} & \frac{\partial ^{2}F_{1}}{\partial x\partial y}\\ \frac{\partial ^{2}F_{1}}{\partial x\partial y} & \frac{\partial ^{2}F_{1}}{\partial y^{2}}\end{pmatrix} =\begin{pmatrix} 2-2y^{2} & -4xy\\ -4xy & -2x^{2}+2+6y \end{pmatrix} \] At \(x=0,y=0\) the above becomes\[\begin{pmatrix} \frac{\partial ^{2}F_{1}}{\partial x^{2}} & \frac{\partial ^{2}F_{1}}{\partial x\partial y}\\ \frac{\partial ^{2}F_{1}}{\partial x\partial y} & \frac{\partial ^{2}F_{1}}{\partial y^{2}}\end{pmatrix} =\begin{pmatrix} 2 & 0\\ 0 & 2 \end{pmatrix} \] This is already in \(U\) form. Since the diagonal is all positive, then this is P.D., which means it is true for \(F_{1}\left ( x,y\right ) \). Now we check \(F_{2}\left ( x,y\right ) \)

\(F_{2}\left ( x,y\right ) =\cos x\cos y\). Hence \(\frac{\partial F_{1}}{\partial y}=-\sin y\cos x=0\) at \(x=0,y=0\). And \(\frac{\partial F_{1}}{\partial x}=-\sin x\cos y=0\) at \(x=0,y=0\). Now we need to look at the P.D. of\[\begin{pmatrix} \frac{\partial ^{2}F_{1}}{\partial x^{2}} & \frac{\partial ^{2}F_{1}}{\partial x\partial y}\\ \frac{\partial ^{2}F_{1}}{\partial x\partial y} & \frac{\partial ^{2}F_{1}}{\partial y^{2}}\end{pmatrix} =\begin{pmatrix} -\cos x\cos y & \sin y\sin x\\ \sin y\sin x & -\cos y\cos x \end{pmatrix} \] And at \(x=0,y=0\) the above becomes\[\begin{pmatrix} \frac{\partial ^{2}F_{1}}{\partial x^{2}} & \frac{\partial ^{2}F_{1}}{\partial x\partial y}\\ \frac{\partial ^{2}F_{1}}{\partial x\partial y} & \frac{\partial ^{2}F_{1}}{\partial y^{2}}\end{pmatrix} =\begin{pmatrix} -1 & 0\\ 0 & -1 \end{pmatrix} \] Hence this is not P.D, since the pivots are negative. To answer the part about \(F_{1}\) having global minimum. The point \(x=0,y=0\) is local minimum for \(F_{1}=x^{2}-x^{2}y^{2}+y^{2}+y^{3}\) since \(\begin{pmatrix} \frac{\partial ^{2}F_{1}}{\partial x^{2}} & \frac{\partial ^{2}F_{1}}{\partial x\partial y}\\ \frac{\partial ^{2}F_{1}}{\partial x\partial y} & \frac{\partial ^{2}F_{1}}{\partial y^{2}}\end{pmatrix} \) was found to be P.D. at \(x=0,y=0\). But this is not global minimum. Only when the function can be written as quadratic form \(x^{T} A x\) will the local minumum be global minumum. In this case, \(F_{1}\) can approach \(-\infty \), hence this is the global minimum.

Taking the limit \(\lim _{x_{1}\rightarrow -\infty }F_{1}=\left ( 1-y^{2}\right ) \infty \). Taking the limit of this as \(y\rightarrow \infty \) gives \(-\infty \). Here is a plot of \(F_{1}\) around \(x=0,y=0\) showing it is a local minimum

F1 = x^2 - x^2 y^2 + y^2 + y^3
Plot3D[F1, {x, -3, 3}, {y, -3, 3},
PlotLabel -> "F1 function", AxesLabel -> {x, y}]

pict
Figure 3.9:plot of the above

3.1.9 Problem 1.4.5

pict
Figure 3.10:the Problem statement

Solution

The equation of the line is \(y=C\), hence we obtain 4 equations.\begin{align*} b_{1} & =C\\ b_{2} & =C\\ b_{3} & =C\\ b_{4} & =C \end{align*}

or\[ \overset{A}{\overbrace{\begin{pmatrix} 1\\ 1\\ 1\\ 1 \end{pmatrix} }}C=\begin{pmatrix} b_{1}\\ b_{2}\\ b_{3}\\ b_{4}\end{pmatrix} \] Hence now we set \(A^{T}Ax=A^{T}b\)\begin{align*} \begin{pmatrix} 1 & 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} 1\\ 1\\ 1\\ 1 \end{pmatrix} C & =\begin{pmatrix} 1 & 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} b_{1}\\ b_{2}\\ b_{3}\\ b_{4}\end{pmatrix} \\ 4C & =\begin{pmatrix} 1 & 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} b_{1}\\ b_{2}\\ b_{3}\\ b_{4}\end{pmatrix} \\ 4C & =b_{1}+b_{2}+b_{3}+b_{4} \end{align*}

Hence \(C=\frac{b_{1}+b_{2}+b_{3}+b_{4}}{4}\), Which is the average. Using calculus, to minimize \(E=\left ( b_{1}-C\right ) ^{2}+\left ( b_{2}-C\right ) ^{2}+\left ( b_{3}-C\right ) ^{2}+\left ( b_{4}-C\right ) ^{2}\)\begin{align*} \frac{dE}{dC} & =-2\left ( b_{1}-C\right ) -2\left ( b_{2}-C\right ) -2\left ( b_{3}-C\right ) -2\left ( b_{4}-C\right ) \\ 0 & =8C-2b_{1}-2b_{2}-2b_{3}-2b_{4}\\ 8C & =2b_{1}+2b_{2}+2b_{3}+2b_{4}\\ C & =\frac{b_{1}+b_{2}+b_{3}+b_{4}}{4} \end{align*}

Which is the same found using \(A^{T}Ax=A^{T}b\) solution.

3.1.10 Problem 1.4.7

   3.1.10.1 Part (a)
   3.1.10.2 Part (b)
   3.1.10.3 Part c

pict
Figure 3.11:the Problem statement

Solution

3.1.10.1 Part (a)

For \(y=C\) we obtain the following equations\begin{align*} b_{1} & =C\\ b_{2} & =C\\ b_{3} & =C \end{align*}

Hence\[ \overset{A}{\overbrace{\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} }}C=\begin{pmatrix} b_{1}\\ b_{2}\\ b_{3}\end{pmatrix} \] Applying \(A^{T}Ax=A^{T}b\) gives\begin{align*} \begin{pmatrix} 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} C & =\begin{pmatrix} 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} b_{1}\\ b_{2}\\ b_{3}\end{pmatrix} \\ 3C & =b_{1}+b_{2}+b_{3}\\ C & =\frac{b_{1}+b_{2}+b_{3}}{3} \end{align*}

Therefore \(y=C=\frac{b_{1}+b_{2}+b_{3}}{3}=\frac{0+3+12}{3}=5\), or\[ y=5 \]

3.1.10.2 Part (b)

For \(y=C+Dt\) we obtain the following equations\begin{align*} b_{1} & =C+Dt\\ b_{2} & =C+Dt\\ b_{3} & =C+Dt \end{align*}

Applying the numerical values gives results in\begin{align*} 0 & =C\\ 3 & =C+D\\ 12 & =C+D\left ( 2\right ) \end{align*}

Hence\[ \overset{A}{\overbrace{\begin{pmatrix} 1 & 0\\ 1 & 1\\ 1 & 2 \end{pmatrix} }}\begin{pmatrix} C\\ D \end{pmatrix} =\begin{pmatrix} 0\\ 3\\ 12 \end{pmatrix} \] Applying \(A^{T}Ax=A^{T}b\) gives\begin{align*} \begin{pmatrix} 1 & 1 & 1\\ 0 & 1 & 2 \end{pmatrix}\begin{pmatrix} 1 & 0\\ 1 & 1\\ 1 & 2 \end{pmatrix}\begin{pmatrix} C\\ D \end{pmatrix} & =\begin{pmatrix} 1 & 1 & 1\\ 0 & 1 & 2 \end{pmatrix}\begin{pmatrix} 0\\ 3\\ 12 \end{pmatrix} \\\begin{pmatrix} 3 & 3\\ 3 & 5 \end{pmatrix}\begin{pmatrix} C\\ D \end{pmatrix} & =\begin{pmatrix} 15\\ 27 \end{pmatrix} \end{align*}

Now we solve this using Gaussian elimination. First \(U\) is found\[\begin{pmatrix} 3 & 3\\ 3 & 5 \end{pmatrix} \rightarrow \begin{pmatrix} 3 & 3\\ 0 & 2 \end{pmatrix} \] Hence \(L=\begin{pmatrix} 1 & 0\\ 1 & 1 \end{pmatrix} \) and \(Lc=b\), then \(\begin{pmatrix} 1 & 0\\ 1 & 1 \end{pmatrix}\begin{pmatrix} c_{1}\\ c_{2}\end{pmatrix} =\begin{pmatrix} 15\\ 27 \end{pmatrix} \) now \(c\) is found by forward substitution, giving \(\begin{pmatrix} c_{1}\\ c_{2}\end{pmatrix} =\begin{pmatrix} 15\\ 12 \end{pmatrix} \)

Now we solve \(Ux=c\) or \(\begin{pmatrix} 3 & 3\\ 0 & 2 \end{pmatrix}\begin{pmatrix} C\\ D \end{pmatrix} =\begin{pmatrix} 15\\ 12 \end{pmatrix} \) by backward substitution, the result is \[\begin{pmatrix} C\\ D \end{pmatrix} =\begin{pmatrix} -1\\ 6 \end{pmatrix} \] Hence the line is \[ \fbox{$y=-1+6t$} \] Here is a plot of the fit found above

b = {0, 3, 12}; t = {0, 1, 2};
p1 = ListPlot[Transpose[{t, b}], PlotStyle -> Red];
p2 = Plot[-1 + 6 t, {t, -.5, 3}, PlotTheme -> "Detailed",
FrameLabel -> {{"y(t)", None}, {"t", "Fit by least squares"}}];
Show[p2, p1]

pict
Figure 3.12:Plot of the above
3.1.10.3 Part c

For \(y=C+Dt+Et^{2}\) we obtain the following equations\begin{align*} b_{1} & =C+Dt+Et^{2}\\ b_{2} & =C+Dt+Et^{2}\\ b_{3} & =C+Dt+Et^{2} \end{align*}

Applying the numerical values gives results in\begin{align*} 0 & =C\\ 3 & =C+D+E\\ 12 & =C+2D+4E \end{align*}

Hence\[ \overset{A}{\overbrace{\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 1\\ 1 & 2 & 4 \end{pmatrix} }}\begin{pmatrix} C\\ D\\ E \end{pmatrix} =\begin{pmatrix} 0\\ 3\\ 12 \end{pmatrix} \] Now we solve this using Gaussian elimination. We do not need to use \(A^{T}A\) least squares since the number of rows is the same as number of columns. First \(U\) is found\[\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 1\\ 1 & 2 & 4 \end{pmatrix} \rightarrow \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 1\\ 0 & 2 & 4 \end{pmatrix} \rightarrow \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 1\\ 0 & 0 & 2 \end{pmatrix} \] Hence \(L=\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 2 & 1 \end{pmatrix} \) and \(Lc=b\), then \(\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 2 & 1 \end{pmatrix}\begin{pmatrix} c_{1}\\ c_{2}\\ c_{3}\end{pmatrix} =\begin{pmatrix} 0\\ 3\\ 12 \end{pmatrix} \) now \(c\) is found by forward substitution, giving \(\begin{pmatrix} c_{1}\\ c_{2}\\ c_{3}\end{pmatrix} =\begin{pmatrix} 0\\ 3\\ 6 \end{pmatrix} \)

Now we solve \(Ux=c\) or \(\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 1\\ 0 & 0 & 2 \end{pmatrix}\begin{pmatrix} C\\ D\\ E \end{pmatrix} =\begin{pmatrix} 0\\ 3\\ 6 \end{pmatrix} \) by backward substitution, giving\[\begin{pmatrix} C\\ D\\ E \end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 3 \end{pmatrix} \] Hence the solution is \[ y=3t^{2} \]

Here is a plot of the fit

b = {0, 3, 12}; t = {0, 1, 2};
p1 = ListPlot[Transpose[{t, b}], PlotStyle -> Red];
p2 = Plot[3 t^2, {t, -.5, 3}, PlotTheme -> "Detailed",
FrameLabel -> {{"y(t)", None}, {"t", "Fit by least squares"}}];
Show[p2, p1]

pict
Figure 3.13:Plot of the above

We can see this is an exact fit since no least squares was used.

3.1.11 Problem 1.4.10

pict
Figure 3.14:Problem description

Solution

From page 40 in textbook, \(y\) is force in spring, \(e\) is the elongation of spring from equilibrium and \(f\) external force at each mass. Hence for \(Ax=e\), we see that \(e_{1}=x_{1},e_{2}=x_{2}-x_{1}\) and \(e_{3}=x_{2}\). Therefore\[ \overset{A}{\overbrace{\begin{pmatrix} 1 & 0\\ -1 & 1\\ 0 & 1 \end{pmatrix} }}\begin{pmatrix} x_{1}\\ x_{2}\end{pmatrix} =\begin{pmatrix} e_{1}\\ e_{2}\\ e_{3}\end{pmatrix} \] For \(y=Ce\), here \(y\) is the internal force in spring. Hence \(y_{1}=c_{1}e_{1},y_{2}=c_{2}e_{2},y_{3}=c_{3}e_{3}\), therefore\[ \overset{A}{\overbrace{\begin{pmatrix} c_{1} & 0 & 0\\ 0 & c_{2} & 0\\ 0 & 0 & c_{3}\end{pmatrix} }}\begin{pmatrix} e_{1}\\ e_{2}\\ e_{3}\end{pmatrix} =\begin{pmatrix} y_{1}\\ y_{2}\\ y_{3}\end{pmatrix} \] For \(A^{T}y=f\), we need to find the external forces at each node first. From diagram we see that \(f_{1}=y_{1}-y_{2}\) and \(f_{2}=y_{2}+y_{3}\), therefore\[ \overset{A^{T}}{\overbrace{\begin{pmatrix} 1 & -1 & 0\\ 0 & 1 & 1 \end{pmatrix} }}\begin{pmatrix} y_{1}\\ y_{2}\\ y_{3}\end{pmatrix} =\begin{pmatrix} f_{1}\\ f_{2}\end{pmatrix} \]

3.1.12 Problem 1.4.11

pict
Figure 3.15:Problem description

Solution

To find \(y=Ce.\) In this equation, \(e\) is the elongation of the spring and \(y\) is the internal force. Hence from figure 1.7 we obtain\begin{align*} y_{1} & =c_{1}e_{1}\\ y_{2} & =c_{2}e_{2}\\ y_{3} & =c_{3}e_{3} \end{align*}

Hence in matrix form\[ \overset{C}{\overbrace{\begin{pmatrix} c_{1} & 0 & 0\\ 0 & c_{2} & 0\\ 0 & 0 & c_{3}\end{pmatrix} }}\begin{pmatrix} e_{1}\\ e_{2}\\ e_{3}\end{pmatrix} =\begin{pmatrix} y_{1}\\ y_{2}\\ y_{3}\end{pmatrix} \] In the question \(A^{T}y=f\), \(f\) is the external force. Hence by balance of force at each mass, we obtain\begin{align*} f_{1} & =y_{1}-y_{2}\\ f_{2} & =y_{2}-y_{3}\\ f_{3} & =y_{3} \end{align*}

or in matrix form\[ \overset{A}{\overbrace{\begin{pmatrix} 1 & -1 & 0\\ 0 & 1 & -1\\ 0 & 0 & 1 \end{pmatrix} }}\begin{pmatrix} y_{1}\\ y_{2}\\ y_{3}\end{pmatrix} =\begin{pmatrix} f_{1}\\ f_{2}\\ f_{3}\end{pmatrix} \] To solve, since already in \(U\) form, we will just need to do backward substitution. Hence\begin{align*} y_{3} & =f_{3}\\ y_{2} & =f_{2}+f_{3}\\ y_{1} & =f_{1}+f_{2}+f_{3} \end{align*}

3.1.13 Problem 1.4.12

pict
Figure 3.16:Problem description

Solution

\(K=A^{T}CA\), but \(A=\begin{pmatrix} 1 & 0 & 0\\ -1 & 1 & 0\\ 0 & -1 & 1 \end{pmatrix} \) given in problem 1.4.11, and \(C=\begin{pmatrix} c_{1} & 0 & 0\\ 0 & c_{2} & 0\\ 0 & 0 & c_{3}\end{pmatrix} \). Hence\begin{align*} K & =A^{T}CA=\begin{pmatrix} 1 & 0 & 0\\ -1 & 1 & 0\\ 0 & -1 & 1 \end{pmatrix} ^{T}\begin{pmatrix} c_{1} & 0 & 0\\ 0 & c_{2} & 0\\ 0 & 0 & c_{3}\end{pmatrix}\begin{pmatrix} 1 & 0 & 0\\ -1 & 1 & 0\\ 0 & -1 & 1 \end{pmatrix} \\ & =\begin{pmatrix} c_{1}+c_{2} & -c_{2} & 0\\ -c_{2} & c_{2}+c_{3} & -c_{3}\\ 0 & -c_{3} & c_{3}\end{pmatrix} \end{align*}

And \[ A^{-1}=\begin{pmatrix} 1 & 0 & 0\\ -1 & 1 & 0\\ 0 & -1 & 1 \end{pmatrix} ^{-1}=\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 1 & 1 \end{pmatrix} \]

And \begin{align*} K^{-1} & =\left ( A^{T}CA\right ) ^{-1}\\ & =A^{-1}C^{-1}\left ( A^{T}\right ) ^{-1}\\ & =\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} \frac{1}{c_{1}} & 0 & 0\\ 0 & \frac{1}{c_{2}} & 0\\ 0 & 0 & \frac{1}{c_{3}}\end{pmatrix}\begin{pmatrix} 1 & 1 & 1\\ 0 & 1 & 1\\ 0 & 0 & 1 \end{pmatrix} \\ & =\begin{pmatrix} \frac{1}{c_{1}} & \frac{1}{c_{1}} & \frac{1}{c_{1}}\\ \frac{1}{c_{1}} & \frac{1}{c_{1}}+\frac{1}{c_{2}} & \frac{1}{c_{1}}+\frac{1}{c_{2}}\\ \frac{1}{c_{1}} & \frac{1}{c_{1}}+\frac{1}{c_{2}} & \frac{1}{c_{1}}+\frac{1}{c_{2}}+\frac{1}{c_{3}}\end{pmatrix} \end{align*}

Since \(f=Kx\) then \(x=K^{-1}f\). Since we are told \(f_{1},f_{2},f_{3}\) are all positive, and so the sign of \(x\) the displacement, is determined by the sign of \(K^{-1}\). But \(K^{-1}\) has positive entries only, since \(c_{i}\) is positive by definition. Therefore all displacements \(x\) must be positive.

3.1.14 Problem 1.5.6

pict
Figure 3.17:Problem description

Solution

\[\begin{pmatrix} u_{1}^{\prime \prime }\\ u_{2}^{\prime \prime }\\ u_{3}^{\prime \prime }\end{pmatrix} +\begin{pmatrix} 1 & -1 & 0\\ -1 & 2 & -1\\ 0 & -1 & 1 \end{pmatrix}\begin{pmatrix} u_{1}\\ u_{2}\\ u_{3}\end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \] The solution is \[\begin{pmatrix} u_{1}\left ( t\right ) \\ u_{2}\left ( t\right ) \\ u_{3}\left ( t\right ) \end{pmatrix} =\left ( a_{1}\cos \sqrt{\lambda _{1}}t+b_{1}\sin \sqrt{\lambda _{1}}t\right ) \begin{pmatrix} v_{11}\\ v_{21}\\ v_{31}\end{pmatrix} +\left ( a_{2}\cos \sqrt{\lambda _{2}}t+b_{2}\sin \sqrt{\lambda _{2}}t\right ) \begin{pmatrix} v_{12}\\ v_{22}\\ v_{32}\end{pmatrix} +\left ( a_{3}\cos \sqrt{\lambda _{3}}t+b_{3}\sin \sqrt{\lambda _{3}}t\right ) \begin{pmatrix} v_{13}\\ v_{23}\\ v_{33}\end{pmatrix} \] Where \(\lambda _{i}\) are the eigenvalues and \(\mathbf{v}_{i}\) are the corresponding eigenvectors of \(A\). The constants are found from initial conditions.

For the matrix \(A\), the eigenvalues are found by solving \[ \left \vert A-\lambda I\right \vert =0 \] Solving for eigenvalues gives \(\lambda _{1}=0,\lambda _{2}=1,\lambda _{3}=3\) and the corresponding eigenvectors are \(\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} ,\begin{pmatrix} -1\\ 0\\ 1 \end{pmatrix} ,\begin{pmatrix} 1\\ -2\\ 1 \end{pmatrix} \) hence the solution becomes\[\begin{pmatrix} u_{1}\left ( t\right ) \\ u_{2}\left ( t\right ) \\ u_{3}\left ( t\right ) \end{pmatrix} =a_{1}\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} +\left ( a_{2}\cos t+b_{2}\sin t\right ) \begin{pmatrix} -1\\ 0\\ 1 \end{pmatrix} +\left ( a_{3}\cos \sqrt{3}t+b_{3}\sin \sqrt{3}t\right ) \begin{pmatrix} 1\\ -2\\ 1 \end{pmatrix} \] At \(t=0\)\begin{equation} \begin{pmatrix} 2\\ -1\\ -1 \end{pmatrix} =a_{1}\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} +a_{2}\begin{pmatrix} -1\\ 0\\ 1 \end{pmatrix} +a_{3}\begin{pmatrix} 1\\ -2\\ 1 \end{pmatrix} \tag{1} \end{equation} And taking derivative of the solution gives\[\begin{pmatrix} u_{1}^{\prime }\left ( t\right ) \\ u_{2}^{\prime }\left ( t\right ) \\ u_{3}^{\prime }\left ( t\right ) \end{pmatrix} =a_{1}\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} +\left ( -a_{2}\sin t+b_{2}\cos t\right ) \begin{pmatrix} -1\\ 0\\ 1 \end{pmatrix} +\left ( -a_{3}\sqrt{3}\sin \sqrt{3}t+b_{3}\sqrt{3}\cos \sqrt{3}t\right ) \begin{pmatrix} 1\\ -2\\ 1 \end{pmatrix} \] At \(t=0\) the above becomes\begin{equation} \begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} =a_{1}\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} +b_{2}\begin{pmatrix} -1\\ 0\\ 1 \end{pmatrix} +b_{3}\sqrt{3}\begin{pmatrix} 1\\ -2\\ 1 \end{pmatrix} \tag{2} \end{equation} Now (1),(2) needs to be solved for the constants. From (1)\[\begin{pmatrix} 1 & -1 & 1\\ 1 & 0 & -2\\ 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} a_{1}\\ a_{2}\\ a_{3}\end{pmatrix} =\begin{pmatrix} 2\\ -1\\ -1 \end{pmatrix} \] This is solved using Gaussian elimination. \(\begin{pmatrix} 1 & -1 & 1\\ 1 & 0 & -2\\ 1 & 1 & 1 \end{pmatrix} \rightarrow \begin{pmatrix} 1 & -1 & 1\\ 0 & 1 & -3\\ 0 & 2 & 0 \end{pmatrix} \rightarrow \begin{pmatrix} 1 & -1 & 1\\ 0 & 1 & -3\\ 0 & 0 & 6 \end{pmatrix} \)

Hence \(U=\begin{pmatrix} 1 & -1 & 1\\ 0 & 1 & -3\\ 0 & 0 & 6 \end{pmatrix} ,L=\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 2 & 1 \end{pmatrix} \) and hence \(Lc=b\) is solved first for \(c\) using forward substitution\[\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 2 & 1 \end{pmatrix}\begin{pmatrix} c_{1}\\ c_{2}\\ c_{3}\end{pmatrix} =\begin{pmatrix} 2\\ -1\\ -1 \end{pmatrix} \] Which gives \(c_{1}=2,c_{2}=-3,c_{3}=3\), hence now we solved for \(x\) from \(Ux=c\)\[\begin{pmatrix} 1 & -1 & 1\\ 0 & 1 & -3\\ 0 & 0 & 6 \end{pmatrix}\begin{pmatrix} a_{1}\\ a_{2}\\ a_{3}\end{pmatrix} =\begin{pmatrix} 2\\ -3\\ 3 \end{pmatrix} \] Giving \(a_{3}=\frac{1}{2},a_{2}=-\frac{3}{2},a_{1}=0\).

Now we solve for the rest of the constant in same way. From (2)\[\begin{pmatrix} 1 & -1 & \sqrt{3}\\ 1 & 0 & -2\sqrt{3}\\ 1 & 1 & \sqrt{3}\end{pmatrix}\begin{pmatrix} a_{1}\\ b_{2}\\ b_{3}\end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \] This is solved using Gaussian elimination. \(\begin{pmatrix} 1 & -1 & \sqrt{3}\\ 1 & 0 & -2\sqrt{3}\\ 1 & 1 & \sqrt{3}\end{pmatrix} \rightarrow \begin{pmatrix} 1 & -1 & \sqrt{3}\\ 0 & 1 & -3\sqrt{3}\\ 0 & 2 & 0 \end{pmatrix} \rightarrow \begin{pmatrix} 1 & -1 & \sqrt{3}\\ 0 & 1 & -3\sqrt{3}\\ 0 & 0 & 6\sqrt{3}\end{pmatrix} \)

Hence \(U=\begin{pmatrix} 1 & -1 & \sqrt{3}\\ 0 & 1 & -3\sqrt{3}\\ 0 & 0 & 6\sqrt{3}\end{pmatrix} ,L=\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 2 & 1 \end{pmatrix} \) and \(Lc=b\) is solved first for \(c\) using forward substitution\[\begin{pmatrix} 1 & 0 & 0\\ 1 & 1 & 0\\ 1 & 2 & 1 \end{pmatrix}\begin{pmatrix} c_{1}\\ c_{2}\\ c_{3}\end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \] \(c_{1}=0,c_{2}=0,c_{3}=0\), therefore now we solved for \(x\) from \(Ux=c\)\[\begin{pmatrix} 1 & -1 & \sqrt{3}\\ 0 & 1 & -3\sqrt{3}\\ 0 & 0 & 6\sqrt{3}\end{pmatrix}\begin{pmatrix} a_{1}\\ b_{2}\\ b_{3}\end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \] Which gives \(b_{3}=0,b_{2}=0,a_{1}=0\). Now that all constants are found the final solution is\[\begin{pmatrix} u_{1}\left ( t\right ) \\ u_{2}\left ( t\right ) \\ u_{3}\left ( t\right ) \end{pmatrix} =-\frac{1}{2}\cos t\begin{pmatrix} -1\\ 0\\ 1 \end{pmatrix} +\frac{1}{2}\cos \sqrt{3}t\begin{pmatrix} 1\\ -2\\ 1 \end{pmatrix} \] Hence\begin{align*} u_{1}\left ( t\right ) & =\frac{3}{2}\cos t+\frac{1}{2}\cos \sqrt{3}t\\ u_{2}\left ( t\right ) & =-\cos \sqrt{3}t\\ u_{3}\left ( t\right ) & =-\frac{3}{2}\cos t+\frac{1}{2}\cos \sqrt{3}t \end{align*}

3.1.15 Problem 1.5.7

   3.1.15.1 Part (a)
   3.1.15.2 Part (b)

pict
Figure 3.18:Problem description

Solution

3.1.15.1 Part (a)

\begin{align*} A & =\begin{pmatrix} 3 & -1 & 0\\ -2 & 2 & -1\\ -1 & -1 & 1 \end{pmatrix} \\ A^{T} & =\begin{pmatrix} 3 & -2 & -1\\ -1 & 2 & -1\\ 0 & -1 & 1 \end{pmatrix} \end{align*}

For eigenvector \(\mathbf{v}\) of ones, we write\[ A^{T}\mathbf{v}=\lambda \mathbf{v} \] Hence\begin{align*} \begin{pmatrix} 3 & -2 & -1\\ -1 & 2 & -1\\ 0 & -1 & 1 \end{pmatrix}\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} & =\lambda \begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} \\\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} & =\lambda \begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix} \end{align*}

Which implies \(\lambda =0\). Since \(A^{T}\) has same eigenvalues of \(A\) then \(A\) has zero eigenvalue. But the determinant of \(A\) is the products of its eigenvalues. Since one eigenvalue is zero, then \(\left \vert A\right \vert =0\), which means \(A\) is singular.

3.1.15.2 Part (b)

To find all three eigenvalues of \(A\) we solve \(\left \vert \lambda I-A\right \vert =0\). Hence\begin{align*} \begin{vmatrix} \lambda -3 & 1 & 0\\ 2 & \lambda -2 & 1\\ 1 & 1 & \lambda -1 \end{vmatrix} & =0\\ \lambda ^{3}-6\lambda ^{2}+8\lambda & =0\\ \lambda \left ( \lambda ^{2}-6\lambda +8\right ) & =0 \end{align*}

Hence \(\lambda =0,\lambda =2,\lambda =4\,.\)To find the eigenvectors, we solve \(Av_{i}=\lambda _{i}v_{i}\) for each eigenvalue. This means solving  \(\left ( \lambda _{i}I-A\right ) v_{i}=0\) for each eigenvalue. For \(\lambda =0\)\[ -\begin{pmatrix} 3 & -1 & 0\\ -2 & 2 & -1\\ -1 & -1 & 1 \end{pmatrix}\begin{pmatrix} v_{11}\\ v_{21}\\ v_{31}\end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \] We always set \(v_{1j}=1\) and then go to find \(v_{2j},v_{3j}\) in finding eigenvectors. Hence we solve\[\begin{pmatrix} -3 & 1 & 0\\ 2 & -2 & 1\\ 1 & 1 & -1 \end{pmatrix}\begin{pmatrix} 1\\ v_{21}\\ v_{31}\end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \] Solving gives \(v_{1}=\begin{pmatrix} 1\\ 3\\ 4 \end{pmatrix} \) For the second eigenvalue \(\lambda =2\) we obtain\begin{align*} \left ( \begin{pmatrix} 2 & 0 & 0\\ 0 & 2 & 0\\ 0 & 0 & 2 \end{pmatrix} -\begin{pmatrix} 3 & -1 & 0\\ -2 & 2 & -1\\ -1 & -1 & 1 \end{pmatrix} \right ) \begin{pmatrix} v_{12}\\ v_{22}\\ v_{32}\end{pmatrix} & =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \\\begin{pmatrix} -1 & 1 & 0\\ 2 & 0 & 1\\ 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} 1\\ v_{22}\\ v_{32}\end{pmatrix} & =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \end{align*}

Solving gives \(v_{2}=\begin{pmatrix} -1\\ -1\\ 2 \end{pmatrix} .\) For the last eigenvalue \(\lambda =4\) we obtain\begin{align*} \left ( \begin{pmatrix} 4 & 0 & 0\\ 0 & 4 & 0\\ 0 & 0 & 4 \end{pmatrix} -\begin{pmatrix} 3 & -1 & 0\\ -2 & 2 & -1\\ -1 & -1 & 1 \end{pmatrix} \right ) \begin{pmatrix} v_{13}\\ v_{23}\\ v_{33}\end{pmatrix} & =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \\\begin{pmatrix} 1 & 1 & 0\\ 2 & 2 & 1\\ 1 & 1 & 3 \end{pmatrix}\begin{pmatrix} 1\\ v_{23}\\ v_{33}\end{pmatrix} & =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \end{align*}

Solving gives \(v_{3}=\) \(\begin{pmatrix} -1\\ 1\\ 0 \end{pmatrix} .\)Summary. The eigenvalues are \(\left \{ 0,2,4\right \} \) and the eigenvectors are\[ \fbox{$\begin{pmatrix} 1\\ 3\\ 4 \end{pmatrix} ,\begin{pmatrix} -1\\ -1\\ 2 \end{pmatrix} ,\begin{pmatrix} -1\\ 1\\ 0 \end{pmatrix} $} \]

3.1.16 Problem 1.5.11

pict
Figure 3.19:Problem description

Solution

The elements of the diagonal of \(AB\) come from multiplying row \(i\) in \(A\) with column \(i\) in \(B\). Therefore, looking at the diagonal elements only, we can write, using \(a_{ij}\) as element in \(A\) and using \(b_{ij}\) as element in \(B\)\[ AB=\begin{pmatrix} \sum \limits _{i}a_{1i}b_{i1} & & & \\ & \sum \limits _{i}a_{2i}b_{i2} & & \\ & & \ddots & \\ & & & \sum \limits _{i}a_{ni}b_{in}\end{pmatrix} \] Hence the trace of \(AB\) is\[ tr\left ( AB\right ) =\sum \limits _{i}a_{1i}b_{i1}+\sum \limits _{i}a_{2i}b_{i2}+\cdots +\sum \limits _{i}a_{ni}b_{in} \] But the above can be combined as\begin{equation} tr\left ( AB\right ) =\sum \limits _{k}\sum \limits _{i}a_{ki}b_{ik} \tag{1} \end{equation} Now if we consider \(BA\), then the result comes from multiplying row \(i\) in \(B \) with column \(i\) in \(A\)\[ BA=\begin{pmatrix} \sum \limits _{i}b_{1i}a_{i1} & & & \\ & \sum \limits _{i}b_{2i}a_{i2} & & \\ & & \ddots & \\ & & & \sum \limits _{i}b_{ni}a_{in}\end{pmatrix} \] Hence the trace of \(BA\) is\[ tr\left ( BA\right ) =\sum \limits _{i}b_{1i}a_{i1}+\sum \limits _{i}b_{2i}a_{i2}+\cdots +\sum \limits _{i}b_{ni}a_{in} \] But the above can be combined as\begin{equation} tr\left ( BA\right ) =\sum \limits _{k}\sum \limits _{i}b_{ki}a_{ik} \tag{2} \end{equation} Looking at (1) and (2) above we can see that both traces contain the same elements, but arranged differently. The indices can be changes in the sum without changing the value of the sum. This can be seen more directly by looking at specific example of \(2\times 2\) case. Let \(A=\begin{pmatrix} a & b\\ c & d \end{pmatrix} ,B=\begin{pmatrix} e & f\\ g & h \end{pmatrix} \), hence the elements on the diagonal of \(AB\) are \(\begin{pmatrix} ae+bg & \\ & cf+dh \end{pmatrix} \) while for \(BA\) the result is \(\begin{pmatrix} ae+cf & \\ & bg+dh \end{pmatrix} \). We see that the trace is the same.

3.1.17 Problem 1.5.12

pict
Figure 3.20:Problem description

Solution

\(\det \left ( A-\lambda I\right ) \) is a polynomial in \(\lambda \). Hence it can be factored in its roots as\[ \det \left ( A-\lambda I\right ) =P\left ( \lambda \right ) =\left ( \lambda _{1}-\lambda \right ) \left ( \lambda _{2}-\lambda \right ) \left ( \lambda _{3}-\lambda \right ) \cdots \left ( \lambda _{n}-\lambda \right ) \] Assuming there is \(n\) eigenvalues. When \(\lambda =0\) (which is the independent variable now, and not any specific eigenvalue, then (1) becomes\[ \det \left ( A\right ) =P\left ( 0\right ) =\lambda _{1}\lambda _{2}\lambda _{3}\cdots \lambda _{n} \] Hence \[ \det \left ( A\right ) =\lambda _{1}\lambda _{2}\lambda _{3}\cdots \lambda _{n} \] Which is what we are asked to show.

3.1.18 Problem 1.5.13

pict
Figure 3.21:Problem description

Solution

\begin{equation} \det \left ( A-\lambda I\right ) =P\left ( \lambda \right ) =\left ( \lambda _{1}-\lambda \right ) \left ( \lambda _{2}-\lambda \right ) \left ( \lambda _{3}-\lambda \right ) \cdots \left ( \lambda _{n}-\lambda \right ) \tag{*} \end{equation} Let look at the case of \(n=2\)\begin{align*} P\left ( \lambda \right ) & =\left ( \lambda _{1}-\lambda \right ) \left ( \lambda _{2}-\lambda \right ) \\ & =\lambda ^{2}-\lambda \left ( \lambda _{1}+\lambda _{2}\right ) +\lambda _{1}\lambda _{2} \end{align*}

Hence the coefficient of \(\left ( -\lambda \right ) ^{n-1}\) which is \(-\lambda \) is \(\left ( \lambda _{1}+\lambda _{2}\right ) \) which is the sum of the eigenvalues. Lets look at \(n=3\)\begin{align*} P\left ( \lambda \right ) & =\left ( \lambda _{1}-\lambda \right ) \left ( \lambda _{2}-\lambda \right ) \left ( \lambda _{3}-\lambda \right ) \\ & =-\lambda ^{3}+\lambda ^{2}\left ( \lambda _{1}+\lambda _{2}+\lambda _{3}\right ) -\lambda \left ( \lambda _{1}\lambda _{2}+\lambda _{1}\lambda _{3}+\lambda _{2}\lambda _{3}\right ) +\lambda _{1}\lambda _{2}\lambda _{3} \end{align*}

So the pattern is now clear. The coefficient of \(\left ( -\lambda \right ) ^{n-1}\) is the sum of all the eigenvalues of \(A\).

For \(\det \left ( A-\lambda I\right ) \), looking at \(n=2\) we write\begin{align*} \det \left ( A-\lambda I\right ) & =\det \begin{pmatrix} a_{11}-\lambda & a_{12}\\ a_{21} & a_{22}-\lambda \end{pmatrix} =\left ( a_{11}-\lambda \right ) \left ( a_{22}-\lambda \right ) -a_{21}a_{12}\\ & =\lambda ^{2}-\lambda \left ( a_{11}+a_{22}\right ) +\left ( a_{11}a_{22}-a_{21}a_{12}\right ) \end{align*}

We see in this case that the coefficient of \(\left ( -\lambda \right ) ^{n-1}=\) \(-\lambda \) is the trace of \(A\). Lets look at \(n=3\)\begin{align*} \det \left ( A-\lambda I\right ) & =\det \begin{pmatrix} a_{11}-\lambda & a_{12} & a_{13}\\ a_{21} & a_{22}-\lambda & a_{23}\\ a_{31} & a_{32} & a_{33}-\lambda \end{pmatrix} \\ & =\left ( a_{11}-\lambda \right ) \det \begin{pmatrix} a_{22}-\lambda & a_{23}\\ a_{32} & a_{33}-\lambda \end{pmatrix} -a_{12}\det \begin{pmatrix} a_{21} & a_{23}\\ a_{31} & a_{33}-\lambda \end{pmatrix} +a_{13}\det \begin{pmatrix} a_{21} & a_{22}-\lambda \\ a_{31} & a_{32}\end{pmatrix} \\ & =\left ( a_{11}-\lambda \right ) \left ( \lambda ^{2}-\lambda \left ( a_{22}+a_{33}\right ) +\left ( a_{22}a_{33}-a_{23}a_{32}\right ) \right ) \\ & -a_{12}\left ( a_{21}a_{33}-\lambda a_{21}-a_{31}a_{23}\right ) +a_{13}\left ( \lambda a_{31}+a_{21}a_{32}-a_{22}a_{31}\right ) \\ & =-\lambda ^{3}+\lambda ^{2}\left ( a_{11}+a_{22}+a_{33}\right ) -\lambda \left ( a_{11}a_{22}-a_{12}a_{21}+a_{11}a_{33}-a_{13}a_{31}+a_{22}a_{33}-a_{23}a_{32}\right ) \\ & +\left ( a_{11}a_{22}a_{33}-a_{11}a_{23}a_{32}-a_{12}a_{21}a_{33}+a_{12}a_{31}a_{23}+a_{21}a_{13}a_{32}-a_{13}a_{22}a_{31}\right ) \end{align*}

We see again that the coefficient of \(\left ( -\lambda \right ) ^{n-1}=\lambda ^{2}\) is the trace of \(A\).  So by construction we can show that coefficient of \(\left ( -\lambda \right ) ^{n-1}\) is the trace of \(A\). But we showed above that coefficient of \(\left ( -\lambda \right ) ^{n-1}\) is the sum of all the eigenvalues of \(A\). Hence the sum of all the eigenvalues of \(A=tr\left ( A\right ) \)