§ 01What Is a Vector?
A vector is a quantity with both magnitude and direction, but the deeper definition is purely algebraic: a vector is any object that can be added to another and scaled by a number, provided those operations follow eight specific rules.
In elementary courses, vectors appear as arrows in the plane or in three-dimensional space. An arrow from the origin to the point (3, 2) is the vector v = (3, 2): it points 3 units right and 2 units up, and its length encodes how "large" it is. This geometric picture is the right place to start, but it is only one instance of a vastly more general idea.
Algebraically, a vector in ℝⁿ is an ordered list of n real numbers, written as a column:
The superscript T denotes the transpose: turning a row list into a column. In ℝ² and ℝ³ these correspond directly to points in the plane and in space.
Identify the geometric position of each vector and state its dimension.
- u = (3, −2): a point in the plane ℝ², 3 units right and 2 units down from the origin. Dimension: 2.
- v = (1, 0, 4): a point in space ℝ³, 1 unit along x, 0 along y, 4 along z. Dimension: 3.
- w = (0, 0), the zero vector in ℝ². It has no direction and zero magnitude; it sits at the origin.
§ 02Vector Operations — Addition and Scalar Multiplication
Two operations are fundamental: adding two vectors and multiplying a vector by a scalar (a real number). Both operate component-by-component, and both have vivid geometric interpretations.
Geometrically: place v at the tip of u. The resultant vector runs from the origin to the new tip, the parallelogram law.
Geometrically: stretches or shrinks the vector by factor |c|; if c < 0, the direction reverses. c = 0 gives the zero vector.
Order of addition does not matter, parallelogram has the same diagonal either way.
Grouping of addition is irrelevant: the tip-to-tail chain arrives at the same point.
Adding the zero vector leaves any vector unchanged. 0 is the additive identity.
Every vector has a negative: −v = (−v₁, …, −vₙ). Together they cancel to zero.
Scaling distributes over vector addition.
A sum of scalars distributes over a single vector.
Scaling by c then d is the same as scaling by cd at once.
Multiplying by 1 leaves the vector unchanged. The scalar 1 is the multiplicative identity.
These eight axioms are not just properties of ℝⁿ: they are the definition of a vector space. Any set of objects that satisfies all eight forms a vector space, regardless of whether those objects look like arrows.
Let u = (2, −1, 3) and v = (0, 4, −2). Compute 3u − 2v.
- 3u = (6, −3, 9)
- 2v = (0, 8, −4)
- 3u − 2v = (6−0, −3−8, 9−(−4)) = (6, −11, 13)
A unit vector has magnitude 1. To normalise v = (3, 4), divide by its magnitude.
- |v| = √(3² + 4²) = √(9 + 16) = √25 = 5
- v̂ = v / |v| = (3/5, 4/5)
- Verify: |(3/5, 4/5)| = √(9/25 + 16/25) = √1 = 1 ✓
§ 03The Dot Product — Measuring Alignment
The dot product (also called the scalar product or inner product) takes two vectors of the same length and returns a single number. It is the key tool for measuring angles, projections, and orthogonality.
Multiply corresponding components and sum. The result is a scalar, not a vector.
Where θ is the angle between u and v (0 ≤ θ ≤ π). Both definitions always agree.
Key Geometric Consequences
The geometric form reveals the dot product's power as a measuring tool:
Two vectors are perpendicular if and only if their dot product is zero. This is the most important special case.
The squared length of a vector equals its dot product with itself: |v| = √(v · v). No Pythagorean theorem needed separately.
Rearranging the geometric formula. θ = 90° if dot product is 0; θ is acute if positive; obtuse if negative.
The vector projection of u onto v, how much of u lies in the direction of v. Scalar projection = u·v̂ = u·v / |v|.
Let u = (1, 2, 2) and v = (3, 0, −1). Find u · v and the angle between them.
- u · v = 1·3 + 2·0 + 2·(−1) = 3 + 0 − 2 = 1
- |u| = √(1+4+4) = √9 = 3
- |v| = √(9+0+1) = √10
- cos θ = 1 / (3√10) ≈ 1/9.487 ≈ 0.1054
- θ = arccos(0.1054) ≈ 83.95°
Let u = (4, 2, −1) and v = (1, 0, 4). Are they orthogonal? If not, find the projection of u onto v.
- u · v = 4·1 + 2·0 + (−1)·4 = 4 + 0 − 4 = 0
- Since u · v = 0, the vectors are orthogonal (perpendicular).
- Therefore proj_v u = (0 / |v|²) v = 0: the zero vector. None of u lies in the direction of v.
§ 04The Cross Product — A Vector Perpendicular to Both
The cross product is defined only in ℝ³. Unlike the dot product, which returns a scalar, the cross product of two vectors returns a new vector that is perpendicular to both inputs.
Computed as the formal determinant expansion of a 3×3 matrix with standard basis vectors i, j, k in the first row.
| Property | Formula | Meaning |
|---|---|---|
| Anti-commutativity | u × v = −(v × u) | Swapping inputs reverses direction of result |
| Magnitude | |u × v| = |u||v| sin θ | Equals the area of the parallelogram spanned by u and v |
| Self-cross | v × v = 0 | Any vector crossed with itself is the zero vector |
| Orthogonality | (u × v) · u = 0 | The result is always perpendicular to both u and v |
| Distributivity | u × (v + w) = u×v + u×w | Cross product distributes over addition |
| Right-hand rule | Point fingers from u toward v | Thumb points in direction of u × v |
Let u = (1, 2, 3) and v = (4, 5, 6). Find u × v and verify it is perpendicular to both.
- Component 1: u₂v₃ − u₃v₂ = 2·6 − 3·5 = 12 − 15 = −3
- Component 2: u₃v₁ − u₁v₃ = 3·4 − 1·6 = 12 − 6 = 6
- Component 3: u₁v₂ − u₂v₁ = 1·5 − 2·4 = 5 − 8 = −3
- So u × v = (−3, 6, −3).
- Verify: (u × v) · u = −3·1 + 6·2 + (−3)·3 = −3 + 12 − 9 = 0 ✓
- Verify: (u × v) · v = −3·4 + 6·5 + (−3)·6 = −12 + 30 − 18 = 0 ✓
§ 05Vector Spaces — The Abstract Framework
A vector space over ℝ is a set V equipped with two operations, addition and scalar multiplication, that satisfy the eight axioms listed in § 02. The elements of V are called vectors, even if they are not arrows.
The power of the vector space concept is that it applies to many different kinds of mathematical objects simultaneously. All of the following are vector spaces:
| Set V | Vectors are… | Dimension |
|---|---|---|
| ℝⁿ | n-tuples of real numbers | n |
| Pₙ | Polynomials of degree ≤ n | n + 1 |
| M_{m×n} | All m×n real matrices | m·n |
| C[a,b] | Continuous functions on [a,b] | ∞ |
| {0} | Just the zero vector | 0 |
§ 06Subspaces — Vector Spaces Inside Vector Spaces
A subspace of a vector space V is a subset H ⊆ V that is itself a vector space under the same operations. Rather than verifying all eight axioms, there is a three-condition shortcut: because most axioms are inherited automatically from V.
The zero vector 0 must be in H. This immediately rules out any "shifted" plane or line that doesn't pass through the origin.
If u ∈ H and v ∈ H, then u + v ∈ H. Adding two elements of H must stay inside H: the set cannot "leak out" under addition.
If v ∈ H and c ∈ ℝ, then cv ∈ H. Scaling any element of H must keep it in H, stretching or shrinking cannot escape the subspace.
Let H = {(x, 2x) : x ∈ ℝ}, this is a line through the origin with slope 2.
- Zero vector: (0, 2·0) = (0, 0) ∈ H. ✓
- Closure under addition: Take (a, 2a) and (b, 2b) in H. Their sum: (a+b, 2a+2b) = (a+b, 2(a+b)) ∈ H. ✓
- Closure under scaling: Take (a, 2a) ∈ H and scalar c. Then c(a, 2a) = (ca, 2ca) = (ca, 2(ca)) ∈ H. ✓
H = {(x, y) : xy ≥ 0}: pairs where x and y have the same sign (or one is zero).
- Zero vector: (0)(0) = 0 ≥ 0. ✓
- Closure under scaling: If xy ≥ 0 and c ∈ ℝ, then (cx)(cy) = c²(xy) ≥ 0. ✓
- Closure under addition: Take u = (2, 1), product 2 ≥ 0 ✓, and v = (−1, 3), product −3 < 0... actually v ∉ H. Try u = (1, 2) and v = (−2, 1): uv products are 2 and −2, so v ∉ H either. Let's use u = (3, 1) and v = (−1, 2): products are 3 ≥ 0 ✓ and −2 < 0 ✗: v ∉ H, so the sum test doesn't apply cleanly. Take instead u = (2, 1) and v = (1, −3). 2·1 = 2 ≥ 0 ✓; 1·(−3) = −3 < 0. v ∉ H. For a valid test, pick u = (1, 2) and w = (2, −1): 1·2=2 ≥ 0 ✓, 2·(−1) = −2 < 0, so w ∉ H. We need both in H. Use u = (2, 3) and v = (−1, −2): products 6 ≥ 0 ✓ and 2 ≥ 0 ✓. Sum: (1, 1): product 1 ≥ 0 ✓. Try u = (1, 2) and v = (−3, −1): products 2 ≥ 0 and 3 ≥ 0. Sum = (−2, 1), product = −2 < 0. ✗ Fails!
- Since (1,2) + (−3,−1) = (−2, 1) ∉ H, closure under addition fails.
§ 07Linear Combinations, Span, and Basis
Linear Combinations
A linear combination of vectors v₁, v₂, …, vₖ is any vector of the form:
Where c₁, c₂, …, cₖ are arbitrary scalars. The result is always a single vector in the same space.
The Span
The span of a set of vectors {v₁, …, vₖ} is the set of ALL possible linear combinations. It is the smallest subspace containing all the listed vectors:
The span of a single non-zero vector is a line. The span of two non-parallel vectors in ℝ³ is a plane through the origin.
Linear Independence
Vectors v₁, …, vₖ are linearly independent if the only solution to c₁v₁ + … + cₖvₖ = 0 is c₁ = c₂ = … = cₖ = 0. If any non-trivial solution exists, the vectors are linearly dependent, at least one is redundant, expressible as a combination of the others.
Basis and Dimension
A basis of a vector space V is a set of vectors that is both linearly independent and spans V. Every basis of the same vector space has exactly the same number of vectors: this number is the dimension of V.
The standard basis vectors are the columns of the n×n identity matrix. They are orthogonal unit vectors and form the natural coordinate system for ℝⁿ.
Are v₁ = (1, 0, 1), v₂ = (2, 1, 0), v₃ = (0, 1, −2) linearly independent?
- Set c₁v₁ + c₂v₂ + c₃v₃ = 0 and solve for c₁, c₂, c₃.
- This gives the system: c₁ + 2c₂ = 0; c₂ + c₃ = 0; c₁ − 2c₃ = 0.
- From equation 1: c₁ = −2c₂. From equation 2: c₃ = −c₂. Sub into equation 3: −2c₂ − 2(−c₂) = −2c₂ + 2c₂ = 0 ✓ for all c₂.
- The system has infinitely many solutions, take c₂ = 1: c₁ = −2, c₃ = −1. Then −2v₁ + v₂ − v₃ = 0.
Write w = (5, 3) as a linear combination of e₁ = (1, 0) and e₂ = (0, 1).
- We need c₁(1,0) + c₂(0,1) = (5,3).
- Matching components: c₁ = 5, c₂ = 3.
- So w = 5e₁ + 3e₂.
Describe span{(1, 0, 2), (0, 1, −1)} geometrically.
- These two vectors are clearly not parallel (neither is a scalar multiple of the other).
- Their span is all vectors c₁(1,0,2) + c₂(0,1,−1) = (c₁, c₂, 2c₁−c₂) for c₁, c₂ ∈ ℝ.
- Setting z = 2x − y (where x = c₁, y = c₂, z = 2c₁−c₂), the span satisfies the equation z = 2x − y, i.e., 2x − y − z = 0.
- This is a plane through the origin in ℝ³ with normal vector (2, −1, −1).
Does B = {(1, 1), (1, −1)} form a basis for ℝ²?
- Linear independence: c₁(1,1) + c₂(1,−1) = (0,0) gives c₁+c₂ = 0 and c₁−c₂ = 0. Adding: 2c₁ = 0, so c₁ = 0, then c₂ = 0. Only the trivial solution, independent ✓
- Spans ℝ²: Two linearly independent vectors in ℝ² automatically span all of ℝ². ✓
- Expressing (3, 7) in this basis: c₁+c₂ = 3 and c₁−c₂ = 7. Solving: c₁ = 5, c₂ = −2.
§ 08Common Mistakes
§ 09Practice Quiz — Vectors and Vector Spaces
- 2v = (8, 0, −2)
- u + 2v = (1+8, −3+0, 2+(−2)) = (9, −3, 0)
- Second component = −3.
- |v| = √(3² + (−4)²) = √(9 + 16) = √25 = 5.
- u · v = 2·4 + 3·(−1) = 8 − 3 = 5.
- From u · v = |u||v|cosθ, orthogonality means θ = 90°, so cosθ = 0, giving u · v = 0.
- x + y = 1 does not contain (0,0) since 0 + 0 = 0 ≠ 1. Condition ① fails immediately.
- A line not through the origin is never a subspace.
- First component of u×v: u₂v₃ − u₃v₂ = 2·3 − 0·1 = 6 − 0 = 6.
- Full cross product: (6, 0·0−1·3, 1·1−2·0) = (6, −3, 1).
- Every basis for ℝⁿ has exactly n vectors, this is the definition of dimension.
- ℝ⁵ has dimension 5, so every basis contains exactly 5 vectors.
- v₂ = (2,4) = 2·(1,2) = 2v₁. So the non-trivial combination 2v₁ − v₂ = 0 exists.
- They are linearly dependent, and their span is only a line, not all of ℝ².
- |v| = √(0² + 5²) = 5.
- v̂ = v/|v| = (0/5, 5/5) = (0, 1).
- Second component = 1.
- span{v} = {cv : c ∈ ℝ}, all scalar multiples of v.
- Geometrically, this is the line through the origin in the direction of v. It is a 1-dimensional subspace of ℝ³.
Keep practising!