01.05.2013 Views

(x, y)=(Sx)T

(x, y)=(Sx)T

(x, y)=(Sx)T

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MA351 EXERCISES FOR SECTION 5.5<br />

Problem 1. Consider a matrix S in R n×n . In R n , define the product<br />

a. For matrices S is this an inner product?<br />

b. For matrices S is (x, y) = x · y?<br />

(x, y) = (<strong>Sx</strong>) T (Sy).<br />

Solution: a. Note that (x, y) = (<strong>Sx</strong>) T (Sy) = <strong>Sx</strong> · Sy. Need to check 4 conditions:<br />

1. (x, y) = <strong>Sx</strong> · Sy = Sy · <strong>Sx</strong> = (y, x)<br />

2. (x + y, z) = S(x + y) · Sz = (<strong>Sx</strong> + Sy) · Sz = <strong>Sx</strong> · Sz + Sy · Sz = (x, z) + (y, z).<br />

3. (cx, y) = S(cx) ˙Sy = c(<strong>Sx</strong>) · Sy = c(<strong>Sx</strong> · Sy) = c(x, y).<br />

4. (x, x) = <strong>Sx</strong> · <strong>Sx</strong> = <strong>Sx</strong> 2 ≥ 0. If (x, x) = 0, then <strong>Sx</strong> = 0, meaning that <strong>Sx</strong> = 0. In order for<br />

(·, ·) define an inner product, it must satify that the only way (x, x) = 0 is when x = 0. Therefore, the<br />

homogenous system <strong>Sx</strong> = 0 must have only the (unique) trivial solution x = 0. Namely, Ker(S) = {0},<br />

which tells us that S must be invertible.<br />

b. Note that (x, y) = (<strong>Sx</strong>) T Sy = x T S T Sy. It is required that x T (S T S)y = (x, y) = x T y for all x, y.<br />

This is the case when S T S = In, that is, S is orthogonal.<br />

Problem 2. In R n×n , consider the inner product<br />

(A, B) = Trace(A T B).<br />

a. Find a formula for this inner product in R n×1 , i.e., when A and B are vectors in R n .<br />

b. Find a formula for this inner product in R 1×n , i.e., when A T and B T are vectors in R n .<br />

Solution: a. Let u, v ∈ R n×1 . (u, v) = Trace(u T v) = Trace(u · v) = u · v.<br />

b. Let u, v ∈ R 1×n . (u, v) = Trace(u T v) = n<br />

k=1 ukvk = u T · v T = uv T .<br />

Problem 3. a. Consider an n × m matrix P and an m × n matrix Q. Show that<br />

Trace(PQ) = Trace(QP).<br />

b. Compare the following two inner product in R n×n ,<br />

(A, B) = Trace(A T B), ((A, B)) = Trace(AB T ).<br />

Solution: a. The jjth entry of PQ is m k=1 pjkqkj, so that Trace(PQ) = n m j=1 k=1 pjkqkj. Likewise<br />

Trace(QP) = m n j=1 k=1 qjkqkj. Reversing the role of j and k and the order of summation we see that<br />

Trace(PQ) = Trace(QP).<br />

b. Using part a. and the fact that Trace(M) = Trace(MT ) for any square matrix M, we find that<br />

(A, B) = Trace(A T B) = Trace(BA T ) = Trace((BA T ) T ) = Trace(AB T ) = ((A, B)).<br />

1


2 MA 351 EXERCISES FOR SECTION 5.5 11/28/2011 YOLCU<br />

Problem 4.<br />

a. Consider the space P2 of polynomials of degree less than or equal to 2 with inner product<br />

〈f, g〉 =<br />

1<br />

0<br />

f(t)g(t) dt.<br />

Find a basis of the space W of all functions in P2 that are orthogonal to f(t) = t. What is the dimension<br />

of W?<br />

b. Consider the space P2 of polynomials of degree less than or equal to 2 with inner product<br />

(f, g) = 1<br />

2<br />

1<br />

−1<br />

f(t)g(t) dt.<br />

Find an orthonormal basis of the space of all functions in P2 that are orthogonal to f(t) = t.<br />

Solution: a. This one is similar to what is in b.<br />

b. A function g(t) = a + bt + ct2 is orthogonal to f(t) = t if<br />

0 = (f, g) = 1<br />

2<br />

1<br />

−1<br />

t(a + bt + ct 2 ) dt = 2<br />

3 b.<br />

meaning that b = 0. Thus, g(t) = a + ct2 belongs to span{1, t2 } = W. That is, 1 and t2 form a basis<br />

of the space W of all functions in P2 orthogonal to f(t) = t. To find an orthonormal basis {g1(t), g2(t)}<br />

we apply Gram-Schmidt. Now,<br />

1 2 = (1, 1) = 1<br />

1<br />

1 dt = 1<br />

2 −1<br />

so we can take g1(t) = 1 as 1 = 1. Also,<br />

g2(t) = t2 − (1, t2 )1<br />

t2 − (1, t2 )1 = t2 − 1<br />

3<br />

t2 − 1<br />

√<br />

5<br />

=<br />

3 2 (3t2 − 1).<br />

√<br />

5<br />

Therefore, {g1(t), g2(t)} = {1, 2 (3t2 − 1)} is an orthonormal basis for W. Moreover dim(W) = 2.<br />

Problem 5. Which of the following is is an inner product in P2? Explain.<br />

a. (f, g) = f(1)g(1) + f(2)g(2)<br />

b. ((f, g)) = f(1)g(1) + f(2)g(2) + f(3)g(3)<br />

Solution: a. (f, g) is not an inner pruduct in P2 because f(t) = (t − 1)(t − 2) implies (f, f) = 0 but<br />

f = 0.<br />

b. ((f, g)) is an inner product, and easy to check the four axioms. Note that ((f, f)) = f(1) 2 +<br />

f(2) 2 + f(3) 2 = 0 when f(t) = 0 in P2, because any polynomial in P2 has at most 2 zeros. That is, if f<br />

were nonzero polynomial, then at least one of f(1), f(2) and f(3) would be nonzero and ((f, f)) would<br />

be strictly positive.


MA 351 EXERCISES FOR SECTION 5.5 11/28/2011 YOLCU 3<br />

Problem 6. For which values of the constants b, c and d is the following an inner product in R2 ?<br />

<br />

x1 y1<br />

, = x1y1 + bx1y2 + cx2y1 + dx2y2<br />

x2<br />

y2<br />

Solution: Using the four axioms, one can obtain b = c and d > b 2 . Work out the details!<br />

Problem 7. a. Find an orthonormal basis of the P1 with the inner product<br />

(f, g) =<br />

1<br />

0<br />

f(t)g(t) dt.<br />

b. Find the linear polynomial g(t) = at + b that best approximates the function f(t) = t 2 on the<br />

interval [0, 1] in the least-squares sense. Draw a sketch.<br />

Solution: a. We start with the standard basis {1, t} and use the Gram-Schmidt process to construct an<br />

orthonormal basis {g1(t), g2(t)}. Note that<br />

so that we can let g1(t) = 1. Then<br />

g2(t) =<br />

1 2 = (1, 1) =<br />

t − (t, 1)1<br />

t − (t, 1)1<br />

1<br />

0<br />

1 dt = 1<br />

= t − 1<br />

2<br />

t − 1<br />

2 = √ 3(2t − 1).<br />

Therefore, {g1(t), g2(t)} = {1, √ 3(2t − 1)} is an orthonormal basis of P1.<br />

b. We are looking for<br />

Note that<br />

Therefore,<br />

(t 2 , g1(t)) =<br />

projP1 (t2 ) = (t 2 , g1(t))g1(t) + (t 2 , g2(t))g2(t).<br />

1<br />

0<br />

t 2 dt = 1<br />

3 , (t2 , g2(t)) =<br />

projP1 (t2 ) = 1<br />

3 +<br />

√ 3<br />

6<br />

1<br />

0<br />

t 2√ 3(2t − 1) dt =<br />

√ 3(2t − 1) = t − 1<br />

6 .<br />

√ 3<br />

6 .


4 MA 351 EXERCISES FOR SECTION 5.5 11/28/2011 YOLCU<br />

Problem 8. Consider the inner product<br />

(u, v) = u T<br />

<br />

1 2<br />

v, u, v ∈ R<br />

2 8<br />

2 .<br />

a. Find all vectors in R2 <br />

1<br />

that are perpendicular to with respect to the inner product defined<br />

0<br />

above.<br />

b. Find an orthonormal basis of R2 with respect to this inner product.<br />

c. Is the following inequality true? Explain why.<br />

(u1v1 + 2u1v2 + 2u2v1 + 8u2v2) 2 <br />

≤ (u1 + 2u2) 2 + 4u 2 <br />

2 (v1 + 2v2) 2 + 4v 2 <br />

2 .<br />

<br />

<br />

x1 1<br />

−2<br />

Solution: a. , = x1 + 2x2 = 0 when x1 = 2x2. This is the line spanned by vector .<br />

x2 0<br />

1<br />

<br />

1 −2<br />

b. From part a. we noticed that and are orthogonal, we merely have to normalize them.<br />

0 1<br />

Note that<br />

<br />

<br />

<br />

1 <br />

0<br />

2<br />

= 1 0 1 2<br />

2 8<br />

<br />

1<br />

= 1,<br />

0<br />

<br />

<br />

<br />

−2 2<br />

=<br />

1<br />

−2 1 <br />

1 2 −2<br />

= 4.<br />

2 8 1<br />

<br />

1 −1<br />

Thus, , is an orthonormal basis for R<br />

0 1/2<br />

2 with respect to the inner product defined above.<br />

c. From (tu + v, tu + v) = tu + v2 ≥ 0 for all t, we see that t2 (u, u) + 2t(u, v) + (v, v) ≥ 0<br />

holds true for all t. Recall that the discriminant b2 − 4ac ≤ 0 when at2 + bt + c ≥ 0. Therefore, we<br />

get |(u, v)| 2 ≤ (u, u)(v, v). It remains to verify that the inequality claimed in part c is as the same as<br />

|(u, v)| 2 ≤ (u, u)(v, v). Therefore, the answer is YES.<br />

Problem 9. In the space P1 of the polynomials of degree ≤ 1, we define the inner product<br />

(f, g) = 1<br />

(f(0)g(0) + f(1)g(1)) .<br />

2<br />

Find an orthonormal basis for this inner product space.<br />

Solution: We start with the standard basis {1, t} of P1 and use the Gram-Schmidt process to construct<br />

and orthonormal basis {g1(t), g2(t)}. Note that<br />

so that we can let g1(t) = 1. Then<br />

1 2 = (1, 1) = 1<br />

(1 · 1 + 1 · 1) = 1,<br />

2<br />

g2(t) =<br />

t − (t, 1)1<br />

t − (t, 1)1<br />

= t − 1<br />

2<br />

t − 1<br />

2<br />

= 2t − 1.<br />

Summary: The functions g1(t) = 1 and g2(t) = 2t − 1 form an orthonormal basis for P1.


MA 351 EXERCISES FOR SECTION 5.5 11/28/2011 YOLCU 5<br />

Problem 10. Consider the linear space of all polynomials with inner product<br />

(f, g) =<br />

1<br />

0<br />

f(t)g(t) dt.<br />

For three polynomials f, g, and h we are given the following inner products:<br />

(f, f) = 4, (f, g) = 0, (f, h) = 8, (g, g) = 1, (g, h) = 3, (h, h) = 50.<br />

a. Compute (f, g + h).<br />

b. Find g + h.<br />

c. Find projW(h), where W = span{f, g}, interms of f and g.<br />

d. Find an orthonormal basis of span{f, g, h} in terms of f, g and h.<br />

Solution: a. (f, g + h) = (f, g) + (f, h) = 8.<br />

b. g + h2 = (g + h, g + h) = (g, g) + 2(g, h) + (h, h) = 57 imples g + h = √ 57.<br />

c. Note that (f, g) = 0, g = 1 and f = 2. Therefore, { 1<br />

2f, g} is an orthonormal basis for W.<br />

Thus,<br />

<br />

projW(h) = h, f<br />

<br />

f<br />

+ (h, g)g = 2f + 3g.<br />

2 2<br />

d. We already know that {g1 = 1<br />

2f, g2 = g} is an orthonormal basis for W. To find an orthonormal<br />

basis of span{f, g, h} in terms of f, g and h we need to obtain the third polynomial:<br />

g3 =<br />

h − projW(h) h − 2f − 3g<br />

=<br />

h − projW(h) 5<br />

Thus, an orthonormal basis of span{f, g, h} is<br />

{g1, g2, g3} =<br />

1<br />

2<br />

f, g, −2<br />

5<br />

= − 2<br />

5<br />

3 1<br />

f − g +<br />

5 5 h<br />

<br />

.<br />

3 1<br />

f − g +<br />

5 5 h.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!