4.2-exam2-2014-strang-b¶
Exam II, 2014 (strang) · Section 4.2: Projections onto Lines and Subspaces Source: exam2_2.pdf, pp. 87, 93-94
Problem¶
4. (26 points total)
(a) (6 points) Find the projection \(p\) of the vector \(b\) onto the column space of \(A\).
\[
A = \begin{bmatrix} 1 & 3 \\ 2 & 2 \\ 2 & 1 \end{bmatrix} \quad b = \begin{bmatrix} 1 \\ 4 \\ 1 \end{bmatrix}
\]
(b) (7 points) Use Gram-Schmidt to find an orthogonal basis \(q_1, q_2\) for the column space of \(A\).
(c) (6 points) Find the projection \(p\) of the same vector \(b\) onto the column space of the new matrix \(Q\) with columns \(q_1\) and \(q_2\).
(d) (7 points) True or False: The best least squares solution \(\widehat{x}\) to \(Ax = b\) is the same as the best least squares solution \(\widehat{y}\) to \(Qy = b\). Explain why.
Solution
(a) By the formula, the projection is \(A(A^TA)^{-1}A^Tb\): \[ \begin{bmatrix} 1 & 3 \\ 2 & 2 \\ 2 & 1 \end{bmatrix} \left( \begin{bmatrix} 1 & 2 & 2 \\ 3 & 2 & 1 \end{bmatrix} \begin{bmatrix} 1 & 3 \\ 2 & 2 \\ 2 & 1 \end{bmatrix} \right)^{-1} \begin{bmatrix} 1 & 2 & 2 \\ 3 & 2 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 4 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 & 3 \\ 2 & 2 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} 9 & 9 \\ 9 & 14 \end{bmatrix}^{-1} \begin{bmatrix} 11 \\ 12 \end{bmatrix} \] \[ = \begin{bmatrix} 1 & 3 \\ 2 & 2 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} 14/45 & -1/5 \\ -1/5 & 1/5 \end{bmatrix} \begin{bmatrix} 1 & 2 & 2 \\ 3 & 2 & 1 \end{bmatrix} \begin{bmatrix} 11 \\ 12 \end{bmatrix} = \begin{bmatrix} 73/45 \\ 22/9 \\ 101/45 \end{bmatrix}. \] (b) \(q_1 = (1, 2, 2)\), the first column of \(A\). The projection of \((3, 2, 1)\) onto \((1, 2, 2)\) is \((1, 2, 2)\), with an error vector \(e = (2, 0, -1)\). Thus \(q_2 = (2, 0, -1)\). (c) The columns \(q_1\) and \(q_2\) span the same space as the columns of \(A\). Thus the projection must be the same as before. (d) True. The matrices \(A\) and \(Q\) span the same column space. Denote the projection of \(b\) onto that space as \(p\). The solution \(\widehat{x}\) satisfies the equation \(A\widehat{x} = p\), and the solution \(\widehat{y}\) satisfies the equation \(Q\widehat{y} = p\). Now \(A = QR\), which means \(\widehat{y} = R\widehat{x}\).Keywords: projection, Gram-Schmidt, orthogonal basis, least squares