The question
Question: make (1, 1) and (1, 0) orthogonal, with Gram-Schmidt.
v1 = [1; 1], v2 = [1; 0]
We want new vectors uโ and uโ, each at a right angle to the others, that make the same vectors as the old ones.
The idea: take away from each vector the parts along the earlier ones.
goal: u1, u2 at right angles
(dot products 0), the same span
1 Keep the first
The first one stays: uโ = vโ.
u1 = v1 = [1; 1]
2 Make the second one perpendicular
uโ is vโ with its part along uโ taken away.
u2 = v2 โ proj on u1
Careful!
The projection is taken away from vโ, not added.
Careful: take the projection AWAY: v2 โ proj
The part along uโ, as in the projection lesson.
The top: vโ โข uโ.
v2 โข u1 = 1 ร 1 + 0 ร 1 = 1 + 0 = 1
The bottom: uโ โข uโ.
u1 โข u1 = 1 ร 1 + 1 ร 1 = 1 + 1 = 2
So the number is 1/2.
number = 12
Times uโ: every entry times 1/2.
The projection is (1/2, 1/2).
proj on u1 = 12 ร [1; 1] = [1 over 2; 1 over 2]
So uโ is vโ minus the projection.
u2 = [1; 0] โ [1 over 2; 1 over 2]
Entry by entry: (1/2, โ1/2).
u2 = [1 over 2; โ1 over 2]
To clear the fractions, we multiply it by 2.
Same direction, still at a right angle.
u2 = [1; โ1]
So the orthogonal vectors are uโ = (1, 1) and uโ = (1, โ1).
= u1 = [1; 1], u2 = [1; โ1]
3 Check
Let's check: every pair must have dot product 0.
uโ โข uโ.
u1 โข u2 = 1 ร 1 + 1 ร (โ1) = 1 โ 1 = 0
Every dot product is 0: the vectors are at right angles.
So the answer is right!
Let's look back.
First: keep the first.
Then: make the second one perpendicular.
Last: check.
Answer = u1 = [1; 1], u2 = [1; โ1]
โถ Watch it solved
The question
Question: make (1, 1, 0) and (1, 0, 1) orthogonal, with Gram-Schmidt.
v1 = [1; 1; 0], v2 = [1; 0; 1]
We want new vectors uโ and uโ, each at a right angle to the others, that make the same vectors as the old ones.
The idea: take away from each vector the parts along the earlier ones.
goal: u1, u2 at right angles
(dot products 0), the same span
1 Keep the first
The first one stays: uโ = vโ.
u1 = v1 = [1; 1; 0]
2 Make the second one perpendicular
uโ is vโ with its part along uโ taken away.
u2 = v2 โ proj on u1
Careful!
The projection is taken away from vโ, not added.
Careful: take the projection AWAY: v2 โ proj
The part along uโ, as in the projection lesson.
The top: vโ โข uโ.
v2 โข u1 = 1 ร 1 + 0 ร 1 + 1 ร 0 = 1 + 0 + 0 = 1
The bottom: uโ โข uโ.
u1 โข u1 = 1 ร 1 + 1 ร 1 + 0 ร 0 = 1 + 1 + 0 = 2
So the number is 1/2.
number = 12
Times uโ: every entry times 1/2.
The projection is (1/2, 1/2, 0).
proj on u1 = 12 ร [1; 1; 0] = [1 over 2; 1 over 2; 0]
So uโ is vโ minus the projection.
u2 = [1; 0; 1] โ [1 over 2; 1 over 2; 0]
Entry by entry: (1/2, โ1/2, 1).
u2 = [1 over 2; โ1 over 2; 1]
To clear the fractions, we multiply it by 2.
Same direction, still at a right angle.
u2 = [1; โ1; 2]
So the orthogonal vectors are uโ = (1, 1, 0) and uโ = (1, โ1, 2).
= u1 = [1; 1; 0], u2 = [1; โ1; 2]
3 Check
Let's check: every pair must have dot product 0.
uโ โข uโ.
u1 โข u2 = 1 ร 1 + 1 ร (โ1) + 0 ร 2 = 1 โ 1 + 0 = 0
Every dot product is 0: the vectors are at right angles.
So the answer is right!
Let's look back.
First: keep the first.
Then: make the second one perpendicular.
Last: check.
Answer = u1 = [1; 1; 0], u2 = [1; โ1; 2]
โถ Watch it solved
The question
Question: make (1, 1, 0), (1, 0, 1) and (0, 1, 1) orthogonal, with Gram-Schmidt.
v1 = [1; 1; 0], v2 = [1; 0; 1], v3 = [0; 1; 1]
We want new vectors uโ, uโ and uโ, each at a right angle to the others, that make the same vectors as the old ones.
The idea: take away from each vector the parts along the earlier ones.
goal: u1, u2, u3 at right angles
(dot products 0), the same span
1 Keep the first
The first one stays: uโ = vโ.
u1 = v1 = [1; 1; 0]
2 Make the second one perpendicular
uโ is vโ with its part along uโ taken away.
u2 = v2 โ proj on u1
The part along uโ, as in the projection lesson.
The top: vโ โข uโ.
v2 โข u1 = 1 ร 1 + 0 ร 1 + 1 ร 0 = 1 + 0 + 0 = 1
The bottom: uโ โข uโ.
u1 โข u1 = 1 ร 1 + 1 ร 1 + 0 ร 0 = 1 + 1 + 0 = 2
So the number is 1/2.
number = 12
Times uโ: every entry times 1/2.
The projection is (1/2, 1/2, 0).
proj on u1 = 12 ร [1; 1; 0] = [1 over 2; 1 over 2; 0]
So uโ is vโ minus the projection.
u2 = [1; 0; 1] โ [1 over 2; 1 over 2; 0]
Entry by entry: (1/2, โ1/2, 1).
u2 = [1 over 2; โ1 over 2; 1]
To clear the fractions, we multiply it by 2.
Same direction, still at a right angle.
u2 = [1; โ1; 2]
3 Make the third one perpendicular
uโ is vโ with its parts along uโ and uโ taken away.
u3 = v3 โ proj on u1 โ proj on u2
Careful!
We project onto the new vectors uโ and uโ, not onto the old ones.
Careful: project on the NEW u1, u2, not on v1, v2
The part along uโ, as in the projection lesson.
The top: vโ โข uโ.
v3 โข u1 = 0 ร 1 + 1 ร 1 + 1 ร 0 = 0 + 1 + 0 = 1
The bottom: uโ โข uโ.
u1 โข u1 = 1 ร 1 + 1 ร 1 + 0 ร 0 = 1 + 1 + 0 = 2
So the number is 1/2.
number = 12
Times uโ: every entry times 1/2.
The projection is (1/2, 1/2, 0).
proj on u1 = 12 ร [1; 1; 0] = [1 over 2; 1 over 2; 0]
Now the part along uโ.
The top: vโ โข uโ.
v3 โข u2 = 0 ร 1 + 1 ร (โ1) + 1 ร 2 = 0 โ 1 + 2 = 1
The bottom: uโ โข uโ.
u2 โข u2 = 1 ร 1 + (โ1) ร (โ1) + 2 ร 2 = 1 + 1 + 4 = 6
So the number is 1/6.
number = 16
Times uโ: every entry times 1/6.
The projection is (1/6, โ1/6, 1/3).
proj on u2 = 16 ร [1; โ1; 2] = [1 over 6; โ1 over 6; 1 over 3]
So uโ is vโ minus both projections.
u3 = [0; 1; 1] โ [1 over 2; 1 over 2; 0] โ [1 over 6; โ1 over 6; 1 over 3]
Entry by entry: (โ2/3, 2/3, 2/3).
u3 = [โ2 over 3; 2 over 3; 2 over 3]
To clear the fractions, we multiply it by 3/2.
Same direction, still at a right angle.
u3 = [โ1; 1; 1]
So the orthogonal vectors are uโ = (1, 1, 0), uโ = (1, โ1, 2) and uโ = (โ1, 1, 1).
= u1 = [1; 1; 0], u2 = [1; โ1; 2], u3 = [โ1; 1; 1]
4 Check
Let's check: every pair must have dot product 0.
uโ โข uโ.
u1 โข u2 = 1 ร 1 + 1 ร (โ1) + 0 ร 2 = 1 โ 1 + 0 = 0
uโ โข uโ.
u1 โข u3 = 1 ร (โ1) + 1 ร 1 + 0 ร 1 = โ1 + 1 + 0 = 0
uโ โข uโ.
u2 โข u3 = 1 ร (โ1) + (โ1) ร 1 + 2 ร 1 = โ1 โ 1 + 2 = 0
Every dot product is 0: the vectors are at right angles.
So the answer is right!
Let's look back.
First: keep the first.
Then: make the second one perpendicular.
Then: make the third one perpendicular.
Last: check.
Answer = u1 = [1; 1; 0], u2 = [1; โ1; 2], u3 = [โ1; 1; 1]
โถ Watch it solved