Lesson 1: Dot Product, Length, and Orthogonality
Estimated time: 40-50 minutes
Learning Objectives
- Compute the dot product of two vectors and state its properties
- Calculate vector length (norm) and distance between vectors
- Define orthogonality and verify when two vectors are orthogonal
- State and apply the Cauchy-Schwarz and Triangle inequalities
- Work with orthogonal and orthonormal sets of vectors
The Dot Product
Dot Product: For u = (u1, u2, ..., un) and v = (v1, v2, ..., vn) in R^n:
u · v = u1*v1 + u2*v2 + ... + un*vn = u^T v.
Worked Example 1
u = (2, -1, 3), v = (4, 0, -1). u · v = 2(4) + (-1)(0) + 3(-1) = 8 + 0 - 3 = 5.
Properties of the Dot Product: For vectors u, v, w and scalar c:
- u · v = v · u (commutative)
- (u + v) · w = u · w + v · w (distributive)
- (cu) · v = c(u · v)
- u · u ≥ 0, and u · u = 0 iff u = 0 (positive definite)
Vector Length and Distance
Length (Norm): ||u|| = sqrt(u · u) = sqrt(u1^2 + u2^2 + ... + un^2).
Unit Vector: A vector with ||u|| = 1. To normalize: u-hat = u / ||u||.
Distance: dist(u, v) = ||u - v||.
Worked Example 2
u = (3, -4). ||u|| = sqrt(9 + 16) = sqrt(25) = 5.
Unit vector: u-hat = (3/5, -4/5). Check: ||(3/5, -4/5)|| = sqrt(9/25 + 16/25) = 1.
Worked Example 3
u = (1, 2, 3), v = (4, 0, 1). dist(u,v) = ||(1-4, 2-0, 3-1)|| = ||(-3, 2, 2)|| = sqrt(9+4+4) = sqrt(17).
Orthogonality
Orthogonal Vectors: u and v are orthogonal (perpendicular) if u · v = 0. We write u ⊥ v.
Worked Example 4
u = (2, 1, -1), v = (1, -3, -1). u · v = 2 - 3 + 1 = 0. So u and v are orthogonal.
Pythagorean Theorem: If u ⊥ v, then ||u + v||^2 = ||u||^2 + ||v||^2.
The Angle Between Vectors
cos(theta) = (u · v) / (||u|| * ||v||). Vectors are orthogonal when theta = 90 degrees (cos theta = 0).
The Cauchy-Schwarz Inequality
Cauchy-Schwarz: |u · v| ≤ ||u|| * ||v|| for all u, v. Equality holds iff u and v are parallel (one is a scalar multiple of the other).
Worked Example 5
u = (1, 2), v = (3, 1). |u · v| = |3 + 2| = 5. ||u||*||v|| = sqrt(5)*sqrt(10) = sqrt(50) = 5*sqrt(2) approximately 7.07.
Check: 5 ≤ 7.07. Cauchy-Schwarz holds, and they are not parallel.
Orthogonal and Orthonormal Sets
Orthogonal Set: A set of vectors {v1, v2, ..., vk} where vi · vj = 0 for all i not equal to j.
Orthonormal Set: An orthogonal set where every vector has unit length: ||vi|| = 1.
Worked Example 6
S = {(1, 0, 0), (0, 1, 0), (0, 0, 1)} -- the standard basis. Every pair has dot product 0, and each has length 1. This is orthonormal.
S = {(1, 1, 0), (-1, 1, 0), (0, 0, 3)}. Check: (1,1,0)·(-1,1,0) = -1+1 = 0. (1,1,0)·(0,0,3) = 0. (-1,1,0)·(0,0,3) = 0. Orthogonal but not orthonormal (lengths are sqrt(2), sqrt(2), and 3).
Key Property: An orthogonal set of nonzero vectors is automatically linearly independent. This makes orthogonal bases especially useful.
Coordinates in an Orthogonal Basis
If {v1, ..., vn} is an orthogonal basis, then any vector x can be written as:
No row reduction needed! For an orthonormal basis, this simplifies to x = (x · v1)v1 + (x · v2)v2 + ... + (x · vn)vn.
Worked Example 7
Orthogonal basis: v1 = (1, 1), v2 = (1, -1). Express x = (5, 3).
c1 = (x · v1)/(v1 · v1) = (5+3)/2 = 4. c2 = (x · v2)/(v2 · v2) = (5-3)/2 = 1.
x = 4(1,1) + 1(1,-1) = (4,4) + (1,-1) = (5, 3). Correct.
Check Your Understanding
1. Compute (2, -3, 1) · (1, 4, -2).
2. Find the length of v = (1, -2, 2, 0).
3. Are (3, -1) and (1, 3) orthogonal?
4. Find the angle between u = (1, 0) and v = (1, 1).
Key Takeaways
- Dot product: u · v = u1v1 + u2v2 + ... + unvn = u^T v
- Length: ||u|| = sqrt(u · u); unit vector: u/||u||
- Orthogonal: u ⊥ v iff u · v = 0
- Cauchy-Schwarz: |u · v| ≤ ||u|| ||v||
- Orthogonal sets are automatically linearly independent
- Coordinates in an orthogonal basis require only dot products -- no row reduction