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^=vv\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,kv3k \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=OBOA=b1a1,b2a2,b3a3\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) ab|\vec{a} - \vec{b}|, (iii) the unit vector along 2ab2\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^=vv\hat{v} = \dfrac{\vec{v}}{\|\vec{v}\|}. Always has magnitude 1.

Computations.

(i) Sum. a+b=(21)i^+(3+4)j^+(12)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. ab=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 2ab2\vec{a} - \vec{b}. 2a=4i^6j^+2k^2\vec{a} = 4\hat{i} - 6\hat{j} + 2\hat{k}. 2ab=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}).