Math 310: Hour Exam 2 (Solutions) Prof. S. Smith: Mon 18 Nov 2002

You must SHOW WORK to receive credit. Wherever you use a calculator, write “used calculator”.

Problem 1:

(a) (review from chapter 3:) Show that the set S of vectors (x_{1}, x_{2})^{T} in R^{2} satisfying the condition x_{1} + 2x_{2} = 0 forms a subspace of R^{2}.

(add) Assume that (x_{1}, x_{2})^{T} and (y_{1}, y_{2})^{T} are in S. This means x_{1} + 2x_{2} = 0 and y_{1} + 2y_{2} = 0. Is the sum of these two vectors, namely (x_{1} + y_{1}, x_{2} + y_{2})^{T}, also in S? Check the condition: (x_{1} + y_{1}) + 2(x_{2} + y_{2}) = (x_{1} + 2x_{2}) + (y_{1} + 2y_{2}) = 0 + 0 = 0, so “yes”. (sc.mult.) Assume that (x_{1}, x_{2})^{T} is in S. This means that x_{1} + 2x_{2} = 0. Is the multiple of this vector by any scalar c, namely c(x_{1}, x_{2})^{T}, also in S? Check the condition: (c x_{1} + 2 c x_{1}) = c(x_{1} + 2x_{2}) = c 0 = 0, so “yes”. (Comment: could also work instead with the form (α, −\frac{α}{2})^{T} of vectors in S).

(b) Show that the function L : R^{2} → R^{2} defined by L((x_{1}, x_{2})^{T}) = (x_{1} + x_{2}, x_{1} + 3x_{2})^{T} is a linear transformation.

(add) L((x_{1}, x_{2})^{T} + (y_{1}, y_{2})^{T}) = L((x_{1} + y_{1}, x_{2} + y_{2})^{T})

= ((x_{1} + y_{1}) + (x_{2} + y_{2}), (x_{1} + y_{1}) + 3(x_{2} + y_{2}))^{T}, while L((x_{1}, x_{2})^{T}) + L((y_{1}, y_{2})^{T}) = (x_{1} + x_{2}, x_{1} + 3x_{2})^{T} + (y_{1} + y_{2}, y_{1} + 3y_{2})^{T}

= ((x_{1} + x_{2}) + (y_{1} + y_{2}), (x_{1} + 3x_{2}) + (y_{1} + 3y_{2}))^{T}, same. (sc.mult.) L(c(x_{1}, x_{2})^{T}) = L((cx_{1}, cx_{2})^{T}) = (cx_{1} + cx_{2}, cx_{1} + 3(cx_{2}))^{T}, while cL((x_{1}, x_{2})^{T}) = c(x_{1} + x_{2}, x_{1} + 3x_{2})^{T} = (c(x_{1} + x_{2}), c(x_{1} + 3x_{2}))^{T}, same.

Problem 2:

(a) Give the matrix A representing (in the standard basis) the linear transformation L : R^{2} → R^{2} defined by L((x_{1}, x_{2})^{T}) = (x_{1} − 3x_{2}, 2x_{1} + 5x_{2})^{T}.

Apply L to standard basis, put into columns, to get A = ( \begin{matrix}1 & −3 \\ 2 & 5 \end{matrix} )

(b) Now give the matrix B for the same L as in part (a), but using the basis (1, 1)^{T} and (1, 2)^{T}. Either compute directly with respect to this “new” basis; or use change-of-basis matrix

from “new” to “old” basis given by S = ( \begin{matrix}1 & 1 \\ 1 & 2 \end{matrix} ), and mutliply out B = S^{−1}AS:

( \begin{matrix}−11 & −22 \\ 9 & 17 \end{matrix} ) = ( \begin{matrix}2 & −1 \\ −1 & 1 \end{matrix} ) ( \begin{matrix}1 & −3 \\ 2 & 5 \end{matrix} ) ( \begin{matrix}1 & 1 \\ 1 & 2 \end{matrix} )

Problem 3:

(a) Find all exact solutions of the system Ax = b given by: ( \begin{matrix}1 & 1 \\ 2 & 1 \\ 1 & 0 \end{matrix} ) ( \begin{matrix}x_{1} \\ x_{2} \end{matrix} ) = ( \begin{matrix}1 \\ 1 \\ 1 \end{matrix} ).

The row-reduced echelon form of the augmented matrix [A|b] is: ( \begin{matrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix} ).

The third row says 0 = 1, so there are no solutions.

(b) For this A and b, find: all “least squares solutions” x̂; the projection p of b in the column space of A; and the residual (that is, error).

Multiply A^{T} by the augmented matrix [A|b] to get normal equations

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

Thus x̂ = (\frac{2}{3}, 0)^{T}; so p = Ax̂ = ( \begin{matrix}1 & 1 \\ 2 & 1 \\ 1 & 0 \end{matrix} ) ( 0^{\frac{2}{3}} ) = \frac{2}{3}(1, 2, 1)^{T};

with residual vector r(x̂) = b − p = (1, 1, 1)^{T} − \frac{2}{3}(1, 2, 1)^{T} = \frac{1}{3}(1, −1, 1) (of size \frac{1}{\sqrt{3}}).

Problem 4:

(a) Find the vector projection of (3, 4)^{T} in the direction of (1, 2)^{T}.

\frac{(3,4)^{T} · (1,2)^{T})}{(1,2)^{T} · (1,2)^{T})}(1, 2)^{T} = \frac{11}{5}(1, 2)^{T}.

(b) Find the subspace orthogonal to the vectors (2, 1, 2)^{T} and (1, 0, −1)^{T}.

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

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

Problem 5:

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

First get orthogonal: use q_{1} = v_{1} = (2, 1, 2)^{T} and then

q_{2} = v_{2} − [(v_{2} · q_{1})/(q_{1} · q_{1})]q_{1} = (1, 1, 1) − [5/9](2, 1, 2) = \frac{1}{9}(−1, 4, −1).

To make orthoNORMAL, divide by lengths to get u_{1} = \frac{1}{3}(2, 1, 2) and u_{2} = \frac{1}{\sqrt{18}}(−1, 4, −1).

(b) Give the QR-factorization of the matrix A with columns given by v_{1} and v_{2} from part (a).

Then Q has columns u_{1} and u_{2} from (a), so ( \begin{matrix}\frac{2}{3} & −\frac{1}{\sqrt{18}} \\ \frac{1}{3} & \frac{4}{\sqrt{18}} \\ \frac{2}{3} & −\frac{1}{\sqrt{18}} \end{matrix} ),

so we can get R as Q^{T} A, namely ( −\frac{1}{\sqrt{18}} \frac{4}{\sqrt{18}} −\frac{1}{\sqrt{18}}^{\frac{2}{3}  \frac{1}{3}  \frac{2}{3}} ) ( \begin{matrix}2 & 1 \\ 1 & 1 \\ 2 & 1 \end{matrix} ) = ( \begin{matrix}3 & \frac{5}{3} \\ 0 & \frac{2}{\sqrt{18}} \end{matrix} ).