Learn Without Walls
← Module 4 HomeLesson 1 of 4Next Lesson →

Lesson 1: Vectors in R^n

Estimated time: 35-45 minutes

Learning Objectives

Vectors in R^n

Vector in R^n: An ordered list of n real numbers, written as a column: v = (v_1, v_2, ..., v_n). R^n is the set of all such vectors. R^2 is the plane, R^3 is 3D space.

Vector Operations:

  • Addition: u + v = (u_1+v_1, u_2+v_2, ..., u_n+v_n)
  • Scalar multiplication: cv = (cv_1, cv_2, ..., cv_n)

Example

u = (1, -2, 3), v = (4, 0, -1).

u + v = (5, -2, 2). 3u = (3, -6, 9). u - 2v = (1-8, -2-0, 3+2) = (-7, -2, 5).

The Dot Product

Dot Product: u . v = u_1 v_1 + u_2 v_2 + ... + u_n v_n. The result is a scalar (a number), not a vector.

Example

u = (1, -2, 3), v = (4, 0, -1). u . v = 1(4) + (-2)(0) + 3(-1) = 4 + 0 - 3 = 1.

Properties of the Dot Product:

  • u . v = v . u (commutative)
  • u . (v + w) = u . v + u . w (distributive)
  • (cu) . v = c(u . v)
  • u . u ≥ 0, and u . u = 0 if and only if u = 0

Length and Unit Vectors

Length (Norm): ||v|| = sqrt(v . v) = sqrt(v_1^2 + v_2^2 + ... + v_n^2).

Unit Vector: A vector with length 1. To normalize v: v_hat = v / ||v||.

Example

v = (3, 4). ||v|| = sqrt(9 + 16) = sqrt(25) = 5. Unit vector: (3/5, 4/5).

Orthogonality

Orthogonal Vectors: Two vectors u and v are orthogonal if u . v = 0.

Example

u = (1, 2), v = (4, -2). u . v = 4 - 4 = 0. So u and v are orthogonal (perpendicular).

Check Your Understanding

1. Compute (2, -1, 3) . (1, 4, -2).

Answer: 2(1) + (-1)(4) + 3(-2) = 2 - 4 - 6 = -8.

2. Find ||(-3, 4)||.

Answer: sqrt(9 + 16) = sqrt(25) = 5.

3. Are (1, 1, 1) and (1, -2, 1) orthogonal?

Answer: Dot product = 1 - 2 + 1 = 0. Yes, they are orthogonal.

4. Normalize the vector (1, 2, 2).

Answer: ||v|| = sqrt(1+4+4) = 3. Unit vector = (1/3, 2/3, 2/3).

Key Takeaways