Math 310: Hour Exam 2 (Solutions) Prof. S. Smith: Fri 17 Nov 2006

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 ( \begin{matrix}x_{1} \\ x_{2} \end{matrix} ) = ( \begin{matrix}−x_{1} + 2x_{2} \\ 3x_{1} − x_{2} \end{matrix} ) .

Apply L to the standard basis: L ( \begin{matrix}1 \\ 0 \end{matrix} ) = ( \begin{matrix}−1 \\ 3 \end{matrix} ) and L ( \begin{matrix}0 \\ 1 \end{matrix} ) = ( \begin{matrix}2 \\ −1 \end{matrix} ),

to get the columns of the matrix for the transformation ( \begin{matrix}−1 & 2 \\ 3 & −1 \end{matrix} ).

(b) Now give the matrix for the same linear transformation L as in part (a), but

with respect to the basis ( \begin{matrix}2 \\ 1 \end{matrix} ) , ( \begin{matrix}3 \\ 1 \end{matrix} ) ,

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

compute S^{−1}AS = ( \begin{matrix}−1 & 3 \\ 1 & −2 \end{matrix} ) ( \begin{matrix}−1 & 2 \\ 3 & −1 \end{matrix} ) ( \begin{matrix}2 & 3 \\ 1 & 1 \end{matrix} ) = ( \begin{matrix}15 & 25 \\ −10 & −17 \end{matrix} )

(Or, “directly” as in (a)—columns now from COORDINATES of images in new basis...)

Problem 2:

(a) On the space P_{3} of polynomials of degree at most 2, show that the transformation defined by L(p(x)) = x p′(x) is LINEAR.

(addition) Take general polynomials p(x) and q(x) from P_{3}. Apply L AFTER sum: L(p(x) + q(x)) = x (p(x) + q(x))′ = x p′(x) + x q′(x); now compare L BEFORE sum: L(p(x)) + L(q(x)) = x p′(x) + x q′(x); equal to above, as desired. (scalar multiplication) Take general p(x) ∈ P_{3} and scalar c. Apply L after sc.mult.: L(c p(x)) = x (c p(x))′ = x c p′(x); now compare L before: c L(p(x)) = c x p′(x); equal to above, as desired. (Or: write p(x) in form a_{0} + a_{1}x + a_{2}x^{2}, and q(x) as b_{0} + b_{1}x + b_{2}x^{2}, and apply L as above ...)

(b) For the subspace S of R^{3} given by the span of the vectors ( \begin{matrix}1 \\ 2 \\ 3 \end{matrix} ) and ( \begin{matrix}2 \\ 4 \\ 7 \end{matrix} ),

find the orthogonal complement S^{⊥}.

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

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

Problem 3:

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

all “least squares solutions” x̂; the projection p of b in the column space of A; and the size (length) of the “error” b − p.

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 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 3 \end{matrix} ) = ( \begin{matrix}6 & 8 & 6 \\ 8 & 24 & 0 \end{matrix} ). Compute rref: ( \begin{matrix}1 & 0 & \frac{9}{5} \\ 0 & 1 & −\frac{3}{5} \end{matrix} ).

Thus x̂ = ( −\frac{3}{5}^{\frac{9}{5}} ); so p = Ax̂ = ( \begin{matrix}−1 & −2 \\ 2 & 4 \\ 1 & −2 \end{matrix} ) ( −\frac{3}{5}^{\frac{9}{5}} ) = ( −\frac{3}{5} ; \frac{6}{5} ; 3 );

with error b − p = ( \begin{matrix}1 \\ 2 \\ 3 \end{matrix} ) − ( −\frac{3}{5} ; \frac{6}{5} ; 3 ) = ( \frac{8}{5} \frac{4}{5} 0 ) of length \sqrt{\frac{80}{25}} = \frac{4}{\sqrt{5}}.

(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 function x^{2}.

The vector projection formula gives \frac{⟨x,x^{2}⟩}{⟨x^{2},x^{2}⟩}x^{2}. So compute ⟨x, x^{2}⟩ = ∫_{0}^{1} x · x^{2} dx = ∫_{0}^{1} x^{3} dx = [\frac{x^{4}}{4} ]_{0}^{1} = \frac{1}{4} and ⟨x^{2}, x^{2}⟩ = ∫_{0}^{1} x^{2} · x^{2} dx = ∫_{0}^{1} x^{4} dx = [\frac{x^{5}}{5} ]_{0}^{1} = \frac{1}{5},

to get \frac{\frac{1}{4}}{\frac{1}{5}} = \frac{5}{4} times the function x^{2}; that is, the projection is \frac{5}{4}x^{2}.

Problem 4:

(a) With inner product space given R^{2} and the standard dot product,

find the coordinates of the vector ( \begin{matrix}2 \\ 1 \end{matrix} ) in the orthonormal basis given by ( \frac{1}{\sqrt{2}} ; \frac{1}{\sqrt{2}} ) and ( −\frac{1}{\sqrt{2}}^{\frac{1}{\sqrt{2}}} ).

Just take dot products with the basis, to get coordinates: ( \frac{3}{\sqrt{2}} ; \frac{1}{\sqrt{2}} ).

(b) In the space of differentiable functions on [−1, 1], with inner product ⟨f, g⟩ = ∫_{−1}^{1} f(x)g(x) dx, the functions 1 and x are orthogonal (given!). Find the projection of x^{\frac{1}{3}} on the span of 1 and x.

Since 1 and x are orthogonal, the projection formula is \frac{⟨x^{\frac{1}{3}} ,1⟩}{⟨1,1⟩}1 + \frac{⟨x^{\frac{1}{3}} ,x⟩}{⟨x,x⟩}x . So compute ⟨1, 1⟩ = ∫_{−1}^{1} 1 · 1 dx = ∫_{−1}^{1} 1 dx = [x]_{−1}^{1} = 2; ⟨x, x⟩ = ∫_{−1}^{1} x · x dx = ∫_{−1}^{1} x^{2} dx = [\frac{x^{3}}{3} ]_{−1}^{1} = \frac{2}{3}; ⟨x^{\frac{1}{3}} , 1⟩ = ∫_{−1}^{1} x^{\frac{1}{3}} · 1 dx = ∫_{−1}^{1} x^{\frac{1}{3}} dx = [\frac{3}{4}x^{\frac{4}{3}} ]_{−1}^{1} = 0; ⟨x^{\frac{1}{3}} , x⟩ = ∫_{−1}^{1} x^{\frac{1}{3}} · x dx = ∫_{−1}^{1} x^{\frac{4}{3}} dx = [\frac{3}{7}x^{\frac{7}{3}} ]_{−1}^{1} = \frac{6}{7}.

So the projection is \frac{0}{2}1 + \frac{\frac{6}{7}}{\frac{2}{3}} x = \frac{9}{7}x.

Problem 5:

(a) Apply the Gram-Schmidt process (SHOW steps) to find an orthonormal basis for the column

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

For orthogonal, use q_{1} = v_{1} = ( \begin{matrix}2 \\ 1 \end{matrix} ) and then q_{2} = v_{2}− \frac{v_{2}·q_{1}}{q_{1}·q_{1}} q_{1} = ( \begin{matrix}3 \\ 1 \end{matrix} )− \frac{7}{5} ( \begin{matrix}2 \\ 1 \end{matrix} ) = \frac{1}{5} ( \begin{matrix}1 \\ −2 \end{matrix} ).

To make orthoNORMAL, divide by lengths to get u_{1} = \frac{1}{\sqrt{5}} ( \begin{matrix}2 \\ 1 \end{matrix} ) and u_{2} = \frac{1}{\sqrt{5}} ( \begin{matrix}1 \\ −2 \end{matrix} ).

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

(b) In the space of differentiable functions on [−1, 1], with inner product ⟨f, g⟩ = ∫_{−1}^{1} f(x)g(x) dx, find an orthogonal (but not necessarily orthonormal) basis for the subspace spanned by 1 and x^{2}. (That is, you need not divide by lengths at the end, to get unit vectors).

Here we take q_{1} = v_{1} = 1; and q_{2} = v_{2} − \frac{⟨v_{2},q_{1}⟩}{⟨q_{1},q_{1}⟩}q_{1} = x^{2} − \frac{⟨x^{2},1⟩}{⟨1,1⟩}1.

So we need to compute ⟨x^{2}, 1⟩ = ∫_{−1}^{1} x^{2} · 1 dx = ∫_{−1}^{1} x^{2} dx = [\frac{x^{3}}{3} ]_{−1}^{1} = \frac{2}{3};

we had already computed ⟨1, 1⟩ = 2 in Problem 4b.

So we get q_{2} given by x^{2} − \frac{\frac{2}{3}}{2} 1 = x^{2} − \frac{1}{3}, and this will be orthogonal to 1.

So 1 and x^{2} − \frac{1}{3} are an orthogonal basis for the span of 1 and x^{2}.