PGD01C01
Module 4 · Vectors and Geometry of Space

Vectors in Space

Core Titles
Key headlines and terms for quick recall
  • Vector — magnitude + direction
  • Position vector OP⃗\vec{OP}
  • Components v⃗=⟨a,b,c⟩\vec{v} = \langle a, b, c \rangle or ai^+bj^+ck^a\hat{i} + b\hat{j} + c\hat{k}
  • Magnitude ∥v⃗∥=a2+b2+c2\|\vec{v}\| = \sqrt{a^2 + b^2 + c^2}
  • Unit vector v^=v⃗/∥v⃗∥\hat{v} = \vec{v} / \|\vec{v}\|
  • Standard basis i^,j^,k^\hat{i}, \hat{j}, \hat{k}
  • Vector addition, Scalar multiplication
Basic Idea
What it is, why it matters, how it works

Scalars vs vectors

A scalar has only magnitude (e.g., temperature, mass). A vector has both magnitude and direction (e.g., velocity, force).

Representing a vector in 3D

A vector v⃗\vec{v} in R3\mathbb{R}^3 is written: v⃗=⟨a,b,c⟩=ai^+bj^+ck^\vec{v} = \langle a, b, c \rangle = a \hat{i} + b \hat{j} + c \hat{k} where i^,j^,k^\hat{i}, \hat{j}, \hat{k} are the standard unit vectors along the x,y,zx, y, z axes.

The position vector of a point P(x,y,z)P(x, y, z) is OP⃗=⟨x,y,z⟩\vec{OP} = \langle x, y, z \rangle.

Magnitude

∥v⃗∥=a2+b2+c2\|\vec{v}\| = \sqrt{a^2 + b^2 + c^2}

Unit vector

A vector of magnitude 1 in the same direction: v^=v⃗∥v⃗∥\hat{v} = \frac{\vec{v}}{\|\vec{v}\|}

Operations

  • Addition: u⃗+v⃗=⟨u1+v1,u2+v2,u3+v3⟩\vec{u} + \vec{v} = \langle u_1 + v_1, u_2 + v_2, u_3 + v_3 \rangle (component-wise; parallelogram law geometrically).
  • Scalar multiplication: kv⃗=⟨kv1,kv2,kv3⟩k \vec{v} = \langle k v_1, k v_2, k v_3 \rangle — scales magnitude, reverses direction if k<0k < 0.

Vector from one point to another

AB⃗=OB⃗−OA⃗=⟨b1−a1,b2−a2,b3−a3⟩\vec{AB} = \vec{OB} - \vec{OA} = \langle b_1 - a_1, b_2 - a_2, b_3 - a_3 \rangle.

Why this matters in Data Science

A datapoint with nn features is a vector in Rn\mathbb{R}^n. All ML operations are vector operations: distance, dot product, projection.

Mind Map
Visual structure of the concept
VECTORS IN SPACE
├── Definition: magnitude + direction
├── Components ⟨a, b, c⟩  =  aî + bĵ + ck̂
├── Magnitude ‖v‖ = √(a² + b² + c²)
├── Unit vector v̂ = v / ‖v‖
├── Standard basis î, ĵ, k̂
└── Operations
    ├── Addition  (component-wise)
    ├── Scalar mult.  kv
    └── Vector from A to B  =  ⟨b₁−a₁, b₂−a₂, b₃−a₃⟩
Exam Q&A
Part A (2 marks) and Part B (20 marks) style questions

Part A (2 marks each)

Q1. Define a position vector. The vector from the origin OO to the point PP, denoted OP⃗\vec{OP}.

Q2. Find a unit vector in the direction of v⃗=⟨1,2,2⟩\vec{v} = \langle 1, 2, 2 \rangle. ∥v⃗∥=1+4+4=3\|\vec{v}\| = \sqrt{1+4+4} = 3, so v^=⟨1/3,2/3,2/3⟩\hat{v} = \langle 1/3, 2/3, 2/3 \rangle.

Q3. If A(1,2,3)A(1,2,3) and B(4,6,3)B(4,6,3), find AB⃗\vec{AB} and its magnitude. AB⃗=⟨3,4,0⟩\vec{AB} = \langle 3, 4, 0 \rangle, ∥AB⃗∥=9+16=5\|\vec{AB}\| = \sqrt{9 + 16} = 5.

Q4. State the parallelogram law of vector addition. If two vectors are represented by adjacent sides of a parallelogram from a common point, their sum is the diagonal of the parallelogram.


Part B (20 marks)

Q. Define vectors in space. Derive magnitude and unit vector. Given a⃗=2i^−3j^+k^\vec{a} = 2\hat{i} - 3\hat{j} + \hat{k} and b⃗=−i^+4j^−2k^\vec{b} = -\hat{i} + 4\hat{j} - 2\hat{k}, find (i) a⃗+b⃗\vec{a} + \vec{b}, (ii) ∣a⃗−b⃗∣|\vec{a} - \vec{b}|, (iii) the unit vector along 2a⃗−b⃗2\vec{a} - \vec{b}.

Definitions. A vector in R3\mathbb{R}^3 has both magnitude and direction. Written as v⃗=ai^+bj^+ck^\vec{v} = a\hat{i} + b\hat{j} + c\hat{k}.

Magnitude: ∥v⃗∥=a2+b2+c2\|\vec{v}\| = \sqrt{a^2 + b^2 + c^2} — Pythagoras in 3D.

Unit vector: v^=v⃗∥v⃗∥\hat{v} = \dfrac{\vec{v}}{\|\vec{v}\|}. Always has magnitude 1.

Computations.

(i) Sum. a⃗+b⃗=(2−1)i^+(−3+4)j^+(1−2)k^=i^+j^−k^\vec{a} + \vec{b} = (2-1)\hat{i} + (-3+4)\hat{j} + (1-2)\hat{k} = \hat{i} + \hat{j} - \hat{k}.

(ii) Difference. a⃗−b⃗=3i^−7j^+3k^\vec{a} - \vec{b} = 3\hat{i} - 7\hat{j} + 3\hat{k}. Magnitude: 9+49+9=67\sqrt{9 + 49 + 9} = \sqrt{67}.

(iii) Unit vector along 2a⃗−b⃗2\vec{a} - \vec{b}. 2a⃗=4i^−6j^+2k^2\vec{a} = 4\hat{i} - 6\hat{j} + 2\hat{k}. 2a⃗−b⃗=5i^−10j^+4k^2\vec{a} - \vec{b} = 5\hat{i} - 10\hat{j} + 4\hat{k}. Magnitude: 25+100+16=141\sqrt{25 + 100 + 16} = \sqrt{141}. Unit vector: 1141(5i^−10j^+4k^)\dfrac{1}{\sqrt{141}}(5\hat{i} - 10\hat{j} + 4\hat{k}).