vector spaces calculus

24
0.1. VECTOR SPACES 1 0.1 Vector Spaces Exercise 0.1.1 Show that the following functions x,1+ x, x + sin 2 x, x 3 - x, and x + cos 2 x defined on R are linearly dependent. Solution: x + (1 + x) - (x + sin 2 x) - (x + cos 2 x)=1 - (sin 2 x + cos 2 x)=1 - 1=0. Exercise 0.1.2 Compute the dimension of the vector subspace V = span{(-1, 2, 3, 0), (5, 4, 3, 0), (3, 1, 0, 0)} of R 4 . Solution: -1 2 3 0 5 4 3 0 3 1 0 0 5R 1 +R 2 ----→ 3R 2 +R 3 -1 2 3 0 0 14 18 0 0 7 9 0 R 3 R 2 -----→ -2R 3 +R 2 -1 2 3 0 0 7 9 0 0 0 0 0 . So dim(V ) = 2. Exercise 0.1.3 Find a basis for the row space of A and find the dimension of the row space of A, where A = 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 -1 0 1 0 1 0 0 0 1 1 . Solution: A -R 1 +R 2 ;-R 1 +R 3 ----------→ R 1 +R 4 1 0 1 0 0 0 1 -1 1 0 0 0 0 1 1 0 0 2 0 1 0 0 0 1 1 R 3 R 4 -----→ -R 3 +R 5 1 0 1 0 0 0 1 -1 1 0 0 0 2 0 1 0 0 0 1 1 0 0 0 0 0 . The basis is {(1, 0, 1, 0, 0), (0, 1, -1, 1, 0), (0, 0, 2, 0, 1), (0, 0, 0, 1, 1)}. The dimen- sion is 4. Exercise 0.1.4 Extend {1+ x 2 ,x - x 3 } to a basis for the space of polynomials of degree 3.

Upload: ascdasdc

Post on 24-Dec-2015

250 views

Category:

Documents


0 download

DESCRIPTION

Vector space calculus

TRANSCRIPT

0.1. VECTOR SPACES 1

0.1 Vector Spaces

Exercise 0.1.1 Show that the following functions x, 1 + x, x+ sin2 x, x3− x,and x+ cos2 x defined on R are linearly dependent.

Solution:

x+ (1 + x)− (x+ sin2 x)− (x+ cos2 x) = 1− (sin2 x+ cos2 x) = 1− 1 = 0. 2

Exercise 0.1.2 Compute the dimension of the vector subspace

V = span{(−1, 2, 3, 0), (5, 4, 3, 0), (3, 1, 0, 0)}

of R4.

Solution:

−1 2 3 05 4 3 03 1 0 0

5R1+R2−−−−→3R2+R3

−1 2 3 00 14 18 00 7 9 0

R3↔R2−−−−−→−2R3+R2

−1 2 3 00 7 9 00 0 0 0

.

So dim(V ) = 2. 2

Exercise 0.1.3 Find a basis for the row space of A and find the dimension of

the row space of A, where A =

1 0 1 0 01 1 0 1 01 0 1 1 1−1 0 1 0 1

0 0 0 1 1

.

Solution: A−R1+R2;−R1+R3−−−−−−−−−−→

R1+R4

1 0 1 0 00 1 −1 1 00 0 0 1 10 0 2 0 10 0 0 1 1

R3↔R4−−−−−→−R3+R5

1 0 1 0 00 1 −1 1 00 0 2 0 10 0 0 1 10 0 0 0 0

.

The basis is {(1, 0, 1, 0, 0), (0, 1,−1, 1, 0), (0, 0, 2, 0, 1), (0, 0, 0, 1, 1)}. The dimen-sion is 4. 2

Exercise 0.1.4 Extend {1+x2, x−x3} to a basis for the space of polynomialsof degree ≤ 3.

2

Solution: Let v1 = 1 + x2, v2 = x − x3, v3 = 1, v4 = x, v5 = x2, and v6 = x3.Consider the matrix [[v1][v2][v3][v4][v5][v6]]:

1 0 1 0 0 00 1 0 1 0 01 0 0 0 1 00 −1 0 0 0 1

R2+R4−−−−−→−R1+R3

1 0 1 0 0 00 1 0 1 0 00 0 −1 0 1 00 0 0 1 0 1

.

We see that the basis is {1 + x2, x− x3, 1, x}. 2

Exercise 0.1.5 Find coordinates (the coordinate matrix [u]C) of u = x −x2 + x3 with respect to the basis C = {w1, w2, w3} of the vector space W =span{w1, w2, w3}, where w1 = x+ x2, w2 = x− x2, and w3 = x+ x2 + 2x3.

Solution:

u = x− x2 + x3 = w2 + x3 = w2 +1

2(w3 − w1) = −1

2· w1 + 1 · w2 +

1

2· w3

and

[u]C =

−1/21

1/2

. 2

Exercise 0.1.6 Let w ∈ W be such that [w]C =

120

, where C is the basis

for W defined in 0.1.5. Find the polynomial w.

Solution:

w = 1 · w1 + 2 · w2 + 0 · w3 = (x+ x2) + 2(x− x2) = 3x− x2. 2

Exercise 0.1.7 Compute the transition matrix P = PB→C from the basisB = {x, x2, x3} for W to the basis C = {w1, w2, w3} for W defined in 0.1.5.

1-st Solution:

2x = w1 + w2 ⇒ [x]C =

1212

0

;

0.1. VECTOR SPACES 3

2x2 = w1 − w2 ⇒ [x2]C =

12

−12

0

;

2x3 = w3 − w1 ⇒ [x3]C =

−12

012

.Hence

P =

12

12−1

212−1

20

0 0 12

.2-nd Solution: [w1 w2 w3 | x x2 x3] =

=

1 1 11 −1 10 0 2

∣∣∣∣∣∣1 0 00 1 00 0 1

12R3−−−−−→

−R1+R2

1 1 10 −2 00 0 1

∣∣∣∣∣∣1 0 0−1 1 0

0 0 1/2

− 12R2−−−→

1 1 10 1 00 0 1

∣∣∣∣∣∣1 0 0

1/2 −1/2 00 0 1/2

−R2−R3+R1−−−−−−−→

1 1 10 1 00 0 1

∣∣∣∣∣∣1/2 1/2 −1/21/2 −1/2 0

0 0 1/2

= [I|P ]. 2

Exercise 0.1.8 Let A =

[1 1 11 −1 −1

].

a) Find a basis for the solution space of AX = 0.

b) Find a basis for R3 that contains the basis constructed in part (a).

Solution: a) X =

x1

x2

x3

∈ R3×1, AX = 0.

[1 1 11 −1 −1

]→[

1 1 10 −2 −2

], so x3 is free. Find the fundamental solution.

Set x3 = 1 then x2 = −1, x1 = 0. So X1 =

0−1

1

.

4

b) Consider the matrix [X1 e1 e2 e3]: 0 1 0 0−1 0 1 0

1 0 0 1

→ 0 1 0 0−1 0 1 0

0 0 1 1

→ −1 0 1 0

0 1 0 00 0 1 1

Hence the basis R3×1 is {X1, e1, e2} =

0−1

1

, 1

00

, 0

10

. 2

Exercise 0.1.9 Let {t, u, v, w} be a basis for a vector space V . Find dim(U),where U = span{t+ 2u+ v+w, t+ 3u+ v+ 2w, 3t+ 4u+ 2v, 3t+ 5u+ 2v+w}.

Solution: Let v1 = t + 2u + v + w, v2 = t + 3u + v + 2w, v3 = 3t + 4u + 2v,v4 = 3t+ 5u+ 2v + w. Consider the coordinate matrix [v1 v2 v3 v4]:

1 1 3 32 3 4 51 1 2 21 2 0 1

1 1 3 30 1 −2 −10 0 −1 −10 1 −3 2

1 1 3 30 1 −2 −10 0 −1 −10 0 −1 −1

1 1 3 30 1 −2 −10 0 −1 −10 0 0 0

.Thus {v1, v2, v3} = {t+ 2u+ v +w, t+ 3u+ v + 2w, 3t+ 4u+ 2v} is a basis forU . It has 3 vectors. Hence dim(U) = 3. 2

Exercise 0.1.10

a) Show that C = {(1, 1, 0), (1,−1, 0), (0, 0, 1)} is a basis for R3.

b) Let B = {(1, 0, 0), (0, 1, 0), (0, 0, 1)}. Find the change of coordinate matrices(that is transition matrices) from C to B, and from B to C.

Solution: a) The determinant

∣∣∣∣∣∣1 1 01 −1 00 0 1

∣∣∣∣∣∣ = −2 6= 0. It means that the rows

are linearly independent, so C is linearly independent in R3, consequently C is

0.1. VECTOR SPACES 5

a basis for R3 since dim(R3) = 3 and R3 ⊇ span(C), where C has 3 vectors andfinally dim(〈C〉) = 3.

b) Set u1 = (1, 1, 0), u2 = (1,−1, 0), u3 = (0, 0, 1). Then C = {u1, u2, u3}.

PC→B = [[u1]B [u2]B [u3]B] =

1 1 01 −1 00 0 1

.PB→C = P−1

C→B.

[PC→B|I] =

1 1 01 −1 00 0 1

∣∣∣∣∣∣1 0 00 1 00 0 1

→ 1 1 0

0 −2 00 0 1

∣∣∣∣∣∣1 0 0−1 1 0

0 0 1

→→

1 1 00 1 00 0 1

∣∣∣∣∣∣1 0 0

1/2 −1/2 00 0 1

1 0 00 1 00 0 1

∣∣∣∣∣∣1/2 1/2 01/2 −1/2 0

0 0 1

= [I|PB→C] . 2

Exercise 0.1.11 Let the set {u, v, w} be linearly independent. Show that theset {u+ 2v, v − 3w, u− v + w} is linearly independent.

Solution: Denote B = {u, v, w} is a basis for span(B). Then we can write

[u+ 2v]B =

120

, [v − 3w]B =

01−3

, [u− v + w]B =

1−1

1

.Since

det

1 0 12 1 −10 −3 1

= 1 ·∣∣∣∣ 1 −1−3 1

∣∣∣∣+ 1 ·∣∣∣∣ 2 1

0 −3

∣∣∣∣ = −2− 6 6= 0.

So the set {u+ 2v, v − 3w, u− v + w} is linearly independent. 2

6

Exercise 0.1.12 Find the value(s) of α if

[α 20 6− α

]is contained in the

space

span

{[−1 α

0 1

],

[α −10 α2 − α− 1

],

[α + 1 −3

0 α2 − 4

]}.

Solution:[α 20 6− α

]= x ·

[−1 α

0 1

]+ y ·

[α −10 α2 − α− 1

]+ z ·

[α + 1 −3

0 α2 − 4

].

Thus the following system must be consistent:−x + αy + (α + 1)z = ααx − y − 3z = 2x + (α2 − α− 1)y + (α2 − 4)z = 6− α −1 α α + 1α −1 −31 α2 − α− 1 α2 − 4

∣∣∣∣∣∣α2

6− α

αR1+R2−−−−−→R1+R3

−1 α α + 10 α2 − 1 α2 + α− 30 α2 − 1 α2 + α− 3

∣∣∣∣∣∣α

2 + α2

6

−R2+R3−−−−−→

−1 α α + 10 α2 − 1 α2 + α− 30 0 0

∣∣∣∣∣∣α

2 + α2

4− α2

.Hence 4− α2 = 0 or α = ±2. 2

Exercise 0.1.13 Given the matrix

2 1 −1 1 00 1 0 0 11 1 1 −1 0

. Show that the

dimension of the column space of this matrix is equal to 3. Justify your answer.

Solution: 2 1 −1 1 00 1 0 0 11 1 1 −1 0

R1↔R3−−−−→R2↔R3

1 1 1 −1 02 1 −1 1 00 1 0 0 1

−2R1+R2−−−−−→

0.1. VECTOR SPACES 7

1 1 1 −1 00 −1 −3 3 00 1 0 0 1

R2+R3−−−−→

1 1 1 −1 00 −1 −3 3 00 0 −3 3 1

.Hence

2

01

, 1

11

, −1

01

is a basis for the column space. Therefore its

dimension is equal to 3. 2

Exercise 0.1.14 Find the value(s) of α ∈ R such that dim(span(A)) = 2,where A = {1 + 2x2 +x4, 2 +x+ 4x2 +x3 + 5x4, 1 +x+ 2x2 +x3 +αx4}. Justifyyour answer.

Solution: Put the coefficients in 3× 5 matrix 1 0 2 0 12 1 4 1 51 1 2 1 α

−2R1+R2−−−−−→−R1+R3

1 0 2 0 10 1 0 1 30 1 0 1 α− 1

−R2+R3−−−−−→

1 0 2 0 10 1 0 1 30 0 0 0 α− 4

.The dimension dim(span(A)) is the same with the dimension of column or rowspace of the matrix. To make it equal to 2 one must have α− 4 = 0 or α = 4. 2

Exercise 0.1.15 Given two bases B = {u+v, u−v, w} and C = {u+w, v, v−w} for the vector space spanned by {u, v, w}.a) Find the transition matrix PB→C from B to C.

b) Find the transition matrix PC→B from C to B.

Solution: a)

[u+ v]C = [(u+ w) + (v − w)]C =

101

.[u− v]C = [(u+ w) + (v − w)− 2v]C =

1−2

1

.[w]C = [v − (v − w)]C =

01−1

.

8

Hence PB→C =

1 1 00 −2 11 1 −1

.

b) PC→B = (PB→C)−1. Write [PB→C |I] =

=

1 1 00 −2 11 1 −1

∣∣∣∣∣∣1 0 00 1 00 0 1

−R1+R3−−−−−→

1 1 00 −2 10 0 −1

∣∣∣∣∣∣1 0 00 1 0−1 0 1

R3+R2−−−−→

1 1 00 −2 00 0 −1

∣∣∣∣∣∣1 0 0−1 1 1−1 0 1

−R3−−−→− 1

2R2

1 1 00 1 00 0 1

∣∣∣∣∣∣1 0 0

1/2 −1/2 −1/21 0 −1

→−R2+R1−−−−−→

1 0 00 1 00 0 1

∣∣∣∣∣∣1/2 1/2 1/21/2 −1/2 −1/2

1 0 −1

=[I| (PB→C)−1] .

Hence

PC→B =1

2

1 1 11 −1 −12 0 −2

. 2

Exercise 0.1.16 a) Determine whether the following subsets are subspace(giving reasons for your answers).

(i) U = {A ∈ R2×2|AT = A} in R2×2. (R2×2 is the vector space of all real 2× 2matrices under usual matrix addition and scalar-matrix multiplication.)

(ii) W = {(x, y, z) ∈ R3|x ≥ y ≥ z} in R3.

b) Find a basis for U . What is the dimension of U? (Show all your work byexplanations.)

c) What is the dimension of R2×2? Extend the basis of U to a basis for R2×2.

Solution: a-i)

1) A =

[0 00 0

]∈ U since A = AT =

[0 00 0

], so U 6= ∅.

2) Let A,B ∈ U . Then A = AT and B = BT . Then A + B ∈ U , since(A+B)T = AT +BT = A+B. So U is closed under addition.

0.1. VECTOR SPACES 9

3) Let c ∈ R and A ∈ U . Then A = AT . Then c ·A ∈ U since (c ·A)T = c ·AT =c · A. Thus U is closed under scalar multiplication.

So we proved that U is a subspace in R2×2.

a-ii) W is not a subspace in R3. Since (2, 1, 1) ∈ W , however (−1) · (2, 1, 1) =(−2,−1,−1) 6∈ W , that is W is not closed under scalar multiplication..

b) Let A ∈ U . Then A = AT i.e.

[a bc d

]=

[a cb d

]for all a, b, c, d ∈ R.

Thus a and d are arbitrary real numbers and c = b. So any matrix A ∈ U canbe written as[

a bb d

]= a ·

[1 00 0

]+ b ·

[0 11 0

]+ d ·

[0 00 1

].

Since

[1 00 0

],

[0 11 0

], and

[0 00 1

]are linearly independent, and any matrix

in U can be written as a linear combination of these matrices, these matrices

form a basis for U , namely B =

{[1 00 0

],

[0 11 0

],

[0 00 1

]}is a basis for

U . Thus dim(U) = 3.

c) The space R2×2 has the standard basis

C =

{[1 00 0

],

[0 10 0

],

[0 01 0

],

[0 00 1

]},

therefore dim(R2×2) = 4. We can extend the basis B for U to a basis for R2×2

by 1 0 00 1 00 1 00 0 1

∣∣∣∣∣∣∣∣1 0 0 00 1 0 00 0 1 00 0 0 1

−R2+R3−−−−−→

1 0 00 1 00 0 00 0 1

∣∣∣∣∣∣∣∣1 0 0 00 1 0 00 −1 1 00 0 0 1

R3↔R4−−−−→

1 0 00 1 00 0 10 0 0

∣∣∣∣∣∣∣∣1 0 0 00 1 0 00 0 0 10 −1 0 1

.Thus a basis for R2×2 containing vectors of B is

D =

{[1 00 0

],

[0 11 0

],

[0 00 1

],

[0 01 0

]}. 2

10

Exercise 0.1.17 Let p ∈ P2. The coordinate matrix of p relative to thestandard ordered basis B = {1, x, x2} is [p]B = [2,−1, 5]T . Find the change ofcoordinate matrix from the ordered basis B = {1, x, x2} to the ordered basisC = {1, 1− x, 1 + x+ x2} and the coordinate matrix of p relative to C, [p]C .

Solution: [p]B = [2,−1, 5]T then p = 2 · 1 + (−1) · x+ 5 · x2.

[PC→B|I] =

1 1 10 −1 10 0 1

∣∣∣∣∣∣1 0 00 1 00 0 1

−R3+R2−−−−−→−R3+R1

=

1 1 00 −1 00 0 1

∣∣∣∣∣∣1 0 −10 1 −10 0 1

→R2+R1−−−−→−R2

1 0 00 1 00 0 1

∣∣∣∣∣∣1 1 −20 −1 10 0 1

= [I|PB→C ],

where

PB→C =

1 1 −20 −1 10 0 1

is the change of coordinate matrix from the basis B to the basis C.

[p]C = PB→C · [p]B. Thus

[p]C =

1 1 −20 −1 10 0 1

· 2−1

5

=

−965

. 2

Exercise 0.1.18 Let B = {u, v} be a basis of R2 and let A =

[α γβ δ

]. Show

that A is invertible iff C = {αu+ βv, γu+ δv} is a basis of R2.

Solution: First, assume A is invertible. Let c1 · (αu+ βv) + c2 · (γu+ δv) = 0.Then (c1α + c2γ)u+ (c1β + c2δ)v = 0 since u and v are linearly independent.

So we have the system [α γβ δ

]·[c1

c2

]=

[00

]. (1)

0.1. VECTOR SPACES 11

By our assumption, there exists A−1. Hence this homogeneous system has onlytrivial solution, namely c1 = c2 = 0. So C consists of two linearly independentvectors and consequently it is a basis for R2 since dim(R2) = 2.

Conversely, assume C is a basis for R2, then the system (1) has only the trivialsolution, so AX = 0 consequently RX = 0 for some R which is the row echelonreduced matrix. If RX = 0 has only trivial solution then R = I which provesthat A is invertible. 2

Exercise 0.1.19 Consider the following list of statements. In each case eitherprove the statement if it is true or give an example showing that it is false.

i) If V is a subspace of R3 containing two linearly independent vectors, then Vis equal to all of R3.

ii) If vectors v1 and v2 are linearly dependent and u 6∈ span(v1, v2) then thevectors u+ v1 and u+ v2 are linearly dependent.

iii) If vectors v1 and v2 are linearly independent and u 6∈ span(v1, v2) then thevectors u+ v1 and u+ v2 are linearly independent.

Solution: i) False.

dim(R3) = 3, so we need at least 3 vectors to span R3. Consider V = {v1, v2} ={(1, 1, 0), (0, 1, 0)}. The vectors v1 and v2 are linearly independent since c1(1, 1, 0)+c2(0, 1, 0) = (c1, c1 + c2, 0) = (0, 0, 0) iff c1 = c2 = 0.

But V 6= R3 since (0, 0, 1) ∈ R3 but (0, 0, 1) 6= k1(1, 1, 0) + k2(0, 1, 0) = (k1, k1 +k2, 0) = (0, 0, 0). Thus (0, 0, 1) 6∈ V .

ii) False.

v1 and v2 are linearly dependent means that v1 = k · v2. So u+ v1 = u+ k · v2.

c1(u+ k · v2) + c2(u+ v2) = 0⇒ (c1 + c2)u+ (kc1 + c2)v2 = 0.

But u 6∈ span(v1, v2) hence c1 + c2 = 0 = kc1 + c2 i.e. (k− 1)c1 = 0 that is k = 1or c1 = 0.

So when k 6= 1 we have c1 = c2 = 0 i.e. u+v1 and u+v2 are linearly independent.

For example, u = (1, 1), v1 = (2, 0), v2 = (1, 0). Then u + v1 = (3, 1) andu+ v2 = (2, 1) are not linearly dependent.

iii) True.

If c1(u+ v1) + c2(u+ v2) = 0 then (c1 + c2)u+ c1v1 + c2v2 = 0. But v1 and v2 arelinearly independent and u 6∈ span(v1, v2), hence c1 = c2 = 0 and c1 + c2 = 0, sou+ v1 and u+ v2 are linearly independent.. 2

12

Exercise 0.1.20 Given three ordered bases B = {v1, v2, v3}, C = {u1, u2, u3},

and D = {w1,w2,w3} with the transition matrix PC→D =

1 1 11 2 31 4 9

, satisfy-

ing v1 = u1 + u2 + u3, v2 = u2 + u3, and v3 = u1 − u2.

a) Write down the vector 2u1− 3u2 + 4u3 as a linear combination of w1, w2, andw3.

b) Find the transition matrix PD→C .

c) Let C = {u2, u3, u1} and D = {w3,w2,w1}. Find the transition matrix PC→D.

d) Find the transition matrix PB→D.

Solution: a) v = 2u1 − 3u2 + 4u3 then [v]C = [2,−3, 4]T . So

[v]D = PC→D · [v]C =

1 1 11 2 31 4 9

· 2−3

4

=

38

26

.And thus v = 3w1 + 8w2 + 26w3.

b) PD→C = P−1C→D.

[PC→D|I] =

1 1 11 2 31 4 9

∣∣∣∣∣∣1 0 00 1 00 0 1

−R1+R3−−−−−→−R1+R2

1 1 10 1 20 3 8

∣∣∣∣∣∣1 0 0−1 1 0−1 0 1

−R2+R1−−−−−→−3R2+R3

1 0 −10 1 20 0 2

∣∣∣∣∣∣2 −1 0−1 1 0

2 −3 1

12R3−−→

1 0 −10 1 20 0 1

∣∣∣∣∣∣2 −1 0−1 1 0

1 −3/2 1/2

R3+R1−−−−−→−2R3+R2

1 0 00 1 00 0 1

∣∣∣∣∣∣3 −5/2 1/2−3 4 −1

1 −3/2 1/2

= [I|PD→C ].

c) PC→D = [[u2]D[u3]D[u1]D] =

4 9 12 3 11 1 1

.

u2 = w1 + 2w2 + 4w3 = 4w3 + 2w2 + w1 ⇒ [u2]D =

421

.

0.1. VECTOR SPACES 13

u3 = w1 + 3w2 + 9w3 = 9w3 + 3w2 + w1 ⇒ [u3]D =

931

.

u1 = w1 + w2 + w3 = w3 + w2 + w1 ⇒ [u1]D =

111

.

d) PB→D = PC→D · PB→C =

1 1 11 2 31 4 9

· 1 0 1

1 1 −11 1 0

=

3 2 06 5 −1

14 13 −3

.

Here we used v1 = u1 + u2 + u3, v2 = u2 + u3, and v3 = u1 − u2, hence

PB→C =

1 0 11 1 −11 1 0

. 2

14

0.2 Inner Product Spaces

Exercise 0.2.1 Find a non-zero polynomial of degree ≤ 2 orthogonal to theset {1, x} with respect to the integral inner product (p|q) =

∫ 1

0p(x)q(x) dx.

Solution: Let p(x) = ax2 + bx + c. Then we want 0 = (1|p) and 0 = (x|p).That is 0 = (1|p) =

∫ 1

0(ax2 + bx + c) dx which gives 2a + 3b + 6c = 0 and

0 = (x|p) =∫ 1

0(ax3 + bx2 + cx) dx yields 3a+ 4b+ 6c = 0. Consider the matrix[

2 3 63 4 6

]→[

2 3 60 −1/2 −3

].

If we take c = 1 then −12b = 3. i.e. b = 6 and a = 6. So one of the required

polynomial is 6x2 − 6x+ 1. 2

Exercise 0.2.2 Orthogonalize by the Gram – Schmidt process the basis{v1, v2, v3} = {(1, 0, 1), (0, 1, 0), (0,−1, 2)} for R3 with respect to the standardinner product ((x1, y1, z1)|(x2, y2, z2)) = x1x2 + y1y2 + z1z2.

Solution: Choose w1 = v1 = (1, 0, 1).

w2 = v2 −(v2|w1)

(w1|w1)· w1 = (0, 1, 0)− 0 · w1 = (0, 1, 0).

w3 = v3−(v3|w1)

(w1|w1)·w1−

(v3|w2)

(w2|w2)·w2 = (0,−1, 2)− 2

2· (1, 0, 1)− −1

1· (0, 1, 0) =

= (0,−1, 2)− (1, 0, 1) + (0, 1, 0) = (−1, 0, 1).

The answer is {(1, 0, 1), (0, 1, 0), (−1, 0, 1)}. 2

Exercise 0.2.3 Let R2×2 be the vector space of all real 2 × 2 matrices withinner product given by

(A|B) = tr(BT · A),

0.2. INNER PRODUCT SPACES 15

where tr is the trace of a matrix (i.e. sum of the diagonal entries of a matrix).Let

A =

[0 1−1 1

]and B =

[2 10 1

].

a) Find (A|B) and ‖B‖, where ‖ · ‖ denotes the norm (length) induced by theabove inner product.

b) Are A and B orthogonal?

c) Determine the scalar c such that A− cB is orthogonal to A.

Solution: a)

(A|B) = tr(BT ·A) = tr

([2 01 1

]·[

0 1−1 1

])= tr

([0 2−1 2

])= 0+2 = 2.

‖B‖ =√

(B|B) = [tr(BT ·B)]1/2 =

[tr

([2 01 1

]·[

2 10 1

])]1/2

=

=

[tr

([4 22 2

])]1/2

=√

4 + 2 =√

6 = ‖B‖.

b) A and B are not orthogonal since, by part a), (A|B) = 2 6= 0.

c) A− cB and A are orthogonal iff (A− cB|A) = 0.

(A− cB|A) = (A|A)− c(B|A) = tr(AT · A)− c(A|B) =

= tr

([0 −11 1

]·[

0 1−1 1

])− c · 2 = tr

([1 −1−1 2

])− 2c = 3− 2c.

We have A− cB and A are orthogonal iff 3− 2c = 0 so c = 3/2. 2

Exercise 0.2.4 Let u1 and u2 be two vectors in an inner product space Vsuch that ‖u1‖ = ‖u2‖ = 1, (u1|u2) = 0.

a) Find the cosine of the angle between the vectors 2u1 + 3u2 and 4u1 − 2u2.

b) Find a vector v ∈ span(u1, u2) such that v ⊥ (2u1 + 3u2) and ‖v‖ = 1.

16

Solution: a)

cos θ =(2u1 + 3u2|4u1 − 2u2)√

(2u1 + 3u2|2u1 + 3u2) · (4u1 − 2u2|4u1 − 2u2).

(2u1 + 3u2|4u1 − 2u2) = 8(u1|u1)− 6(u2|u2) = 8− 6 = 2.

(2u1 + 3u2|2u1 + 3u2) · (4u1 − 2u2|4u1 − 2u2) = (4 + 9) · (16 + 4) = 260.

We used facts that (u1|u2) = 0 and ‖u1‖ =√

(u1|u1) = ‖u2‖ =√

(u2|u2) = 1.Thus

cos θ =2√260

.

b) Let v = x · u1 + y · u2. Find x and y.

0 = (v|2u1 + 3u2) = (xu1 + yu2|2u1 + 3u2) = 2x+ 3y ⇒ y = −2

3x.

1 = (v|v) = ‖v‖2 = (xu1 + yu2|xu1 + yu2) = x2 + y2 = x2 +

(−2

3

)2

x2 =13

9x2.

So we have

x2 =9

13⇒ x = ±

√9

13= ± 3√

13.

Finally

v =3√13u1 −

2√13u2 and v = − 3√

13u1 +

2√13u2. 2

Exercise 0.2.5 Let v1 = (1, 1, 1, 1), v2 = (1, 1, 2, 0), and v3 = (2, 3, 0, 0) bevectors in R4 equipped with the standard inner product.

a) Find the orthogonal complement for span{v1, v2} in R4.

b) Find the orthogonal basis to span{v1, v2, v3}.

c) Find the orthogonal projection of (1, 1,−1,−1) to span{v1, v2}.

Solution: a) (v1|(x, y, z, u)) = 0 and (v2|(x, y, z, u)) = 0. So we have the system{x+ y + z + u = 0x+ y + 2z = 0

.

0.2. INNER PRODUCT SPACES 17

Or in matrix notation

[1 1 1 11 1 2 0

xyzu

=

[00

].

Find the fundamental solutions of this system.

[1 1 1 11 1 2 0

]→[

1 1 1 10 0 1 −1

].

The variables y and u are free.

So we have F1 =

−1

100

and F2 =

−2

011

. Finally

span{v1, v2}⊥ = 〈(−1, 1, 0, 0), (−2, 0, 1, 1)〉.

b) By the Gram –Schmidt, w1 = v1 = (1, 1, 1, 1).

w2 = v2 −(v2|w1)

(w1|w1)· w1 = (1, 1, 2, 0)− 4

4· (1, 1, 1, 1) = (0, 0, 1,−1).

w3 = v3 −(v3|w1)

(w1|w1)· w1 −

(v3|w2)

(w2|w2)· w2 =

= (2, 3, 0, 0)− 5

4· (1, 1, 1, 1)− 0

2· (0, 0, 1,−1) =

(3

4,7

4,−5

4,−5

4

).

The orthogonal basis is{

(1, 1, 1, 1), (0, 0, 1,−1),(

34, 7

4,−5

4,−5

4

)}.

c) Since ((1, 1,−1,−1)|v1) = 0 and ((1, 1,−1,−1)|v2) = 0 then

(1, 1,−1,−1) ∈ span{v1, v2}⊥

and henceprspan{v1,v2}((1, 1,−1,−1)) = (0, 0, 0, 0). 2

Exercise 0.2.6 Let R4 be the inner product space relative to the standardinner product. Let B = {(1, 1, 0, 0), (0, 1, 1, 0), (1,−1, 1, 1)} be a basis for L =span(B).

a) Orthogonalize the basis B by means of the Gram –Schmidt orthogonalizationprocess.

b) Find the closest vector to g = (1, 1, 1, 0) in L.

18

Solution: a) w1 = v1 = (1, 1, 0, 0).

w2 = v2 −(v2|w1)

(w1|w1)· w1 = (0, 1, 1, 0)− 1

2· (1, 1, 0, 0) =

(−1

2,1

2, 1, 0

).

w3 = v3−(v3|w1)

(w1|w1)·w1−

(v3|w2)

(w2|w2)·w2 = (1,−1, 1, 1)−0 ·w1−0 ·w2 = (1,−1, 1, 1).

The obtained orthogonal basis for L is

{w1, w2, w3} =

{(1, 1, 0, 0),

(−1

2,1

2, 1, 0

), (1,−1, 1, 1)

}.

b) The vector closest to g is the orthogonal projection of g in L, that is

prL(g) =(g|w1)

(w1|w1)·w1 +

(g|w2)

(w2|w2)·w2 +

(g|w3)

(w3|w3)·w3 =

2

2·w1 +

2

3·w2 +

1

4·w3 =

= (1, 1, 0, 0) +

(−1

3,1

3,2

3, 0

)+

(1

4,−1

4,1

4,1

4

)=

(1− 1

12, 1 +

1

12,11

12,1

4

)=

=1

12· (11, 13, 11, 3). 2

Exercise 0.2.7 Consider the vector space R3 with the standard inner productand let S = {(2,−1, 1), (1, 2, 3), (3, 1, 4)}.

a) Find a basis for the orthogonal complement S⊥ of S.

b) Find the orthogonal projection of (1, 1, 1) on the subspace spanned by S.

Solution: a) All vectors v ∈ S⊥ satisfy (v|u) = 0, where u ∈ S. So to find a

basis of S⊥ we need to solve the system

2x− y + z = 0x+ 2y + 3z = 03x+ y + 4z = 0

.

Or in matrix notation A ·

xyz

=

2 −1 11 2 33 1 4

· xyz

=

000

.

0.2. INNER PRODUCT SPACES 19

Find the fundamental solutions of this system.

A−R1+R3−−−−−→−R2+R3

2 −1 11 2 30 0 0

−2R2+R1−−−−−→R1↔R2

1 2 30 −5 −50 0 0

.The variable z is free.

So we have P1 =

−1−1

1

. Hence {u = (−1,−1, 1)} is a basis for S⊥.

b) Note v = (1, 1, 1). Since

v = pr〈S〉(v) + pr〈S⊥〉(v)

then

pr〈S〉(v) = v − pr〈S⊥〉(v).

pr〈S⊥〉(v) =(v|u)

‖u‖2· u =

((1, 1, 1)|(−1,−1, 1))

((−1,−1, 1)|(−1,−1, 1))· (−1,−1, 1) =

=

(−1

3

)· (−1,−1, 1) =

(1

3,1

3,−1

3

).

Hence

pr〈S〉(v) = (1, 1, 1)−(

1

3,1

3,−1

3

)=

(2

3,2

3,4

3

). 2

Exercise 0.2.8 If v and w are two vectors of an inner product space, provethat

‖v + w‖2 + ‖v − w‖2 = 2(‖v‖2 + ‖w‖2).

Solution:

‖v + w‖2 + ‖v − w‖2 = (v + w|v + w) + (v − w|v − w) =

= [(v|v) + 2(v|w) + (w|w)] + [(v|v)− 2(v|w) + (w|w)] =

= 2[(v|v) + (w|w)] = 2(‖v‖2 + ‖w‖2). 2

20

Exercise 0.2.9 Let R4 be the inner product space with the standard innerproduct (·|·). Let S = span{(1, 1, 0, 1), (1, 0, 1, 0), (0, 1,−1, 1)} ⊆ R4.

a) Find a basis B for the orthogonal complement to S in R4.

b) Applying the Gram –Schmidt orthogonalization to the basis B constructedin a), find an orthonormal basis for the orthogonal complement S⊥ of S.

c) Find the orthogonal projection of v = (0, 0, 0, 1) on S.

Solution: a) 1 1 0 11 0 1 00 1 −1 1

−R2+R1−−−−−→

0 1 −1 11 0 1 00 1 −1 1

−R1+R3−−−−−→R1↔R2

1 0 1 00 1 −1 10 0 0 0

.The third and forth variables are free. We have x + z = 0 and y − z + t = 0.Then y = z − t and x = −z.

Find the fundamental vectors of the system.

z = 0, t = 1. P1 =

0−1

01

.

z = 1, t = 0. P2 =

−1

110

.So B = {P1, P2} is a basis for S⊥.

b) w1 = P1 =

0−1

01

.

w2 = P2 −(P2|w1)

(w1|w1)· w1 = P2 +

1

2· w1 =

−1

110

+

0

−1/20

1/2

=

−11/2

11/2

.

0.2. INNER PRODUCT SPACES 21

w1 =w1

‖w1‖=

1√2·

0−1

01

=

0

−1/√

20

1/√

2

.

w2 =w2

‖w2‖= w2 ·

(√1 + 1/4 + 1 + 1/4

)−1

=

−√

2/√

5

1/√

10√2/√

5

1/√

10

So Bort = {w1, w2}.c) pr〈S〉(v) = v − pr〈S⊥〉(v).

pr〈S⊥〉(v) = (v|w1) · w1 + (v|w2) · w2 =1√2w1 +

1√10w2 =

=

0

−1/20

1/2

+

−1/51/101/5

1/10

=

−1/5−2/5

1/53/5

.

pr〈S〉(v) = v −

−1/5−2/5

1/53/5

=

1/52/5−1/5

2/5

. 2

Exercise 0.2.10 Given a basis B = {1, t + t2, t − t2} for V = P2(R). Theinner product (.|.) in the vector space V is defined by (u|v) = [u]TB[v]B, where[u]TB is the transpose of the coordinate matrix [u]B of a vector u with respect tothe basis B.

a) Show that B is an orthonormal basis for V with respect to the inner product(.|.).b) Find the norm of v = 1 + t+ t2 with respect to the given inner product (.|.).c) Find the cosine of the angle between v = 1 + t + t2 and u = 2t with respectto the given inner product (.|.).d) Find the orthogonal projection of w = 1 − t + 2t2 onto S = Span{1, 1 + t2}with respect to the given inner product (.|.).

22

Solution: a) Denote v1 = 1, v2 = t+ t2, v3 = t− t2.

Then [v1]B =

100

, [v2]B =

010

, [v3]B =

001

.

(v1|v1) = [1 0 0] ·

100

= 1, (v2|v2) = 1, (v3|v3) = 1.

Consequently ‖v1‖ =√

(v1|v1) = 1, ‖v2‖ = 1, ‖v3‖ = 1.

(v1|v2) = [1 0 0] ·

010

= 0, (v2|v3) = 0, (v1|v3) = 0.

Hence B = {v1, v2, v3} is orthonormal basis.

b) [v]B =

110

since v = 1 + t+ t2 = 1 · 1 + 1 · (t+ t2) + 0 · (t− t2).

(v|v) = [v]TB[v]B = [1 1 0] ·

110

= 2, ‖v‖ =√

(v|v) =√

2.

c) [u]B =

011

since u = 2t = 0 · 1 + 1 · (t+ t2) + 1 · (t− t2), [v]B =

110

.

‖u‖ =√

(u|u) =√

2, ‖v‖ =√

2. (u|v) = [u]TB[v]B = [0 1 1] ·

110

= 1.

cos vu = cos uv =(u|v)

‖u‖ · ‖v‖=

2√2 ·√

2=

1

2.

d) w = 1− t+ 2t2 = α · 1 + β · (t+ t2) + γ · (t− t2) thenα = 1β + γ = −1β − γ = 2

α = 1β + γ = −12β = 1

α = 1β = 1/2γ = −1 + 1/2 = −3/2

.

Hence [w]B =

11/2−3/2

.

prS(w) = (w|w1)w1 + (w|w2)w2, where {w1.w2} is an orthonormal basis forS = Span{1, 1 + t2}. 2

0.2. INNER PRODUCT SPACES 23

Exercise 0.2.11 a) Find a basis for the orthogonal complement of S ={(1, 2,−1, 3), (2, 2, 1,−3), (1, 0, 2,−6)} in R4 with respect to the standard innerproduct in R4.

b) Let w1 = (1, 1,−1,−1), w2 = (1, 2, 1, 2), and w3 = (1, 1, 2, 1). Find anorthonormal basis for W = Span{w1, w2, w3} with respect to the standard innerproduct in R4.

Solution: a) Denote v1 = (1, 2,−1,−1), v2 = (2, 2, 1,−3), and v3 = (1, 0, 2,−6).

Consider the system

(v|v1) = x+ 2y − z + 3t = 0(v|v2) = 2x+ 2y + z − 3t = 0(v|v3) = x+ 0 · y + 2z − 6t = 0

. Find the fundamental

solution of this system. It is a basis for S⊥. 1 0 2 −61 2 −1 32 1 1 −3

−2R1+R3−−−−−→−R1+R2

1 0 2 −60 2 −3 90 2 −3 9

−R2+R3−−−−−→

1 0 2 −60 2 −3 90 0 0 01

.

x = 6t − 2z, y = 32z − 9

2t. The variables z and t are free. The fundamental

solution is xyzt

=

−2z + 6t

32z − 9

2tzt

= z

−23/2

10

+ t

6

−9/201

.The basis of S⊥ is {(−2, 3/2, 1, 0), (6,−9/2, 0, 1)}.b) x1 = w1 = (1, 1,−1,−1).

x2 = w2 − (w2|x1)(x1|x1)

· x1 = (1, 2, 1, 2)− 0 · x1 = (1, 2, 1, 2).

x3 = w3− (w3|x1)(x1|x1)

·x1−− (w3|x2)(x2|x2)

·x2 = (1, 1, 2, 1)− −14

(1, 1,−1,−1)− 710

(1, 2, 1, 2) =(54, 5

4, 7

4, 3

4

)−(

710, 14

10, 7

10, 14

10

)=(

1120,− 3

20, 21

20,−13

20

).

‖x1‖ =√

(x1|x1) =√

4 = 2, ‖x2‖ =√

(x2|x2) =√

10, ‖x3‖ =√

(x3|x3) =√112+32+212+132

202 =√

64020

= 8√

1020

.

The required orthonormal basis is{x1

‖x1‖,x2

‖x2‖,x3

‖x3‖

}=

{1

2(1, 1,−1,−1),

1√10

(1, 2, 1, 2),1

8√

10(11,−3, 21,−13)

}. 2

24

Exercise 0.2.12 Let u1 = t − t2, u2 = t + t2, u3 = 2, w1 = 1, w2 = t, andw3 = t2.

a) Show that B = {u1, u2, u3} is a basis for the vector space P2(R) of polynomialsof degree ≤ 2.

b) Find the transition matrix PC→B, whereB = {u1, u2, u3} and C = {w1, w2, w3}.c) Calculate the coordinate matrix [3− 2t+ t2]B, where B = {u1, u2, u3}.

d) Given [v]B =

123

, find the polynomial v ∈ P2(R).

Solution: a) Consider the coordinate matrix [u1 u2 u3] in the standard basis ofP2(R): 0 0 2

1 1 0−1 1 0

R2+R3−−−−→

0 0 21 1 00 2 0

. So the vectors u1, u2 and u3 are linearly

independent hence they form a basis for P2(R).

b) [v]B = PC→B[v]C = [[w1]B [w2]B [w3]B][v]Cw1 = 1 = 0 · u1 + 0 · u2 + 1/2 · u3

w2 = t = 1/2 · u1 + 1/2 · u2 + 0 · u3

w3 = t2 = −1/2 · u1 + 1/2 · u2 + 0 · u3

.

P =

0 1/2 −1/20 1/2 1/2

1/2 0 0

.c) 3 − 2t + t2 = x1u1 + x2u2 + x3u3 = x1(t − t2) + x2(t + t2) + x3 · 2 hence(x2− x1)t2 + (x2 + x1)t+ 2x3 = t2− 2t+ 3 then x2− x1 = 1, x2 + x1 = −2, and2x3 = 3. Finally x1 = −3/2, x2 = −1/2, x3 = 3/2 and

[3− 2t+ t2]B =

−3/2−1/2

3/2

.d)

[t− t2 t+ t2 2] ·

123

= t− t2 + 2(t+ t2) + 6 = t2 + 3t+ 6.

The required polynomial is t2 + 3t+ 6. 2