Math 310: Hour Exam 2 (Solutions) Prof. S. Smith: Mon 1 Nov 1993 Problem 1: Let W be the subspace of R^{3} spanned by the vectors ( 1 1 1 ) and ( 1 2 3 ). Find the orthogonal space W^{⊥}, and the matrix P of projection onto W^{⊥}.

( \begin{matrix}1 & 1 & 1 \\ 1 & 2 & 3 \end{matrix} ) →^{A_{2}^{−1×1}} ( \begin{matrix}1 & 1 & 1 \\ 0 & 1 & 2 \end{matrix} ) gives special solution a = ( \begin{matrix}1 \\ −2 \\ 1 \end{matrix} ); its span gives W^{⊥}.

So P is a\frac{1}{a^{T} a}a^{T} = ( \begin{matrix}1 \\ −2 \\ 1 \end{matrix} ) \frac{1}{6} ( 1 -2 1 ) = \frac{1}{6} ( \begin{matrix}1 & −2 & 1 \\ −2 & 4 & −2 \\ 1 & −2 & 1 \end{matrix} ).

Problem 2: Solve the least-squares problem for the system ( \begin{matrix}1 & 1 \\ 1 & 2 \\ 1 & 3 \end{matrix} ) ( \begin{matrix}x \\ y \end{matrix} ) = ( \begin{matrix}1 \\ 3 \\ 6 \end{matrix} ) .

Multiply by A^{T} to get normal equations ( \begin{matrix}3 & 6 & 10 \\ 6 & 14 & 25 \end{matrix} ) →^{A_{2}^{−2×1}} ( \begin{matrix}3 & 6 & 10 \\ 0 & 2 & 5 \end{matrix} ). Back-solve to get y = \frac{5}{2} and then x = −\frac{5}{3}; that is, ( \begin{matrix}x \\ y \end{matrix} ) = \frac{1}{6} ( \begin{matrix}−10 \\ 15 \end{matrix} ).

Multiply by A to get \frac{1}{6} ( \begin{matrix}5 \\ 20 \\ 35 \end{matrix} ) as approximation to original ( \begin{matrix}1 \\ 3 \\ 6 \end{matrix} ) .

Problem 3: Apply the Gram-Schmidt process to the columns of ( \begin{matrix}1 & 1 & 1 \\ −1 & 0 & 1 \\ 0 & −1 & 1 \end{matrix} ). Use the result to find the QR-factorization.

Call the columns a, b, c; begin by setting A = a.

Then B = b − proj_{A}(b) = b − A\frac{1}{A^{T} A}(A^{T} b) = b − A · \frac{1}{2} · 1 = \frac{1}{2} ( \begin{matrix}1 \\ 1 \\ −2 \end{matrix} ).

Now note that c was orthogonal to a, b; hence to “adjusted” A, B. So C = c − proj_{A}(c) − proj_{B}(c) gives just c since projections are 0.

Divide A, B, C by lengths to get columns of orthogonal matrix Q = ( \begin{matrix}\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} \\ −\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} \\ 0 & −\frac{2}{\sqrt{6}} & \frac{1}{\sqrt{3}} \end{matrix} ).

Transpose columns and multiply by a, b, c above diagonal to get R = ( \begin{matrix}\sqrt{2} & \frac{1}{\sqrt{2}} & 0 \\ 0 & \frac{3}{\sqrt{6}} & 0 \\ 0 & 0 & \sqrt{3} \end{matrix} ).

Problem 4: Compute the determinant |A| for A = ( \begin{matrix}1 & 0 & 1 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{matrix} ); first using row operations, then by the cofactor method.

(row ops) →^{A_{2}^{−1×1}} ( \begin{matrix}1 & 0 & 1 \\ 0 & 1 & −1 \\ 0 & 1 & 1 \end{matrix} ) →^{A_{3}^{−1×2}} ( \begin{matrix}1 & 0 & 1 \\ 0 & 1 & −1 \\ 0 & 0 & 2 \end{matrix} ) so |A| = 1 · 1 · 2 = 2.

(cofactors, top row) |A| = 1(1 · 1 − 1 · 0) − 0 + 1(1 · 1 − 0 · 1) = 1 + 1 = 2. Problem 5: Use Cramer’s rule to solve ( \begin{matrix}2 & 3 \\ 1 & 4 \end{matrix} ) ( \begin{matrix}x \\ y \end{matrix} ) = ( \begin{matrix}1 \\ −2 \end{matrix} ).

|A| = 2 · 4 − 1 · 3 = 5. So x = \frac{1}{5} | \begin{matrix}1 & 3 \\ −2 & 4 \end{matrix} | = 2 And y = \frac{1}{5} | \begin{matrix}2 & 1 \\ 1 & −2 \end{matrix} | = −1 .

Problem M: (Makeup from Exam 1) Show that the set W of symmetric 2x2 matrices (those of form ( \begin{matrix}a & b \\ b & c \end{matrix} )) is a subspace of the space of all 2x2 matrices.

Note that “symmetric” requires the same value (“b”) in the two off-diagonal positions.

Add two such matrices: ( \begin{matrix}a & b \\ b & c \end{matrix} ) + ( \begin{matrix}d & e \\ e & f \end{matrix} ) = ( \begin{matrix}a + d & b + e \\ b + e & c + f \end{matrix} ).

Same value b + e off diagonal, so the sum is also symmetric. Multiply such a matrix by a scalar r: r ( \begin{matrix}a & b \\ b & c \end{matrix} ) = ( \begin{matrix}ra & rb \\ rb & rc \end{matrix} ).

Same value rb off diagonal, so the product is also symmetric. So W is closed under both operations, hence forms a subspace.