SME
Linear Algebra · Problem type
Gram–Schmidt for two vectors
Use this for “Apply Gram–Schmidt to v₁ = ⟨1, 1, 0⟩ and v₂ = ⟨1, 0, 1⟩ to get an orthogonal basis of their plane.”
Diagram
v₂ = ⟨1, 0, 1⟩
u₁ = ⟨1, 1, 0⟩
v₂·u₁ = 1 × 1 + 0 × 1 + 1 × 0 = 1.
u₁·u₁
=
2,
so
projᵤ₁
v₂
=
(
1
2
)u₁
=
⟨0.5,
0.5,
0⟩.
u₂ = ⟨0.5, −0.5, 1⟩; (u₂)·u₁ = 0: square to u₁.
|u₁| = 1.41 and |u₂| = 1.22.
This is an example. Type your own values to start a new problem.
v₁
=
⟨
a
,
b
,
c
⟩
v₂
=
⟨
d
,
e
,
f
⟩
u₂
=
⟨
g
,
h
,
j
⟩
v₂·u₁
Dot product v₂·u₁
worked out (not typed)
u₁·u₁
Dot product u₁·u₁
worked out (not typed)
k
Factor v₂·u₁ ÷ u₁·u₁
worked out (not typed)
|u₁|
Length of u₁
worked out (not typed)
|u₂|
Length of u₂
worked out (not typed)
Formulas
v₂·u₁
=
d
×
a
+
e
×
b
+
f
×
c
1 = 1 × 1 + 0 × 1 + 1 × 0
u₁·u₁
=
a
2
+
b
2
+
c
2
2
=
1
2
+
1
2
+
0
2
k
=
v₂·u₁
u₁·u₁
0.5
=
1
2
g
=
d
−
k
×
a
0.5 = 1 − 0.5 × 1
h
=
e
−
k
×
b
−0.5 = 0 − 0.5 × 1
j
=
f
−
k
×
c
1 = 1 − 0.5 × 0
|u₁|
=
√
u₁·u₁
1.4142
=
√
2
|u₂|
=
√
g
2
+
h
2
+
j
2
1.2247
=
√(
0.5
2
+
(−0.5)
2
+
1
2
)
Assumptions
•
Gram–Schmidt keeps u₁ = v₁ and takes from v₂ its projection onto u₁: u₂ = v₂ − (v₂·u₁ ÷ u₁·u₁)u₁.
•
u₂ is orthogonal to u₁, and u₁ and u₂ span the same plane as v₁ and v₂.
•
v₁ and v₂ are not parallel, so u₂ is not the zero vector. Divide each uᵢ by its length for an orthonormal basis.
Step-by-step
WE KNOW
a = 1, b = 1, c = 0, d = 1, e = 0, f = 1
FIND
dot product v₂·u₁ (v₂·u₁), dot product u₁·u₁ (u₁·u₁), factor v₂·u₁ ÷ u₁·u₁ (k), u₂, x-component (g), u₂, y-component (h), u₂, z-component (j), length of u₁ (|u₁|), length of u₂ (|u₂|)
Step 1 · Find dot product v₂·u₁ (v₂·u₁)
Use v₂·u₁ = d × a + e × b + f × c
u₁ = v₁. Multiply matching components of v₂ and u₁, and add.
v₂·u₁ = 1 × 1 + 0 × 1 + 1 × 0
v₂·u₁ = 1
Step 2 · Find dot product u₁·u₁ (u₁·u₁)
Use u₁·u₁ = a² + b² + c²
u₁·u₁ is the square of u₁’s length.
u₁·u₁
=
1
2
+
1
2
+
0
2
u₁·u₁ = 1 + 1
u₁·u₁ = 2
Step 3 · Find factor v₂·u₁ ÷ u₁·u₁ (k)
Use k = (v₂·u₁) ÷ (u₁·u₁)
How many u₁’s long the projection of v₂ onto u₁ is.
k
=
1
2
k
=
0.5
Step 4 · Find u₂, x-component (g)
Use g = d − k × a
Take
k
times
u₁
off
v₂,
one
component
at
a
time.
g
=
1
−
0.5
×
1
g
=
0.5
Step 5 · Find u₂, y-component (h)
Use h = e − k × b
The next component the same way.
h
=
0
−
0.5
×
1
h
=
−0.5
Step 6 · Find u₂, z-component (j)
Use j = f − k × c
The last component. u₂ is orthogonal to u₁: their dot product is 0.
j
=
1
−
0.5
×
0
Check: 0.5 × 1 + (−0.5) × 1 + 1 × 0 = 0
j
=
1
Step 7 · Find length of u₁ (|u₁|)
Use |u₁| = √(u₁·u₁)
The length of u₁ is the square root of u₁·u₁.
|u₁|
=
√
2
|u₁| = 1.4142
Step 8 · Find length of u₂ (|u₂|)
Use |u₂| = √(g² + h² + j²)
Pythagoras in three dimensions gives u₂’s length.
|u₂|
=
√(
0.5
2
+
(−0.5)
2
+
1
2
)
|u₂|
=
√
0.25 + 0.25 + 1
|u₂|
=
√
1.5
|u₂| = 1.2247
Check
Put the numbers back in. Both sides should match.
1 = 1 × 1 + 0 × 1 + 1 × 0 ✓
2
=
1
2
+
1
2
+
0
2
✓
0.5
=
1
2
✓
0.5 = 1 − 0.5 × 1 ✓
−0.5 = 0 − 0.5 × 1 ✓
1 = 1 − 0.5 × 0 ✓
1.4142
=
√
2
✓
1.2247
=
√(
0.5
2
+
(−0.5)
2
+
1
2
)
✓
← Previous lesson
Projection onto a line
Next lesson →
Linear transformations, kernel and range, change of basis
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.