Math 310: Hour Exam 2 (Solutions) Prof. S. Smith: Fri 8 Apr 2005

You must SHOW WORK to receive credit.

WHEREVER you use a calculator, write “used calculator”.

Problem 1:

(a) Give the matrix (with respect to the STANDARD basis) for the linear transformation L : R^{2} → R^{2} defined by L((x_{1}, x_{2})^{T} ) = (2x_{1} − x_{2}, x_{1} + 3x_{2})^{T},

Apply L to the standard basis: L((1, 0)^{T} ) = (2, 1)^{T}; L((0, 1)^{T} ) = (−1, 3)^{T}.

These are coordinates in the standard basis, so put in columns, to get ( \begin{matrix}2 & −1 \\ 1 & 3 \end{matrix} ).

(b) Now give the matrix for the same linear transformation L as in part (a), but with respect to the basis (1, 2)^{T}, (1, 3)^{T}.

Shortcut method: for A the matrix of (a) with change-of-basis matrix S = ( \begin{matrix}1 & 1 \\ 2 & 3 \end{matrix} ),

compute S^{−1}AS = ( \begin{matrix}3 & −1 \\ −2 & 1 \end{matrix} ) ( \begin{matrix}2 & −1 \\ 1 & 3 \end{matrix} ) ( \begin{matrix}1 & 1 \\ 2 & 3 \end{matrix} ) = ( \begin{matrix}−7 & −13 \\ 7 & 12 \end{matrix} )

(Or, can compute “directly” as in (a)—but getting coordinates in NEW basis...)

Problem 2:

(a) Show that the transpose gives a linear transformation on the matrix space R^{2×2} (that is, the function L given by L(A) = A^{T} for a matrix A).

(addition) L(A + B) = (A + B)^{T} = A^{T} + B^{T} while L(A) + L(B) = A^{T} + B^{T}, so equal.

(sc.mult.) L(cA) = (cA)^{T} = cA^{T} while cL(A) = cA^{T}, so equal.

(Or: can write out 2 × 2 matrices in full, and SHOW the transposing...)

(b) For the subspace S of R^{3} given by the span of the vectors (1, 1, 2)^{T} and (1, 2, 4)^{T}, find the orthogonal complement S^{⊥}.

Write vectors as rows of A, and compute nullspace of A:

( \begin{matrix}1 & 1 & 2 \\ 1 & 2 & 4 \end{matrix} ) has rref ( \begin{matrix}1 & 0 & 0 \\ 0 & 1 & 2 \end{matrix} ), so solutions are the span of (0, −2, 1)^{T}.

Problem 3:

(a) For the inconsistent system Ax = b with augmented matrix: ( \begin{matrix}1 & 2 & 3 \\ 2 & 4 & 2 \\ −1 & −2 & 1 \end{matrix} ), find all

“least squares solutions” x̂; the projection p of b in the column space of A; and the residual (error). Multiply A^{T} by the augmented matrix [A|b] to get normal equations

( \begin{matrix}1 & 2 & −1 \\ 2 & 4 & −2 \end{matrix} ) ( \begin{matrix}1 & 2 & 3 \\ 2 & 4 & 2 \\ −1 & −2 & 1 \end{matrix} ) = ( \begin{matrix}6 & 12 & 6 \\ 12 & 24 & 12 \end{matrix} ). Compute rref: ( \begin{matrix}1 & 2 & 1 \\ 0 & 0 & 0 \end{matrix} ).

Thus x̂ = (1 − 2α, α)^{T}, so p = Ax̂ = ( \begin{matrix}1 & 2 \\ 2 & 4 \\ −1 & −2 \end{matrix} ) ( \begin{matrix}1 − 2α \\ α \end{matrix} ) = (1, 2, −1)^{T};

with residual vector b − p = (3, 2, 1)^{T} − (1, 2, −1)^{T} = (2, 0, 2)^{T} (of size \sqrt{8}).

(b) In the space of differentiable functions on [0, 1], with inner product ⟨f, g⟩ = ∫_{0}^{1} f(x)g(x) dx, find the vector projection of x on the constant function 1.

Projection formula is \frac{⟨x,1⟩}{⟨1,1⟩}1. So compute ⟨x, 1⟩ = ∫_{0}^{1} x · 1 dx = [\frac{x^{2}}{2} ]_{0}^{1} = \frac{1}{2} and ⟨1, 1⟩ = ∫_{0}^{1} 1 · 1 dx = [x]_{0}^{1} = 1, to get \frac{1}{2} times the constant function 1.

Problem 4:

(a) With the standard dot product on R^{2}, find the coordinates of the vector (2, 1)^{T} in the orthonormal basis given by (\frac{3}{5}, \frac{4}{5})^{T}, (−\frac{4}{5}, \frac{3}{5})^{T}.

Just take dot products with the basis, to get coordinates: (2, −1)^{T}.

(b) Give the matrix P for projection into the subspace S of R^{3} spanned by (2, 2, 1)^{T} and (−2, 1, 2)^{T}. We need UU^{T} where the columns of U are an orthonormal basis for S. The two vectors are already orthogonal, and have length 3.

So for A given by those columns, U = \frac{1}{3}A, and P = \frac{1}{9}AA^{T} = \frac{1}{9} ( \begin{matrix}8 & 2 & −2 \\ 2 & 5 & 4 \\ −2 & 4 & 5 \end{matrix} )

Problem 5:

(a) Let S be the subspace of R^{3} spanned by v_{1} = (2, 2, 1)^{T} and v_{2} = (2, 1, 0)^{T}. Use the Gram-Schmidt process to find an orthonormal basis for S; and give an orthonormal basis for S^{⊥}.

First get orthogonal: use q_{1} = v_{1} = (2, 2, 1)^{T} and then q_{2} = v_{2} − \frac{v_{2}·q_{1}}{q_{1}·q_{1}} q_{1} = (2, 1, 0)^{T} − \frac{6}{9}(2, 2, 1)^{T} = \frac{1}{3}(2, −1, −2)^{T}. To make orthoNORMAL, divide by lengths to get u_{1} = \frac{1}{3}(2, 2, 1)^{T} and u_{2} = \frac{1}{3}(2, −1, −2)^{T}. For S^{⊥}, it suffices to work with integer vectors;

convert columns to rows ( \begin{matrix}2 & 2 & 1 \\ 2 & −1 & −2 \end{matrix} ) and compute rref as ( \begin{matrix}1 & 0 & −\frac{1}{2} \\ 0 & 1 & 1 \end{matrix} );

so S^{⊥} is the span of (\frac{1}{2}, −1, 1)^{T}; divide by length to get orthonormal basis \frac{1}{3}(1, −2, 2)^{T}.

(b) Give the QR-factorization of the matrix A = ( \begin{matrix}1 & 1 \\ 2 & 3 \end{matrix} ).

Apply Gram-Schmidt as in (a) to the columns of A to get Q = \frac{1}{\sqrt{5}} ( \begin{matrix}1 & −2 \\ 2 & 1 \end{matrix} )

and can obtain R as Q^{T} A = \frac{1}{\sqrt{5}} ( \begin{matrix}1 & 2 \\ −2 & 1 \end{matrix} ) ( \begin{matrix}1 & 1 \\ 2 & 3 \end{matrix} ) = \frac{1}{\sqrt{5}} ( \begin{matrix}5 & 7 \\ 0 & 1 \end{matrix} ).