Steply

Orthonormal basis from (3, 4), (1, 0)

Step by step, with the reason for every step · Gram-Schmidt · Linear Algebra

Step by step

The question

Question: make (3, 4) and (1, 0) orthonormal, with Gram-Schmidt.

v1 = [3; 4], 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 = [3; 4]

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 × 3 + 0 × 4 = 3 + 0 = 3

The bottom: u₁ • u₁.

u1 • u1 = 3 × 3 + 4 × 4 = 9 + 16 = 25

So the number is 3/25.

number = 325

Times u₁: every entry times 3/25.

The projection is (9/25, 12/25).

proj on u1 = 325 × [3; 4] = [9 over 25; 12 over 25]

So u₂ is v₂ minus the projection.

u2 = [1; 0] − [9 over 25; 12 over 25]

Entry by entry: (16/25, −12/25).

u2 = [16 over 25; −12 over 25]

To clear the fractions, we multiply it by 25/4.

Same direction, still at a right angle.

u2 = [4; −3]

3 Divide by the lengths

Orthonormal means at right angles, and each one has length 1.

So we divide each one by its length.

orthonormal: at right angles, and each of length 1

The length of u₁: 5.

‖u1‖ = √32 + 42 = 5

So e₁ is u₁ divided by 5.

e1 = 15 × [3; 4]

The length of u₂: 5.

‖u2‖ = √42 + (−3)2 = 5

So e₂ is u₂ divided by 5.

e2 = 15 × [4; −3]

So the orthonormal vectors are e₁ = 1/5 times (3, 4) and e₂ = 1/5 times (4, −3).

= e1 = 15 × [3; 4], e2 = 15 × [4; −3]

4 Check

Let's check: every pair must have dot product 0.

u₁ • u₂.

u1 • u2 = 3 × 4 + 4 × (−3) = 12 − 12 = 0

And each length is 1: the length of u₁ divided by itself.

‖e1‖ = 55 = 1
‖e2‖ = 55 = 1

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: divide by the lengths.

Last: check.

Answer
= e1 = 15 × [3; 4], e2 = 15 × [4; −3]

Your turn

Try this one yourself, then check:

Orthonormal basis from [4; 3], [1; 1]
Show the answer
e1 = 15 × [4; 3], e2 = 15 × [−3; 4]

More from Gram-Schmidt

The whole lesson: Gram-Schmidt →