Skip to content

4.2-exam2-2013-strang

Quiz 2, 2013 (strang) · Section 4.2: Projections onto Lines and Subspaces Source: exam2_2.pdf, pp. 63, 69

Problem

1 (40 pts.)

(a) If \(P\) projects every vector \(b\) in \(R^5\) to the nearest point in the subspace spanned by \(a_1 = (1, 0, 1, 0, 4)\) and \(a_2 = (2, 0, 0, 0, 4)\), what is the rank of \(P\) and why?

(b) If these two vectors are the columns of the 5 by 2 matrix \(A\), which of the four fundamental subspaces for \(A\) is the nullspace of \(P\)?

(c) By Gram-Schmidt find an orthonormal basis for the column space of \(A\) (spanned by \(a_1\) and \(a_2\)).

(d) If \(P\) is any (symmetric) projection matrix, show that \(Q = I - 2P\) is an orthogonal matrix.

Solution (a) The rank of \(P\) is 2. Any vector perpendicular to the subspace spanned by \(a_1\) and \(a_2\) is in the nullspace of \(P\), and the orthogonal complement of the subspace spanned by \(a_1\) and \(a_2\) is 3-dimensional (that is, there are three independent vectors that project to 0 by \(P\)). This is exactly the nullspace of \(P\), and since \[ \mathrm{rank}\,P = \dim C(P) = 5 - \dim \mathrm{Nullspace}\,P, \] the rank of \(P\) is \(5 - 3 = 2\). (b) The nullspace of \(P\) is the left nullspace of \(A\). Indeed, we have \[ Pv = 0 \iff a_1^Tv = 0 \ \text{and} \ a_2^Tv = 0 \iff v^Ta_1 = 0 \ \text{and} \ v^Ta_2 = 0 \iff v^TA = 0. \] (c) Gram-Schmidt gives \[ q_1 = \frac{a_1}{\|a_1\|} = \frac{(1, 0, 1, 0, 4)^T}{\sqrt{1^2 + 0^2 + 1^2 + 0^2 + 4^2}} = \frac{1}{3\sqrt{2}}(1, 0, 1, 0, 4)^T \] and \[ q_2 = \frac{a_2 - \frac{a_2^Tq_1}{q_1^Tq_1}q_1}{\left\|a_2 - \frac{a_2^Tq_1}{q_1^Tq_1}q_1\right\|} = \frac{a_2 - a_2^Tq_1\,q_1}{\|a_2 - a_2^Tq_1\,q_1\|} = \frac{(2, 0, 0, 0, 4)^T - (1, 0, 1, 0, 4)^T}{\|(2, 0, 0, 0, 4)^T - (1, 0, 1, 0, 4)^T\|} = \frac{1}{\sqrt{2}}(1, 0, -1, 0, 0)^T, \] and \(q_1\) and \(q_2\) form an orthonormal basis for the column space of \(A\). (d) Since \(P\) is a projection matrix, we have \(P = P^T\). To show that \(Q\) is an orthogonal matrix, we need to check that \(QQ^T = I\). We have \[ QQ^T = (I - 2P)(I - 2P)^T = (I - 2P)(I^T - 2P^T) = (I - 2P)(I - 2P) \quad (I \ \text{and} \ P \ \text{are symmetric}) \] \[ = I - 4P + 4P^2. \] Since for a projection matrix we have \(P^2 = P\), this product is equal to \(QQ^T = I\), as required.

Keywords: projection matrix, rank, Gram-Schmidt, orthonormal basis, orthogonal matrix