Vectors: Introduction & Geometric Intuition
3089 words
15 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Vectors: Introduction & Geometric Intuition ## 🎯 Learning Objectives After this topic you will be able to: - Visualise a vector as a directed arrow in 2D/3D and interpret it as an $n$\-tuple of real numbers - Add vectors geometrically (tip-to-tail) and algebraically component-wise - Multiply a vector by a scalar...

Vectors: Introduction & Geometric Intuition
🎯 Learning Objectives
After this topic you will be able to:
- Visualise a vector as a directed arrow in 2D/3D and interpret it as an n-tuple of real numbers
- Add vectors geometrically (tip-to-tail) and algebraically component-wise
- Multiply a vector by a scalar and explain how it stretches or flips the arrow
- Compute the dot product of two vectors in Rn and use it to find the angle between them
- Compute the cross product of two vectors in R3 and interpret it geometrically
- Decompose a vector into components parallel and perpendicular to another vector
📋 Prerequisites
- Basic algebra: arithmetic with real numbers, solving simple equations
- Coordinate geometry (from BSMA1001): plotting points (x,y) in the plane
- This topic builds your geometric intuition for everything that follows in the course
1. What is a Vector?
1.1 Intuition: The Displacement Arrow
Imagine you are standing at a street corner. You walk 3 steps east and then 4 steps north. Where do you end up? The "3 steps east, 4 steps north" is a vector — it carries magnitude (5 steps, as the crow flies) and direction (north-east).
Every vector has two ingredients:
- Magnitude (length) — how far
- Direction — which way In mathematics we represent this idea in two equivalent ways:
- Geometric arrow — a directed line segment from a starting point A to an ending point B, written AB
- Algebraic n-tuple — an ordered list of numbers, e.g. (3,4) in the plane or (3,4,−2) in 3D space The same vector can appear anywhere in space — translating it does not change it. Only its length and orientation matter.
1.2 Formal Definition
>v=(v1,v2,…,vn)orv=v1v2⋮vn>Definition (Vector in Rn). A vector is an ordered n-tuple of real numbers
where each vi∈R. The set of all such n-tuples is Rn. The first notation (row vector) and second (column vector) are both common. In this course we mostly use column vectors for matrix multiplication compatibility. Key symbols and terminology:
| Symbol | Meaning | Example |
|---|---|---|
| v | a vector (bold lowercase) | v=(1,−2,5) |
| vi | the i -th component (coordinate) | v2=−2 |
| Rn | n -dimensional Euclidean space | R2 = the plane |
| 0 | the zero vector (0,0,…,0) | (0,0) in R2 |
1.3 Geometric Representation
(Diagram)
A vector v=(v1,v2) in R2 is drawn as an arrow from the origin to the point (v1,v2). Its length (magnitude) is:
For v=(3,4):
In R3, v=(v1,v2,v3) has length v12+v22+v32.
2. Vector Operations
2.1 Scalar Multiplication
Multiplying a vector v by a scalar (real number) c changes its length but not its direction (unless c is negative, which also flips the direction).
Geometric effect:
- c>1: stretches the arrow
- 0<c<1: shrinks the arrow
- c=0: collapses to the zero vector
- c<0: flips the arrow to point opposite (and stretches/shrinks by ∣c∣)
>2v=(4,−2,6),21v=(1,−21,23),−3v=(−6,3,−9)>Example 1: Scalar multiplicationLet v=(2,−1,3).
2.2 Vector Addition (and Subtraction)
Add two vectors component-wise:
Geometric intuition: place the tail of w at the head of v; the sum is the arrow from the tail of v to the head of w (the tip-to-tail rule).
(Diagram)
>v+w=(1+3,2+(−1),−1+4)=(4,1,3)>Example 2: Vector additionv=(1,2,−1), w=(3,−1,4)
Subtraction: v−w=v+(−w)=(1−3,2−(−1),−1−4)=(−2,3,−5)
2.3 Properties of Vector Operations
These properties hold for all vectors u,v,w∈Rn and scalars a,b∈R:
| Property | Addition | Scalar Multiplication |
|---|---|---|
| Commutativity | u+v=v+u | — |
| Associativity | (u+v)+w=u+(v+w) | (ab)v=a(bv) |
| Identity | v+0=v | 1v=v |
| Inverse | v+(−v)=0 | — |
| Distributive | (a+b)v=av+bv | a(u+v)=au+av |
These eight rules form the axioms of a vector space — we will meet them again in Week 3.
3. Dot Product (Inner Product)
3.1 Intuition: How Much Do Two Vectors Align?
The dot product measures alignment. Two vectors pointing in roughly the same direction have a positive dot product; opposite directions give a negative dot product; perpendicular vectors give zero.
3.2 Definition
>u⋅v=u1v1+u2v2+⋯+unvn=i=1∑nuivi>Definition (Dot Product). For u=(u1,…,un) and v=(v1,…,vn) in Rn,
The result is a scalar (a real number), not a vector.
3.3 Relationship to Magnitude
The dot product of a vector with itself gives the squared length:
>u⋅v=2(1)+(−1)(4)+3(−2)=2−4−6=−8>Example 3: Dot productu=(2,−1,3), v=(1,4,−2)
∥u∥=22+(−1)2+32=4+1+9=14Check: u⋅u=4+1+9=14=(14)2 ✓
3.4 Geometric Formula and the Angle Between Vectors
The dot product relates to the angle θ between two vectors:
Therefore:
>u⋅v∥u∥∥v∥cosθθ=1(0)+0(1)+1(1)=1=1+0+1=2=0+1+1=2=221=21=cos−1(21)=3π=60∘>Example 4: Angle between two vectorsFind the angle between u=(1,0,1) and v=(0,1,1).
3.5 Orthogonal (Perpendicular) Vectors
Two vectors are orthogonal (perpendicular) when u⋅v=0.
This is because cos(90∘)=0, so u⋅v=∥u∥∥v∥⋅0=0.
Example 5: Orthogonal vectorsu=(1,2,−3), v=(4,1,2)u⋅v=1(4)+2(1)+(−3)(2)=4+2−6=0 ✓Therefore u⊥v.
3.6 Properties of the Dot Product
| Property | Formula |
|---|---|
| Commutativity | u⋅v=v⋅u |
| Linearity | u⋅(av+bw)=a(u⋅v)+b(u⋅w) |
| Positive definiteness | v⋅v≥0 , and =0 only when v=0 |
| Cauchy-Schwarz | $ |
4. Cross Product (in ℝ³)
4.1 Intuition: The Perpendicular Area Vector
While the dot product tells us how much two vectors align, the cross product produces a third vector perpendicular to both. Its magnitude equals the area of the parallelogram spanned by the two input vectors.
4.2 Definition
>u×v=(u2v3−u3v2,u3v1−u1v3,u1v2−u2v1)>Definition (Cross Product). For u=(u1,u2,u3) and v=(v1,v2,v3) in R3,
u×v=iu1v1ju2v2ku3v3The result is a vector in R3 (unlike the dot product). A handy mnemonic using a determinant:
where i,j,k are the standard basis vectors (1,0,0), (0,1,0), (0,0,1).
4.3 Geometric Interpretation
- Direction: u×v is perpendicular to both u and v (right-hand rule)
- Magnitude: ∥u×v∥=∥u∥∥v∥sinθ = area of parallelogram (Diagram)
>u×v=(2⋅6−3⋅5,3⋅4−1⋅6,1⋅5−2⋅4)=(12−15,12−6,5−8)=(−3,6,−3)>Example 6: Cross productu=(1,2,3), v=(4,5,6)
Check orthogonality: u⋅(u×v)=1(−3)+2(6)+3(−3)=−3+12−9=0 ✓v⋅(u×v)=4(−3)+5(6)+6(−3)=−12+30−18=0 ✓
4.4 Properties of Cross Product
| Property | Formula |
|---|---|
| Anti-commutativity | u×v=−(v×u) |
| Linearity | u×(av+bw)=a(u×v)+b(u×w) |
| Scalar triple product | u⋅(v×w)=det[uvw] (volume) |
| Self cross | v×v=0 |
5. Vector Projection
5.1 Intuition: How Much of v Points in the Direction of u?
Projection decomposes a vector v into two parts: one parallel to u and one perpendicular to u.
5.2 Formula
The scalar projection (component) of v onto u is:
The vector projection of v onto u is:
The perpendicular component is:
>v⋅u∥u∥2projuvv⊥=3(1)+1(2)+(−2)(2)=3+2−4=1=12+22+22=1+4+4=9=91(1,2,2)=(91,92,92)=(3,1,−2)−(91,92,92)=(926,97,−920)>Example 7: ProjectionFind the projection of v=(3,1,−2) onto u=(1,2,2).
6. Edge Cases & Gotchas
| Situation | What Happens | Why It Matters |
|---|---|---|
| **Zero vector 0 ** | Has no direction, length 0 | Dot product with anything is 0; cross product with anything is 0 |
| Division by zero in angle formula | If $\ | \mathbf{u}\ |
| **Cross product only in R3 ** | The 3D cross product does not exist in R2 or Rn for n=3 | In R2 , use the determinant or the "perp dot product" u1v2−u2v1 |
| Vectors vs. points | A vector is a displacement, not a location | The same vector can be drawn anchored anywhere |
7. Common Pitfalls
❌ Pitfall 1: Adding vectors of different dimensions
You cannot add (1,2,3)+(4,5) — dimensions must match.
❌ Pitfall 2: Dot product produces a scalar
u⋅v is a number, not a vector. A common mistake is writing u⋅v=(u1v1,u2v2,…) — that is the Hadamard (element-wise) product, not the dot product.
❌ Pitfall 3: Confusing projection formulas
Scalar projection: ∥u∥v⋅u (a scalar). Vector projection: ∥u∥2v⋅uu (a vector). The difference is dividing by ∥u∥ vs. ∥u∥2.
8. Formula Summary Table
| Concept | Formula | Notes |
|---|---|---|
| Magnitude | $\ | \mathbf{v}\ |
| Dot product | u⋅v=∑uivi | Result is a scalar |
| Angle | $\cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{\ | \mathbf{u}\ |
| Orthogonality | u⋅v=0 | Perpendicular vectors |
| Cross product (ℝ³) | u×v=(u2v3−u3v2,…) | Result is a vector |
| Projection | $\text{proj}_{\mathbf{u}} \mathbf{v} = \frac{\mathbf{v} \cdot \mathbf{u}}{\ | \mathbf{u}\ |
| Cauchy-Schwarz | $ | \mathbf{u} \cdot \mathbf{v} |
9. 📝 Practice Questions
>2u=(4,−2,6),3v=(0,12,−6)>Q1: Basic operationsLet u=(2,−1,3) and v=(0,4,−2). Compute: (a) 2u−3v (b) u⋅v (c) u×vStrategy: Work component-wise for (a), use sum of products for (b), use determinant formula for (c).Solution (a):
>2u−3v=(4−0,−2−12,6−(−6))=(4,−14,12)>
>u⋅v=2(0)+(−1)(4)+3(−2)=0−4−6=−10>Solution (b):
>u×v=((−1)(−2)−3(4),3(0)−2(−2),2(4)−(−1)(0))=(2−12,0+4,8−0)=(−10,4,8)>Solution (c):
>u⋅v=1(1)+1(0)+1(2)=3>Q2: Angle between vectorsFind the angle between u=(1,1,1) and v=(1,0,2).Strategy: Use cosθ=∥u∥∥v∥u⋅v.Solution:
>∥u∥=1+1+1=3,∥v∥=1+0+4=5>
>cosθ=353=153≈0.7746>
>θ=cos−1(153)≈39.2∘>
>u⋅v=2(3)+(−1)(2)+4(−1)=6−2−4=0>Q3: Orthogonality testAre u=(2,−1,4) and v=(3,2,−1) orthogonal?Strategy: Compute dot product. If zero, they are orthogonal.Solution:
>v⋅u=4(2)+1(−1)+(−2)(3)=8−1−6=1>Yes, they are orthogonal. Q4: Vector projectionFind the vector projection of v=(4,1,−2) onto u=(2,−1,3).Strategy: Use projuv=∥u∥2v⋅uu.Solution:
>∥u∥2=4+1+9=14>
>projuv=141(2,−1,3)=(71,−141,143)>
>u×v=(0(1)−2(3),2(0)−1(1),1(3)−0(0))=(−6,−1,3)>Q5: Cross product areaFind the area of the parallelogram spanned by u=(1,0,2) and v=(0,3,1).Strategy: Area = ∥u×v∥.Solution:
>Area=(−6)2+(−1)2+32=36+1+9=46>
>∥v∥=4+4+1=9=3>Q6: Unit vectorFind a unit vector in the direction of v=(2,−2,1).Strategy: Divide the vector by its magnitude.Solution:
>v^=∥v∥v=(32,−32,31)>
>∥u−v∥2=1+1−2(21)=2−1=1>Q7: Dot product propertiesIf u and v are unit vectors and u⋅v=21, find ∥u−v∥.Strategy: Use ∥u−v∥2=(u−v)⋅(u−v)=∥u∥2+∥v∥2−2u⋅v.Solution:
>∥u−v∥=1>
>w=(2(4)−(−1)(0),(−1)(3)−1(4),1(0)−2(3))=(8−0,−3−4,0−6)=(8,−7,−6)>Q8: Finding a perpendicular vectorFind a vector w in R3 that is perpendicular to both u=(1,2,−1) and v=(3,0,4).Strategy: Use the cross product w=u×v.Solution:
>b×c=(2(3)−0(1),0(1)−0(3),0(1)−2(1))=(6,0,−2)>Check: u⋅w=1(8)+2(−7)+(−1)(−6)=8−14+6=0 ✓ Q9: Scalar triple productFind the volume of the parallelepiped spanned by a=(1,0,0), b=(0,2,0), c=(1,1,3).Strategy: Volume = ∣a⋅(b×c)∣.Solution:
>a⋅(b×c)=1(6)+0(0)+0(−2)=6>
>Volume=∣6∣=6>
>v⋅u=5+2+1=8,∥u∥2=3>Q10: DecompositionDecompose v=(5,2,1) into components parallel and perpendicular to u=(1,1,1).Strategy: Compute v∥=projuv, then v⊥=v−v∥.Solution:
>v∥=38(1,1,1)=(38,38,38)>
>v⊥=(5−38,2−38,1−38)=(37,−32,−35)>
Check: v∥⋅v⊥=38⋅37+38⋅(−32)+38⋅(−35)=956−16−40=0 ✓
🔗 Cross-References
- Next topic: Matrices Introduction — matrices as arrays of vectors
- BSMA1001 (Maths 1): Review coordinate geometry and basic algebra
- Week 7 (Inner Products): Generalises the dot product to abstract vector spaces
- Week 3 (Vector Spaces): The eight axioms formalise what we've seen here
- BSCS2004 (ML Foundations): Vectors are the data representation in ML Join Discord Next1.2 Matrices Introduction