πŸ”¬ Tutorial problems zeta

πŸ”¬ Tutorial problems zeta#

Note

This problems are designed to help you practice the concepts covered in the lectures. Not all problems may be covered in the tutorial, those left are for additional practice. The symbol 🍹 indicates additional problems.

\(\zeta\).1#

Find the Taylor series expansion (that is, infinite-order approximation) of the function \(f(x)=e^{\frac{x}{2}}\) around the point \(x=2\), and use it to obtain a cubic approximation of this function.

What is the remainder term that reconciles the cubic approximation of the function based on its Taylor series expansion and the true value of the function?

Note that

\[\begin{split} \begin{array}{lll} f(x)=e^{\frac{x}{2}}, & \text { so that } & f(2)=e^{\frac{2}{2}}=e^{1}=e, \\ f^{\prime}(x)=\left(\frac{1}{2}\right) e^{\frac{x}{2}}, & \text { so that } & f^{\prime}(2)=\left(\frac{1}{2}\right) e^{\frac{2}{2}}=\left(\frac{1}{2}\right) e^{1}=\left(\frac{1}{2}\right) e, \\ f^{\prime \prime}(x)=\left(\frac{1}{4}\right) e^{\frac{x}{2}}, & \text { so that } & f^{\prime \prime}(2)=\left(\frac{1}{4}\right) e^{\frac{2}{2}}=\left(\frac{1}{4}\right) e^{1}=\left(\frac{1}{4}\right) e, \\ f^{\prime \prime \prime}(x)=\left(\frac{1}{8}\right) e^{\frac{x}{2}}, & \text { so that } & f^{\prime \prime \prime}(2)=\left(\frac{1}{8}\right) e^{\frac{2}{2}}=\left(\frac{1}{8}\right) e^{1}=\left(\frac{1}{8}\right) e, \\ \vdots & \vdots & \vdots \\ f^{(n)}(x)=\left(\frac{1}{2^{n}}\right) e^{\frac{x}{2}}, & \text { so that } & f^{(n)}(2)=\left(\frac{1}{2^{n}}\right) e^{\frac{2}{2}}=\left(\frac{1}{2^{n}}\right) e^{1}=\left(\frac{1}{2^{n}}\right) e,\\ \vdots & \vdots & \vdots \end{array} \end{split}\]

Recall that the Taylor series expansion of a function around the point \(x=x_{0}\), assuming that the function is infinitely continuously differentiable in the neighbourhood of that point, is

\[\begin{split} \begin{array}{ll} f(x) &= f\left(x_{0}\right)+f^{\prime}\left(x_{0}\right)\left(x-x_{0}\right)+\left(\frac{1}{2}\right) f^{\prime \prime}\left(x_{0}\right)\left(x-x_{0}\right)^{2} \\ & \quad + \left(\frac{1}{6}\right) f^{\prime \prime \prime}\left(x_{0}\right)\left(x-x_{0}\right)^{3}+\cdots+\left(\frac{1}{n !}\right) f^{(n)}\left(x_{0}\right)\left(x-x_{0}\right)^{n}+\cdots \\ &= \sum_{n=0}^{\infty}\left(\frac{1}{n !}\right) f^{(n)}\left(x_{0}\right)\left(x-x_{0}\right)^{n}, \end{array} \end{split}\]

where \(f^{0}\left(x_{0}\right):=f\left(x_{0}\right)\). (Note that, since we are expanding around the point \(x=2\) here, we need to assume that \(x \neq 2\) in the expansion. This means that \((x-2)^{0}=1\). This avoids the problem that \(0^{0}\) is undefined.)

Thus we know that the Taylor series expansion of \(f(x)=e^{\frac{x}{2}}\) around the point \(x=2\) is

\[\begin{split} \begin{array}{ll} e^{\frac{x}{2}} &= \left(\frac{1}{1}\right) e+\left(\frac{1}{1}\right)\left(\frac{1}{2}\right) e(x-2)+\left(\frac{1}{2}\right)\left(\frac{1}{4}\right) e(x-2)^{2}+\left(\frac{1}{6}\right)\left(\frac{1}{8}\right) e(x-2)^{3}+\cdots \\ & \quad +\left(\frac{1}{n !}\right)\left(\frac{1}{2^{n}}\right) e(x-2)^{n}+\cdots \\ &= e+\left(\frac{1}{2}\right) e(x-2)+\left(\frac{1}{8}\right) e(x-2)^{2}+\left(\frac{1}{48}\right) e(x-2)^{3}+\cdots \\ & \quad +\left(\frac{1}{n ! 2^{n}}\right) e(x-2)^{n}+\cdots \\ &= \sum_{n=0}^{\infty}\left(\frac{1}{n !}\right)\left(\frac{1}{2^{n}}\right) e(x-2)^{n} \\ &= e \sum_{n=0}^{\infty}\left(\frac{1}{n !}\right)\left(\frac{1}{2^{n}}\right)(x-2)^{n} . \end{array} \end{split}\]

The cubic (or third-degree) Taylor series approximation of \(f(x)=e^{\frac{x}{2}}\) around the point \(x=2\) is

\[ e^{\frac{x}{2}} \approx e+\left(\frac{1}{2}\right) e(x-2)+\left(\frac{1}{8}\right) e(x-2)^{2}+\left(\frac{1}{48}\right) e(x-2)^{3} . \]

The remainder term for this cubic Taylor series approximation of the function \(f(x)=e^{\frac{x}{2}}\) around the point \(x=2\) is

\[\begin{split} \begin{array}{ll} R_{3}(x) & =\left(\frac{1}{4 !}\right) f^{(4)}(z)(x-2)^{4} \\ & =\left(\frac{1}{4 !}\right)\left(\left(\frac{1}{2^{4}}\right) e^{\frac{z}{2}}\right)(x-2)^{4} \\ & =\left(\frac{1}{24}\right)\left(\frac{1}{16}\right) e^{\frac{z}{2}}(x-2)^{4} \\ & =\left(\frac{1}{384}\right) e^{\frac{z}{2}}(x-2)^{4}, \end{array} \end{split}\]

for some \(z \in(\min (x, 2), \max (x, 2))\). Note that the value of \(z\) is not fixed for all possible values of \(x\). Instead, \(z\) will vary with \(x\). This can be seen by noting that if \(x<2\), then we must have \(x<z<2\), while if \(x>2\), then we must have \(2<z<x\). Clearly there is no value of \(x\) that is simultaneously both strictly less than two and strictly greater than two.

\(\zeta\).2#

Evaluate the expression \(\lim _{x \rightarrow \infty} \frac{x^{2}}{e^{x}}\).

Consider the function \(f(x)=\frac{g(x)}{h(x)}=\frac{x^{2}}{e^{x}}\). Note that

\[ \lim _{x \longrightarrow \infty} f(x)=\lim _{x \longrightarrow \infty} \frac{x^{2}}{e^{x}}=\frac{\lim _{x \longrightarrow \infty} x^{2}}{\lim _{x \longrightarrow \infty} e^{x}}=\frac{\infty}{\infty}, \]

which is of indeterminate form. We have \(g^{\prime}(x)=2 x\) and \(h^{\prime}(x)=e^{x}\). Note that

\[ \lim _{x \longrightarrow \infty} \frac{g^{\prime}(x)}{h^{\prime}(x)}=\lim _{x \longrightarrow \infty} \frac{2 x}{e^{x}}=\frac{\lim _{x \rightarrow \infty} 2 x}{\lim _{x \rightarrow \infty} e^{x}}=\frac{\infty}{\infty} \]

which is also of indeterminate form. We have \(g^{\prime \prime}(x)=2\) and \(h^{\prime \prime}(x)=e^{x}\). Note that

\[ \lim _{x \longrightarrow \infty} \frac{g^{\prime \prime}(x)}{h^{\prime \prime}(x)}=\lim _{x \longrightarrow \infty} \frac{2}{e^{x}}=\frac{\lim _{x \longrightarrow \infty} 2}{\lim _{x \longrightarrow \infty} e^{x}}=\frac{2}{\infty}=0 . \]

Thus we can conclude that

\[ \lim _{x \longrightarrow \infty} f(x)=\lim _{x \longrightarrow \infty} \frac{g(x)}{h(x)}=\lim _{x \longrightarrow \infty} \frac{x^{2}}{e^{x}}=\lim _{x \longrightarrow \infty} \frac{g^{\prime \prime}(x)}{h^{\prime \prime}(x)}=\lim _{x \longrightarrow \infty} \frac{2}{e^{x}}=0, \]

by L’Hopital’s rule.

\(\zeta\).3#

Let \(I_{2}\) be the \((2 \times 2)\) identity matrix, and consider the following three matrices:

\[\begin{split} A=\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right), B=\left(\begin{array}{cc} 4 & 3 \\ -7 & 0 \end{array}\right) \text {, and } C=\left(\begin{array}{ccc} 5 & -1 & -1 \\ 12 & 0 & 2 \end{array}\right) \text {. } \end{split}\]

(a) If possible, find \(A+B\).

(b) If possible, find \(A-B\).

(c) If possible, find \(A+4 B\).

(d) If possible, find \(A+I_{2}\).

(e) If possible, find \(A I_{2}\).

(f) If possible, find \(A+C\).

(g) If possible, find \(A+B^{T}\).

(h) If possible, find \(B C\).

(i) If possible, find \(C B\).

(j) If possible, find \(C B^{T}\).

(k) If possible, find \((A B)^{T}\).

(l) If possible, find \(C+5 I_{2}\).

(m) If possible, find \(C^{T} A\).

(n) If possible, find \((B C)^{T}\).

(o) If possible, find \(A C+B\).

This question comes from Bradley (2008, pp. 495-496, Progress Exercises 9.2).

3(a)

We have

\[\begin{split} \begin{array}{ll} A+B & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)+\left(\begin{array}{cc} 4 & 3 \\ -7 & 0 \end{array}\right) \\ & =\left(\begin{array}{cc} 1+4 & -4+3 \\ 0+(-7) & 9+0 \end{array}\right) \\ & =\left(\begin{array}{cc} 5 & -1 \\ -7 & 9 \end{array}\right) . \end{array} \end{split}\]

3(b)

We have

\[\begin{split} \begin{array}{ll} A-B & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)-\left(\begin{array}{cc} 4 & 3 \\ -7 & 0 \end{array}\right) \\ & =\left(\begin{array}{cc} 1-4 & -4-3 \\ 0-(-7) & 9-0 \end{array}\right) \\ & =\left(\begin{array}{cc} 1-4 & -4-3 \\ 0+7 & 9-0 \end{array}\right) \\ & =\left(\begin{array}{cc} -3 & -7 \\ 7 & 9 \end{array}\right) . \end{array} \end{split}\]

3(c)

We have

\[\begin{split} \begin{array}{ll} A+4 B & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)+4\left(\begin{array}{cc} 4 & 3 \\ -7 & 0 \end{array}\right) \\ & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)+\left(\begin{array}{cc} (4)(4) & (4)(3) \\ (4)(-7) & (4)(0) \end{array}\right) \\ & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)+\left(\begin{array}{cc} 16 & 12 \\ -28 & 0 \end{array}\right) \\ & =\left(\begin{array}{cc} 1+16 & -4+12 \\ 0+(-28) & 9+0 \end{array}\right) \\ & =\left(\begin{array}{cc} 17 & 8 \\ -28 & 9 \end{array}\right) . \end{array} \end{split}\]

3(d)

We have

\[\begin{split} \begin{array}{ll} A+I_{2} & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)+\left(\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right) \\ & =\left(\begin{array}{cc} 1+1 & -4+0 \\ 0+0 & 9+1 \end{array}\right) \\ & =\left(\begin{array}{cc} 2 & -4 \\ 0 & 10 \end{array}\right) . \end{array} \end{split}\]

3(e)

We have

\[\begin{split} \begin{array}{ll} A I_{2} & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)\left(\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right) \\ & =\left(\begin{array}{cc} (1)(1)+(-4)(0) & (1)(0)+(-4)(1) \\ (0)(1)+(9)(0) & (0)(0)+(9)(1) \end{array}\right) \\ & =\left(\begin{array}{cc} 1+0 & 0+(-4) \\ 0+0 & 0+9 \end{array}\right) \\ & =\left(\begin{array}{cc} 1+0 & 0-4 \\ 0+0 & 0+9 \end{array}\right) \\ & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right) \\ & =A . \end{array} \end{split}\]

3(f)

Note that \(A\) is a \((2 \times 2)\) matrix and \(C\) is a \((2 \times 3)\) matrix. Since \(A\) and \(C\) do not have the same dimensions, their sum \((A+C)\) is undefined.

3(g)

We have

\[\begin{split} \begin{array}{ll} A+B^{T} &=\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)+\left(\begin{array}{cc} 4 & 3 \\ -7 & 0 \end{array}\right)^{T} \\ & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)+\left(\begin{array}{cc} 4 & -7 \\ 3 & 0 \end{array}\right) \\ & =\left(\begin{array}{cc} 1+4 & -4+(-7) \\ 0+3 & 9+0 \end{array}\right) \\ & =\left(\begin{array}{cc} 1+4 & -4-7 \\ 0+3 & 9+0 \end{array}\right) \\ & =\left(\begin{array}{cc} 5 & -11 \\ 3 & 9 \end{array}\right) \text {. } \end{array} \end{split}\]

3(h)

We have

\[\begin{split} \begin{array}{ll} BC &=\left(\begin{array}{cc} 4 & 3 \\ -7 & 0 \end{array}\right)\left(\begin{array}{ccc} 5 & -1 & -1 \\ 12 & 0 & 2 \end{array}\right) \\ & =\left(\begin{array}{ccc} (4)(5)+(3)(12) & (4)(-1)+(3)(0) & (4)(-1)+(3)(2) \\ (-7)(5)+(0)(12) & (-7)(-1)+(0)(0) & (-7)(-1)+(0)(2) \end{array}\right) \\ & =\left(\begin{array}{ccc} 20+36 & -4+0 & -4+6 \\ -35+0 & 7+0 & 7+0 \end{array}\right) \\ & =\left(\begin{array}{ccc} 56 & -4 & 2 \\ -35 & 7 & 7 \end{array}\right) . \end{array} \end{split}\]

3(i)

Note that \(C\) is a \((2 \times 3)\) matrix and \(B\) is a \((2 \times 2)\) matrix. Since the number of columns in \(C\) (three) does not equal the number of rows in \(B\) (two), their dot product \((C B)\) is undefined.

3(j)

Note that \(C\) is a \((2 \times 3)\) matrix and \(B\) is a \((2 \times 2)\) matrix. Since \(B\) is a \((2 \times 2)\) matrix, we know that \(B^{T}\) is a \((2 \times 2)\) matrix. The reason for this is that the number of rows in \(B^{T}\) is equal to the number of columns in \(B\) and the number of columns in \(B^{T}\) is equal to the number of rows in \(B\). Since the number of columns in \(C\) (three) does not equal the number of rows in \(B^{T}\) (two), their dot product \((C B\) ) is undefined.

3(k)

We have

\[\begin{split} \begin{array}{ll} A B & =\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right)\left(\begin{array}{cc} 4 & 3 \\ -7 & 0 \end{array}\right) \\ & =\left(\begin{array}{cc} (1)(4)+(-4)(-7) & (1)(3)+(-4)(0) \\ (0)(4)+(9)(-7) & (0)(3)+(9)(0) \end{array}\right) \\ & =\left(\begin{array}{cc} 4+28 & 3+0 \\ 0-63 & 0+0 \end{array}\right) \\ & =\left(\begin{array}{cc} 32 & 3 \\ -63 & 0 \end{array}\right) . \end{array} \end{split}\]

This means that

\[\begin{split} \begin{array}{ll} (A B)^{T} & =\left(\begin{array}{cc} 32 & 3 \\ -63 & 0 \end{array}\right)^{T} \\ & =\left(\begin{array}{cc} 32 & -63 \\ 3 & 0 \end{array}\right) . \end{array} \end{split}\]

3(l)

Note that \(C\) is a \((2 \times 3)\) matrix, \(I_{2}\) is a \((2 \times 2)\) matrix and \(I_{3}\) is a \((3 \times 3)\) matrix. In fact, all identity matrices are square matrices. As such, \(5 I\) will also be a square matrix, regardless of its dimension. Since \(C\) is not a square matrix and \(5 I\) is a square matrix, we know that \(C\) and \(5 I\) do not have the same dimensions. As such, their sum \((C+5 I)\) is not defined.

3(m)

We have

\[\begin{split} \begin{array}{ll} C^{T} A & =\left(\begin{array}{ccc} 5 & -1 & -1 \\ 12 & 0 & 2 \end{array}\right)^{T}\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right) \\ & =\left(\begin{array}{cc} 5 & 12 \\ -1 & 0 \\ -1 & 2 \end{array}\right)\left(\begin{array}{cc} 1 & -4 \\ 0 & 9 \end{array}\right) \\ & =\left(\begin{array}{cc} (5)(1)+(12)(0) & (5)(-4)+(12)(9) \\ (-1)(1)+(0)(0) & (-1)(-4)+(0)(9) \\ (-1)(1)+(2)(0) & (-1)(-4)+(2)(9) \end{array}\right) \\ & =\left(\begin{array}{cc} 5+0 & -20+108 \\ -1+0 & 4+0 \\ -1+0 & 4+18 \end{array}\right) \\ & =\left(\begin{array}{cc} 5 & 88 \\ -1 & 4 \\ -1 & 22 \end{array}\right) . \end{array} \end{split}\]

3(n)

Recall from Part (h) that

\[\begin{split} B C=\left(\begin{array}{ccc} 56 & -4 & 2 \\ -35 & 7 & 7 \end{array}\right) \end{split}\]

Thus we have

\[\begin{split} \begin{array}{ll} (B C)^{T} & =\left(\begin{array}{ccc} 56 & -4 & 2 \\ -35 & 7 & 7 \end{array}\right)^{T} \\ & =\left(\begin{array}{cc} 56 & -35 \\ -4 & 7 \\ 2 & 7 \end{array}\right) . \end{array} \end{split}\]

3(o)

Note that \(A\) is a \((2 \times 2)\) matrix, \(B\) is a \((2 \times 2)\) matrix and \(C\) is a \((2 \times 3)\) matrix. Since \(A\) is a \((2 \times 2)\) matrix and \(C\) is a \((2 \times 3)\) matrix, we know that the matrix dot product \(A C\) is defined and will be a \((2 \times 3)\) matrix. It is defined because the number of columns in \(A\) (two) is the same as the number of rows in \(B\) (two). The resulting matrix \((A C)\) will have the same number of rows as \(A\) (two) and the same number of columns as \(B\) (two). It is for this reason that it is a \((2 \times 3)\) matrix. Since \(A C\) is a \((2 \times 3)\) matrix and \(B\) is a \((2 \times 2)\) matrix, we know that they do not have the same dimensions. As such, their sum \((A C+B)\) is not defined.

\(\zeta\).4#

The Real Estate Institute wants to develop a model which explains the relationship between the price of land and the distance from the central business district. The price per square metre of the last five blocks of land sold are shown in the following vector:

\[\begin{split} y=\left(\begin{array}{l} 6 \\ 4 \\ 7 \\ 5 \\ 9 \end{array}\right) \end{split}\]

The distance of these blocks from the central business district are shown in the second column of the following matrix:

\[\begin{split} X=\left(\begin{array}{cc} 1 & 15 \\ 1 & 20 \\ 1 & 5 \\ 1 & 16 \\ 1 & 1 \end{array}\right) \end{split}\]

It can be shown that

\[\begin{split} \left(X^{T} X\right)^{-1}=\left(\begin{array}{cc} \frac{4,535}{6,430} & \frac{-57}{1,286} \\ \frac{-57}{1,286} & \frac{5}{1,286} \end{array}\right) \end{split}\]

(a) Find \(X^{T} y\).

(b) Find \(X^{T} X\).

(c) Find \(\left(X^{T} X\right)^{-1} X^{T} y\). (Note that this is the formula for the ordinary least squares (and maximum likelihood) estimator of the coefficient parameter vector in the classical linear regression model.)

(d) Find the hat matrix, \(P=X\left(X^{T} X\right)^{-1} X^{T}\).

(e) Calculate \(P^{T}\). Is the hat matrix symmetric?

(f) Calculate \(P P\). Is the hat matrix idempotent?

(g) Find the residual-making matrix, \(M=I-P\).

(h) Calculate \(M^{T}\). Is the residual-making matrix symmetric?

(i) Calculate \(M M\). Is the residual-making matrix idempotent?

Econometric Application: This example comes from Shannon (1995, p. 228, Question 12). Some additional parts have been added to that question here.

4(a)

Note that

\[\begin{split} \begin{array}{ll} X^{T} y &=\left(\begin{array}{cc} 1 & 15 \\ 1 & 20 \\ 1 & 5 \\ 1 & 16 \\ 1 & 1 \end{array}\right)^{T}\left(\begin{array}{l} 6 \\ 4 \\ 7 \\ 5 \\ 9 \end{array}\right) \\ & =\left(\begin{array}{ccccc} 1 & 1 & 1 & 1 & 1 \\ 15 & 20 & 5 & 16 & 1 \end{array}\right)\left(\begin{array}{l} 6 \\ 4 \\ 7 \\ 5 \\ 9 \end{array}\right) \\ & =\left(\begin{array}{c} (1)(6)+(1)(4)+(1)(7)+(1)(5)+(1)(9) \\ (15)(6)+(20)(4)+(5)(7)+(16)(5)+(1)(9) \end{array}\right) \\ & =\left(\begin{array}{c} 6+4+7+5+9 \\ 90+80+35+80+9 \end{array}\right) \\ & =\left(\begin{array}{c} 31 \\ 294 \end{array}\right) \text {. } \end{array} \end{split}\]

4(b)

Note that

\[\begin{split} \begin{array}{ll} X^{T} X & =\left(\begin{array}{cc} 1 & 15 \\ 1 & 20 \\ 1 & 5 \\ 1 & 16 \\ 1 & 1 \end{array}\right)^{T}\left(\begin{array}{cc} 1 & 15 \\ 1 & 20 \\ 1 & 5 \\ 1 & 16 \\ 1 & 1 \end{array}\right) \\ & =\left(\begin{array}{ccccc} 1 & 1 & 1 & 1 & 1 \\ 15 & 20 & 5 & 16 & 1 \end{array}\right)\left(\begin{array}{cc} 1 & 15 \\ 1 & 20 \\ 1 & 5 \\ 1 & 16 \\ 1 & 1 \end{array}\right) \\ & =\left(\begin{array}{ll} a_{11} & a_{12} \\ a_{21} & a_{22} \end{array}\right) . \end{array} \end{split}\]

We have

\[\begin{split} \begin{array}{ll} a_{11} & =(1)(1)+(1)(1)+(1)(1)+(1)(1)+(1)(1) \\ & =1+1+1+1+1 \\ & =5, \\ \\ a_{12} & =(1)(15)+(1)(20)+(1)(5)+(1)(16)+(1)(1) \\ & =15+20+5+16+1 \\ & =57, \\ \\ a_{21} & =(15)(1)+(20)(1)+(5)(1)+(16)(1)+(1)(1) \\ & =15+20+5+16+1 \\ & =57, \\ \\ a_{22} & =(15)(15)+(20)(20)+(5)(5)+(16)(16)+(1)(1) \\ & =225+400+25+256+1 \\ & =907 \end{array} \end{split}\]

This means that

\[\begin{split} X^{T} X=\left(\begin{array}{cc} 5 & 57 \\ 57 & 907 \end{array}\right) \end{split}\]

4(c)

Note that

\[\begin{split} \begin{array}{ll} \left(X^{T} X\right)^{-1} X^{T} y & =\left(\begin{array}{cc} \frac{4,535}{6,430} & \frac{-57}{1,286} \\ \frac{-57}{1,286} & \frac{5}{1,286} \end{array}\right)\left(\begin{array}{c} 31 \\ 294 \end{array}\right) \\ & =\left(\begin{array}{l} \left(\frac{4,435}{6,430}\right)(31)+\left(\frac{-57}{1,286}\right)(294) \\ \left(\frac{-57}{1,286}\right)(31)+\left(\frac{5}{1,286}\right)(294) \end{array}\right) \\ & =\left(\left(\begin{array}{c} \left.\frac{907}{1,286}\right)(31)+\left(\frac{-57}{1,286}\right)(294) \\ \left(\frac{-57}{1,286}\right)(31)+\left(\frac{5}{1,286}\right)(294) \end{array}\right)\right. \\ & =\left(\begin{array}{c} \frac{28,117}{1,286}-\frac{16,758}{1,286} \\ \frac{-1,767}{1,286}+\frac{1,470}{1,286} \end{array}\right) \\ & =\left(\begin{array}{c} \frac{11,359}{1,286} \\ \frac{-297}{1,286} \end{array}\right) . \end{array} \end{split}\]

4(d)

Note that

\[\begin{split} \begin{array}{ll} P & =X\left(X^{T} X\right)^{-1} X^{T} \\ & =X\left[\left(X^{T} X\right)^{-1} X^{T}\right] . \end{array} \end{split}\]

We have

\[\begin{split} \begin{array}{ll} & \left(X^{T} X\right)^{-1} X^{T}=\left(\begin{array}{cc} \frac{4,535}{6,430} & \frac{-57}{1,286} \\ \frac{-57}{1,286} & \frac{5}{1,286} \end{array}\right)\left(\begin{array}{cc} 1 & 15 \\ 1 & 20 \\ 1 & 5 \\ 1 & 16 \\ 1 & 1 \end{array}\right)^{T} \\ & =\left(\begin{array}{ll} \frac{4,535}{6,430} & \frac{-57}{1,286} \\ \frac{-57}{1,286} & \frac{5}{1,286} \end{array}\right)\left(\begin{array}{ccccc} 1 & 1 & 1 & 1 & 1 \\ 15 & 20 & 5 & 16 & 1 \end{array}\right) \\ & =\left(\begin{array}{lllll} b_{11} & b_{12} & b_{13} & b_{14} & b_{15} \\ b_{21} & b_{22} & b_{23} & b_{24} & b_{25} \end{array}\right) . \end{array} \end{split}\]

The elements of this matrix are

\[\begin{split} \begin{array}{ll} b_{11} & =\left(\frac{4,535}{6,430}\right)(1)+\left(\frac{-57}{1,286}\right) (15)\\ & =\frac{907}{1,286}-\frac{855}{1,286} \\ & =\frac{52}{1,286}, \\ \\ b_{12} & =\left(\frac{4,535}{6,430}\right)(1)+\left(\frac{-57}{1,286}\right) (20)\\ & =\frac{907}{1,286}-\frac{1,140}{1,286} \\ & =\frac{-233}{1,286}, \\ \\ b_{13} & =\left(\frac{4,535}{6,430}\right)(1)+\left(\frac{-57}{1,286}\right) (5)\\ & =\frac{907}{1,286}-\frac{285}{1,286} \\ & =\frac{622}{1,286},\\ \\ b_{14}&=\left(\frac{4,535}{6,430}\right)(1)+\left(\frac{-57}{1,286}\right)(16) \\ & =\frac{907}{1,286}-\frac{912}{1,286} \\ & =\frac{-5}{1,286}, \\ \\ b_{15}&=\left(\frac{4,535}{6,430}\right)(1)+\left(\frac{-57}{1,286}\right)(1) \\ & =\frac{907}{1,286}-\frac{57}{1,286} \\ & =\frac{850}{1,286} \\ \\ b_{21}&=\left(\frac{-57}{1,286}\right)(1)+\left(\frac{5}{1,286}\right)(15) \\ & =\frac{-57}{1,286}+\frac{75}{1,286} \\ & =\frac{18}{1,286}, \\ \\ b_{22}&=\left(\frac{-57}{1,286}\right)(1)+\left(\frac{5}{1,286}\right)(20) \\ & =\frac{-57}{1,286}+\frac{100}{1,286} \\ & =\frac{43}{1,286}, \\ \\ b_{23}&=\left(\frac{-57}{1,286}\right)(1)+\left(\frac{5}{1,286}\right)(5) \\ & =\frac{-57}{1,286}+\frac{25}{1,286} \\ & =\frac{-32}{1,286}, \\ \\ b_{24}&=\left(\frac{-57}{1,286}\right)(1)+\left(\frac{5}{1,286}\right)(16) \\ & =\frac{-57}{1,286}+\frac{80}{1,286} \\ & =\frac{23}{1,286}, \\ \\ b_{25} & =\left(\frac{-57}{1,286}\right)(1)+\left(\frac{5}{1,286}\right)(1)\\ & =\frac{-57}{1,286}+\frac{5}{1,286} \\ & =\frac{-52}{1,286} . \end{array} \end{split}\]

This means that

\[\begin{split} \left(X^{T} X\right)^{-1} X^{T}=\left(\begin{array}{lllll} \frac{52}{1,286} & \frac{-233}{1,286} & \frac{622}{1,286} & \frac{-5}{1,286} & \frac{850}{1,286} \\ \frac{18}{1,286} & \frac{43}{1,286} & \frac{-32}{1,286} & \frac{23}{1,286} & \frac{-52}{1,286} \end{array}\right) \end{split}\]

Thus we have

\[\begin{split} \begin{array}{ll} P & =X\left(X^{T} X\right)^{-1} X^{T} \\ & =X\left[\left(X^{T} X\right)^{-1} X^{T}\right] \\ & =\left(\begin{array}{cc} 1 & 15 \\ 1 & 20 \\ 1 & 5 \\ 1 & 16 \\ 1 & 1 \end{array}\right)\left(\begin{array}{ccccc} \frac{52}{1,286} & \frac{-233}{1,286} & \frac{622}{1,286} & \frac{-5}{1,286} & \frac{850}{1,286} \\ \frac{18}{1,286} & \frac{43}{1,286} & \frac{-32}{1,286} & \frac{23}{1,286} & \frac{-52}{1,286} \end{array}\right) \\ & =\left(\begin{array}{ccccc} c_{11} & c_{12} & c_{13} & c_{14} & c_{15} \\ c_{21} & c_{22} & c_{23} & c_{24} & c_{25} \\ c_{31} & c_{32} & c_{33} & c_{34} & c_{35} \\ c_{41} & c_{42} & c_{43} & c_{44} & c_{45} \\ c_{51} & c_{52} & c_{53} & c_{54} & c_{55} \end{array}\right) . \end{array} \end{split}\]

The elements of this matrix are

\[\begin{split} \begin{array}{ll} c_{11} & =(1)\left(\frac{52}{1,286}\right)+(15)\left(\frac{18}{1,286}\right) \\ & =\frac{52}{1,286}+\frac{270}{1,286} \\ & =\frac{322}{1,286}, \\ c_{12} & =(1)\left(\frac{-233}{1,286}\right)+(15)\left(\frac{43}{1,286}\right) \\ & =\frac{-233}{1,286}+\frac{645}{1,286} \\ & =\frac{412}{1,286}, \\ \\ c_{13} &=(1)\left(\frac{622}{1,286}\right)+(15)\left(\frac{-32}{1,286}\right) \\ & =\frac{622}{1,286}-\frac{480}{1,286} \\ & =\frac{142}{1,286}, \\ \\ c_{14}&=(1)\left(\frac{-5}{1,286}\right)+(15)\left(\frac{23}{1,286}\right) \\ & =\frac{-5}{1,286}+\frac{345}{1,286} \\ & =\frac{340}{1,286}, \\ \\ c_{15}&=(1)\left(\frac{850}{1,286}\right)+(15)\left(\frac{-52}{1,286}\right) \\ & =\frac{850}{1,286}-\frac{780}{1,286} \\ & =\frac{70}{1,286}, \\ \\ c_{21}&=(1)\left(\frac{52}{1,286}\right)+(20)\left(\frac{18}{1,286}\right) \\ & =\frac{52}{1,286}+\frac{360}{1,286} \\ & =\frac{412}{1,286}, \\ \\ c_{22}&=(1)\left(\frac{-233}{1,286}\right)+(20)\left(\frac{43}{1,286}\right) \\ & =\frac{-233}{1,286}+\frac{860}{1,286} \\ & =\frac{627}{1,286}, \\ \\ c_{23}&=(1)\left(\frac{622}{1,286}\right)+(20)\left(\frac{-32}{1,286}\right) \\ & =\frac{622}{1,286}-\frac{640}{1,286} \\ & =\frac{-18}{1,286}, \\ \\ c_{24}&=(1)\left(\frac{-5}{1,286}\right)+(20)\left(\frac{23}{1,286}\right) \\ & =\frac{-5}{1,286}+\frac{460}{1,286} \\ & =\frac{455}{1,286}, \\ \\ c_{25}&=(1)\left(\frac{850}{1,286}\right)+(20)\left(\frac{-52}{1,286}\right) \\ & =\frac{850}{1,286}-\frac{1,040}{1,286} \\ & =\frac{-190}{1,286}, \\ \\ c_{31}&=(1)\left(\frac{52}{1,286}\right)+(5)\left(\frac{18}{1,286}\right) \\ & =\frac{52}{1,286}+\frac{90}{1,286} \\ & =\frac{142}{1,286}, \\ \\ c_{32}&=(1)\left(\frac{-233}{1,286}\right)+(5)\left(\frac{43}{1,286}\right) \\ & =\frac{-233}{1,286}+\frac{215}{1,286} \\ & =\frac{-18}{1,286} \\ \\ c_{33}&=(1)\left(\frac{622}{1,286}\right)+(5)\left(\frac{-32}{1,286}\right) \\ & =\frac{622}{1,286}-\frac{160}{1,286} \\ & =\frac{462}{1,286}, \\ \\ c_{34}&=(1)\left(\frac{-5}{1,286}\right)+(5)\left(\frac{23}{1,286}\right) \\ & =\frac{-5}{1,286}+\frac{115}{1,286} \\ & =\frac{110}{1,286}, \\ \\ c_{35}&=(1)\left(\frac{850}{1,286}\right)+(5)\left(\frac{-52}{1,286}\right) \\ &=\frac{850}{1,286}-\frac{260}{1,286} \\ &=\frac{590}{1,286}, \\ \\ c_{41} &=(1)\left(\frac{52}{1,286}\right)+(16)\left(\frac{18}{1,286}\right) \\ &=\frac{52}{1,286}+\frac{288}{1,286} \\ &=\frac{340}{1,286}, \\ \\ c_{42} &=(1)\left(\frac{-233}{1,286}\right) + (16)\left(\frac{43}{1,286}\right) \\ &=\frac{-233}{1,286}+\frac{688}{1,286} \\ &=\frac{455}{1,286}, \\ \\ c_{43} &= (1)\left(\frac{622}{1,286} \right) + (16)\left(\frac{-32}{1,286}\right) \\ &= \frac{622}{1,286}-\frac{512}{1,286} \\ &= \frac{110}{1,286}, \\ \\ c_{44} &= (1) \left(\frac{-5}{1,286}\right) + (16) \left(\frac{25}{1,286}\right) \\ &= \frac{-5}{1,286} + \frac{368}{1,286} \\ &=\frac{363}{1,286}, \\ \\ c_{45} &=(1)\left(\frac{850}{1,286}\right)+(16)\left(\frac{-52}{1,286}\right) \\ &= \frac{850}{1,286} - \frac{832}{1,286} \\ &= \frac{18}{1,286}, \\ \\ c_{51} & =(1)\left(\frac{52}{1,286}\right)+(1)\left(\frac{18}{1,286}\right) \\ & =\frac{52}{1,286}+\frac{18}{1,286} \\ & =\frac{70}{1,286}, \\ \\ c_{52} & =(1)\left(\frac{-233}{1,286}\right)+(1)\left(\frac{43}{1,286}\right) \\ & =\frac{-233}{1,286}+\frac{43}{1,286} \\ & =\frac{-190}{1,286}, \\ \\ c_{53} & =(1)\left(\frac{622}{1,286}\right)+(1)\left(\frac{-32}{1,286}\right) \\ & =\frac{622}{1,286}-\frac{32}{1,286} \\ & =\frac{590}{1,286}, \\ \\ c_{54} & =(1)\left(\frac{-5}{1,286}\right)+(1)\left(\frac{23}{1,286}\right) \\ & =\frac{-5}{1,286}+\frac{23}{1,286} \\ & =\frac{18}{1,286}, \\ \\ c_{55} & =(1)\left(\frac{850}{1,286}\right)+(1)\left(\frac{-52}{1,286}\right) \\ & =\frac{850}{1,286}-\frac{52}{1,286} \\ & =\frac{798}{1,286} . \end{array} \end{split}\]

As such, the hat matrix is given by

\[\begin{split} P=\left(\begin{array}{ccccc} \frac{322}{1,286} & \frac{412}{1,286} & \frac{142}{1,286} & \frac{340}{1,286} & \frac{70}{1,286} \\ \frac{412}{1,286} & \frac{627}{1,286} & \frac{-18}{1,286} & \frac{455}{1,286} & \frac{-190}{1,286} \\ \frac{142}{1,286} & \frac{-18}{1,286} & \frac{462}{1,286} & \frac{110}{1,286} & \frac{590}{1,286} \\ \frac{340}{1,286} & \frac{455}{1,286} & \frac{110}{1,286} & \frac{363}{1,286} & \frac{18}{1,286} \\ \frac{70}{1,286} & \frac{-190}{1,286} & \frac{590}{1,286} & \frac{18}{1,286} & \frac{798}{1,286} \end{array}\right) . \end{split}\]

4(e)

Note that

\[\begin{split} \begin{aligned} P^{T} & =\left(\begin{array}{ccccc} \frac{322}{1,286} & \frac{412}{1,286} & \frac{142}{1,286} & \frac{340}{1,286} & \frac{70}{1,286} \\ \frac{412}{1,286} & \frac{627}{1,286} & \frac{-18}{1,286} & \frac{455}{1,286} & \frac{-190}{1,286} \\ \frac{142}{1,286} & \frac{-18}{1,286} & \frac{462}{1,286} & \frac{110}{1,286} & \frac{590}{1,286} \\ \frac{340}{1,286} & \frac{455}{1,286} & \frac{110}{1,286} & \frac{363}{1,286} & \frac{18}{1,286} \\ \frac{70}{1,286} & \frac{-190}{1,286} & \frac{590}{1,286} & \frac{18}{1,286} & \frac{798}{1,286} \end{array}\right)^{T} \\ & =\left(\begin{array}{ccccc} \frac{322}{1,286} & \frac{412}{1,286} & \frac{142}{1,286} & \frac{340}{1,286} & \frac{70}{1,286} \\ \frac{412}{1,286} & \frac{627}{1,286} & \frac{-18}{1,286} & \frac{455}{1,286} & \frac{-190}{1,286} \\ \frac{142}{1,286} & \frac{-18}{1,286} & \frac{462}{1,286} & \frac{110}{1,286} & \frac{590}{1,286} \\ \frac{340}{1,286} & \frac{455}{1,286} & \frac{110}{1,286} & \frac{363}{1,286} & \frac{18}{1,286} \\ \frac{70}{1,286} & \frac{-190}{1,286} & \frac{590}{1,286} & \frac{18}{1,286} & \frac{798}{1,286} \end{array}\right) \\ & =P . \end{aligned} \end{split}\]

Thus we can conclude that the hat matrix is symmetric.

4(f)

Note that

\[\begin{split} \begin{array}{ll} PP &= \left(\begin{array}{ccccc} \frac{322}{1,286} & \frac{412}{1,286} & \frac{142}{1,286} & \frac{340}{1,286} & \frac{70}{1,286} \\ \frac{412}{1,286} & \frac{627}{1,286} & \frac{-18}{1,286} & \frac{455}{1,286} & \frac{-190}{1,286} \\ \frac{142}{1,286} & \frac{-18}{1,286} & \frac{462}{1,286} & \frac{110}{1,286} & \frac{590}{1,286} \\ \frac{340}{1,286} & \frac{455}{1,286} & \frac{110}{1,286} & \frac{363}{1,286} & \frac{18}{1,286} \\ \frac{70}{1,286} & \frac{-190}{1,286} & \frac{590}{1,286} & \frac{18}{1,286} & \frac{798}{1,286} \end{array}\right) \left(\begin{array}{ccccc} \frac{322}{1,286} & \frac{412}{1,286} & \frac{142}{1,286} & \frac{340}{1,286} & \frac{70}{1,286} \\ \frac{412}{1,286} & \frac{627}{1,286} & \frac{-18}{1,286} & \frac{455}{1,286} & \frac{-190}{1,286} \\ \frac{142}{1,286} & \frac{-18}{1,286} & \frac{462}{1,286} & \frac{110}{1,286} & \frac{590}{1,286} \\ \frac{340}{1,286} & \frac{455}{1,286} & \frac{110}{1,286} & \frac{363}{1,286} & \frac{18}{1,286} \\ \frac{70}{1,286} & \frac{-190}{1,286} & \frac{590}{1,286} & \frac{18}{1,286} & \frac{798}{1,286} \end{array}\right) \\ & =\left[\left(\frac{1}{1,286}\right)\left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right)\right] \bullet {\left[\left(\frac{1}{1,286}\right)\left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right)\right]} \\ & =\left(\frac{1}{1,286}\right)^{2}\left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right) \bullet \left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right) \\ & =\left(\frac{1}{1,653,796}\right)\left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right) \bullet \left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right) . \end{array} \end{split}\]

We have

\[\begin{split} \begin{array}{ll} & \left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right)\left(\begin{array}{cccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right) \\ & = \left(\begin{array}{lllll} d_{11} & d_{12} & d_{13} & d_{14} & d_{15} \\ d_{21} & d_{22} & d_{23} & d_{24} & d_{25} \\ d_{31} & d_{32} & d_{33} & d_{34} & d_{35} \\ d_{41} & d_{42} & d_{43} & d_{44} & d_{45} \\ d_{51} & d_{52} & d_{53} & d_{54} & d_{55} \end{array}\right), \end{array} \end{split}\]

where

\[\begin{split} \begin{array}{ll} d_{11} & =(322)(322)+(412)(412)+(142)(142)+(340)(340)+(70)(70) \\ & =103,684+169,744+20,164+115,600+4,900 \\ & =414,092 \\ \\ d_{12} & =(322)(412)+(412)(627)+(142)(-18)+(340)(455)+(70)(-190) \\ & =132,664+258,324-2,556+154,700-13,300 \\ & =529,832, \\ \\ d_{13} & =(322)(142)+(412)(-18)+(142)(462)+(340)(110)+(70)(590) \\ & =45,724-7,416+65,604+37,400+41,300 \\ & =182,612, \\ \\ d_{14} & =(322)(340)+(412)(455)+(142)(110)+(340)(363)+(70)(18) \\ & =109,480+187,460+15,620+123,420+1,260 \\ & =437,240, \\ \\ d_{15} & =(322)(70)+(412)(-190)+(142)(590)+(340)(18)+(70)(798) \\ & =22,540-78,280+83,780+6,120+55,860 \\ & =90,020, \\ \\ d_{21} & =(412)(322)+(627)(412)+(-18)(142)+(455)(340)+(-190)(70) \\ & =132,664+258,324-2,556+154,700-13,300 \\ & =529,832, \\ \\ d_{22} &= (412)(412)+(627)(627)+(-18)(-18)+(455)(455)+(-190)(-190) \\ & =169,744+393,129+324+207,025+36,100 \\ & =806,322 \\ \\ d_{23} &=(412)(142)+(627)(-18)+(-18)(462)+(455)(110)+(-190)(590) \\ & =58,504-11,286-8,316+50,050-112,100 \\ & =-23,148, \\ \\ d_{24}&=(412)(340)+(627)(455)+(-18)(110)+(455)(363)+(-190)(18) \\ & =140,080+285,285-1,980+165,165-3,420 \\ & =585,130 \\ \\ d_{25}&=(412)(70)+(627)(-190)+(-18)(590)+(455)(18)+(-190)(798) \\ & =28,840-119,130-10,620+8,190-151,620 \\ & =-244,340, \\ \\ d_{31}&=(142)(322)+(-18)(412)+(462)(142)+(110)(340)+(590)(70) \\ & =45,724-7,416+65,604+37,400+41,300 \\ & =182,612, \\ \\ d_{32}&=(142)(412)+(-18)(627)+(462)(-18)+(110)(455)+(590)(-190) \\ & =58,504-11,286-8,316+50,050-112,100 \\ & =-23,148, \\ \\ d_{33}&=(142)(142)+(-18)(-18)+(462)(462)+(110)(110)+(590)(590) \\ & =20,164+324+213,444+12,100+348,100 \\ & =594,132, \\ \\ d_{34}&=(142)(340)+(-18)(455)+(462)(110)+(110)(363)+(590)(18) \\ & =48,280-8,190+50,820+39,930+10,620 \\ & =141,460, \\ \\ d_{35}&=(142)(70)+(-18)(-190)+(462)(590)+(110)(18)+(590)(798) \\ & =9,940+3,420+272,580+1,980+470,820 \\ & =758,740, \\ \\ d_{41} &=(340)(322)+(455)(412)+(110)(142)+(363)(340)+(18)(70) \\ & =109,480+187,460+15,620+123,420+1,260 \\ & =437,240 \\ \\ d_{42}&=(340)(412)+(455)(627)+(110)(-18)+(363)(455)+(18)(-190) \\ & =140,080+285,285-1,980+165,165-3,420 \\ & =585,130, \\ \\ d_{43}&=(340)(142)+(455)(-18)+(110)(462)+(363)(110)+(18)(590) \\ & =48,280-8,190+50,820+39,930+10,620 \\ & =141,460, \\ \\ d_{44}&=(340)(340)+(455)(455)+(110)(110)+(363)(363)+(18)(18) \\ & =115,600+207,025+12,100+131,769+324 \\ & =466,818 \\ \\ d_{45}&=(340)(70)+(455)(-190)+(110)(590)+(363)(18)+(18)(798) \\ & =23,800-86,450+64,900+6,534+14,364 \\ & =23,148 \\ \\ d_{51}&=(70)(322)+(-190)(412)+(590)(142)+(18)(340)+(798)(70) \\ & =22,540-78,280+83,780+6,120+55,860 \\ & =90,020 \\ \\ d_{52}&=(70)(412)+(-190)(627)+(590)(-18)+(18)(455)+(798)(-190) \\ & =28,840-119,130-10,620+8,190-151,620 \\ & =-244,340, \\ \\ d_{53}&=(70)(142)+(-190)(-18)+(590)(462)+(18)(110)+(798)(590) \\ & =9,940+3,420+272,580+1,980+470,820 \\ & =758,740, \\ \\ d_{54}&=(70)(340)+(-190)(455)+(590)(110)+(18)(363)+(798)(18) \\ & =23,800-86,450+64,900+6,534+14,364 \\ & =23,148, \\ \\ d_{55} & =(70)(70)+(-190)(-190)+(590)(590)+(18)(18)+(798)(798) \\ & =4,900+36,100+348,100+324+636,804 \\ & =1,026,228 . \end{array} \end{split}\]

This means that

\[\begin{split} \begin{array}{ll} & \left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 118 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right)\left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & -190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 118 \\ 70 & -190 & 590 & 18 & 798 \end{array}\right) \\ = & \left(\begin{array}{ccccc} 414,092 & 529,832 & 182,612 & 437,240 & 90,020 \\ 529,832 & 806,322 & -23,148 & 585,130 & -244,340 \\ 182,612 & -23,148 & 594,132 & 141,460 & 758,740 \\ 437,240 & 585,130 & 141,460 & 466,818 & 23,148 \\ 90,020 & -244,340 & 758,740 & 23,148 & 1,026,228 \end{array}\right) . \end{array} \end{split}\]

As such, we know that

\[\begin{split} \begin{array}{ll} & P P=\left(\frac{1}{1,653,796}\right)\left(\begin{array}{ccccc} 414,092 & 529,832 & 182,612 & 437,240 & 90,020 \\ 529,832 & 806,322 & -23,148 & 585,130 & -244,340 \\ 182,612 & -23,148 & 594,132 & 141,460 & 758,740 \\ 437,240 & 585,130 & 141,460 & 466,818 & 23,148 \\ 90,020 & -244,340 & 759,010 & 758,740 & 1,026,228 \end{array}\right) \\ & =\left(\frac{1}{1,286}\right)^{2}\left(\begin{array}{ccccc} 414,092 & 529,832 & 182,612 & 437,240 & 90,020 \\ 529,832 & 806,322 & -23,148 & 585,130 & -244,340 \\ 182,612 & -23,148 & 594,132 & 141,460 & 758,740 \\ 437,240 & 585,130 & 141,460 & 466,818 & 23,148 \\ 90,020 & -244,340 & 758,740 & 23,148 & 1,026,228 \end{array}\right) \\ & =\left(\frac{1}{1,286}\right)\left(\begin{array}{ccccc} 322 & 412 & 142 & 340 & 70 \\ 412 & 627 & -18 & 455 & 190 \\ 142 & -18 & 462 & 110 & 590 \\ 340 & 455 & 110 & 363 & 18 \\ 70 & 190 & 590 & 18 & 798 \end{array}\right) \\ & =\left(\begin{array}{lllll} \frac{322}{1,286} & \frac{412}{1,286} & \frac{142}{1,286} & \frac{340}{1,286} & \frac{70}{1,286} \\ \frac{412}{1,286} & \frac{627}{1,286} & \frac{-18}{1,286} & \frac{455}{1,286} & \frac{-190}{1,286} \\ \frac{142}{1,286} & \frac{-18}{1,286} & \frac{462}{1,286} & \frac{110}{1,286} & \frac{590}{1,286} \\ \frac{340}{1,286} & \frac{455}{1,286} & \frac{110}{1,286} & \frac{363}{1,286} & \frac{18}{1,286} \\ \frac{70}{1,286} & \frac{-190}{1,286} & \frac{590}{1,286} & \frac{18}{1,286} & \frac{798}{1,286} \end{array}\right) \\ & =P \text {. } \end{array} \end{split}\]

Thus we can conclude that the hat matrix is idempotent.

4(g)

The residual-making matrix is given by

\[\begin{split} \begin{array}{ll} M&=I-P \\ & =\left(\begin{array}{ccccc} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{array}\right)-\left(\begin{array}{ccccc} \frac{322}{1,286} & \frac{412}{1,286} & \frac{142}{1,286} & \frac{340}{1,286} & \frac{70}{1,286} \\ \frac{412}{1286} & \frac{627}{1,286} & \frac{-18}{1,286} & \frac{455}{1,286} & \frac{-190}{1,286} \\ \frac{1442}{1,286} & \frac{-18}{1,286} & \frac{462}{1,286} & \frac{110}{1,286} & \frac{590}{1,286} \\ \frac{340}{1,286} & \frac{455}{1,286} & \frac{110}{1,286} & \frac{363}{1,286} & \frac{18}{1,286} \\ \frac{70}{1,286} & \frac{-190}{1,286} & \frac{590}{1,286} & \frac{188}{1,286} & \frac{798}{1,286} \end{array}\right) \\ & =\left(\begin{array}{ccccc} \frac{1,286}{1,286} & 0 & 0 & 0 & 0 \\ 0 & \frac{1,286}{1,286} & 0 & 0 & 0 \\ 0 & 0 & \frac{1,286}{1,286} & 0 & 0 \\ 0 & 0 & 0 & \frac{1,286}{1,286} & 0 \\ 0 & 0 & 0 & 0 & \frac{1,286}{1,286} \end{array}\right)-\left(\begin{array}{cccccc} \frac{322}{1,286} & \frac{412}{1,286} & \frac{142}{1,286} & \frac{340}{1,286} & \frac{70}{1,286} \\ \frac{412}{1,286} & \frac{627}{1,286} & \frac{128}{1,286} & \frac{455}{1,286} & \frac{1190}{1,286} \\ \frac{142}{1,286} & \frac{-18}{1,286} & \frac{462}{1,286} & \frac{110}{1,286} & \frac{550}{1,286} \\ \frac{340}{1,286} & \frac{455}{1,286} & \frac{110}{1,286} & \frac{363}{1,286} & \frac{18}{1,286} \\ \frac{70}{1,286} & \frac{-190}{1,286} & \frac{590}{1,286} & \frac{18}{1,286} & \frac{798}{1,286} \end{array}\right) \\ & =\left(\begin{array}{ccccc} \frac{1,286}{1,286}-\frac{322}{1,286} & 0-\frac{412}{1,286} & 0-\frac{142}{1,1286} & 0-\frac{340}{1,286} & 0-\frac{70}{1,286} \\ 0-\frac{412}{1,286} & \frac{1,286}{1,286}-\frac{627}{1,286} & 0-\left(\frac{-18}{1,286}\right) & 0-\frac{455}{1,286} & 0-\left(\frac{-190}{1,286}\right) \\ 0-\frac{142}{1,286} & 0-\left(\frac{-18}{1,286}\right) & \frac{1,286}{1,286}-\frac{462}{1,286} & 0-\frac{110}{1,286} & 0-\frac{590}{1,286} \\ 0-\frac{340}{1,286} & 0-\frac{455}{1,286} & 0-\frac{110}{1,286} & \frac{1,286}{1,286}-\frac{363}{1,286} & 0-\frac{18}{1,286} \\ 0-\frac{70}{1,286} & 0-\left(\frac{-190}{1,286}\right) & 0-\frac{590}{1,286} & 0-\frac{18}{1,286} & \frac{1,286}{1,286}-\frac{798}{1,286} \end{array}\right) \\ & =\left(\begin{array}{ccccc} \frac{964}{1,286} & \frac{-412}{1,286} & \frac{-142}{1,286} & \frac{-340}{1,286} & \frac{-70}{1,286} \\ \frac{1-4212}{1,286} & \frac{659}{1,286} & \frac{18}{1,286} & \frac{-455}{1,286} & \frac{190}{1,286} \\ \frac{142}{1,286} & \frac{18}{1,286} & \frac{324}{1,286} & \frac{-110}{1,286} & \frac{-590}{1,286} \\ \frac{-340}{1,286} & \frac{-455}{1,286} & \frac{-110}{1,286} & \frac{923}{1,286} & \frac{-18}{1,286} \\ \frac{-70}{1,286} & \frac{190}{1,286} & \frac{-590}{1,286} & \frac{-18}{1,286} & \frac{488}{1,286} \end{array}\right) . \end{array} \end{split}\]

4(h)

Note that

\[\begin{split} \begin{array}{ll} M^{T} & =\left(\begin{array}{ccccc} \frac{964}{1,286} & \frac{-412}{1,286} & \frac{-142}{1,286} & \frac{-340}{1,286} & \frac{-70}{1,286} \\ \frac{-412}{1,286} & \frac{659}{1,286} & \frac{18}{1,286} & \frac{-455}{1,286} & \frac{190}{1,286} \\ \frac{-142}{1,286} & \frac{18}{1,286} & \frac{824}{1,286} & \frac{-110}{1,286} & \frac{-590}{1,286} \\ \frac{-340}{1,286} & \frac{-455}{1,286} & \frac{-110}{1,286} & \frac{993}{1,286} & \frac{-18}{1,286} \\ \frac{-70}{1,286} & \frac{190}{1,286} & \frac{-590}{1,286} & \frac{-18}{1,286} & \frac{488}{1,286} \end{array}\right)^{T} \\ & =\left(\begin{array}{llllll} \frac{964}{1,286} & \frac{-412}{1,286} & \frac{-142}{1,286} & \frac{-340}{1,286} & \frac{-70}{1,286} \\ \frac{-412}{1,286} & \frac{659}{1,286} & \frac{18}{1,286} & \frac{-455}{1,286} & \frac{190}{1,286} \\ \frac{-142}{1,286} & \frac{18}{1,286} & \frac{824}{1,286} & \frac{-110}{1,286} & \frac{-590}{1,286} \\ \frac{-340}{1,286} & \frac{-455}{1,286} & \frac{-110}{1,286} & \frac{993}{1,286} & \frac{-18}{1,286} \\ \frac{-70}{1,286} & \frac{190}{1,286} & \frac{-590}{1,286} & \frac{-18}{1,286} & \frac{488}{1,286} \end{array}\right) \\ & =M . \end{array} \end{split}\]

Thus we can conclude that the residual making matrix is symmetric.

4(i)

This is left as an exercise. While it is tedious, the practice that you will gain in matrix multiplication by completing this exercise might be useful. You should find that \(M M=M\), so that the residual-making matrix is indeed idempotent.

\(\zeta\).5#

Compute the following determinants

(a) \(\mathrm{det} \left( \begin{array}{cc} 5,& 1 \\ 0,& 1 \end{array} \right)\)

(b) \(\mathrm{det} \left( \begin{array}{cc} 2,& 1 \\ 1,& 2 \end{array} \right)\)

(c) \(\mathrm{det} \left( \begin{array}{ccc} 1,& 5,& 8 \\ 0,& 2,& 1 \\ 0,& -1,& 2 \end{array} \right)\)

(d) \(\mathrm{det} \left( \begin{array}{ccc} 1,& 0,& 3 \\ 1,& 1,& 0 \\ 0,& 0,& 8 \end{array} \right)\)

(e) \(\mathrm{det} \left( \begin{array}{cccc} 1,& 5,& 8,& 17 \\ 0,& -2,& 13,& 0 \\ 0,& 0,& 1,& 2 \\ 0,& 0,& 0,& 2 \end{array} \right)\)

(f) \(\mathrm{det} \left( \begin{array}{cccc} 2,& 1,& 0,& 0 \\ 1,& 2,& 0,& 0 \\ 0,& 0,& 2,& 0 \\ 0,& 0,& 0,& 2 \end{array} \right)\)

Solution for the selected problems

(a) By definition of a \((2 \times 2)\) determinant, we have

\[\begin{split} \mathrm{det} \left( \begin{array}{cc} 5,& 1 \\ 0,& 1 \end{array} \right) = 5\cdot 1 - 0\cdot 1 = 5 \end{split}\]

(d) By recursive definition of a \((3 \times 3)\) determinant, using the last raw for the recursive expansion (it has most zeros!), we have

\[\begin{split} \det \left( \begin{array}{ccc} 1,& 0,& 3 \\ 1,& 1,& 0 \\ 0,& 0,& 8 \end{array} \right) = 8 (-1)^{3+3} \det \left( \begin{array}{cc} 1,& 0 \\ 1,& 1 \\ \end{array} \right) = 8 (1-0) = 8 \end{split}\]

(f) By recursive definition of a \((4 \times 4)\) determinant, using the last raw twice for the recursive expansion (it has most zeros!), we have

\[\begin{split}\det \left( \begin{array}{cccc} 2,& 1,& 0,& 0 \\ 1,& 2,& 0,& 0 \\ 0,& 0,& 2,& 0 \\ 0,& 0,& 0,& 2 \end{array} \right) = 2 \cdot 2 \cdot \det \left( \begin{array}{cc} 2,& 1 \\ 1,& 2 \\ \end{array} \right) = 4 (4-1) = 12 \end{split}\]