PGD01C01
Module 4 · Vectors and Geometry of Space

Dot and Cross Product of Two Vectors

Core Titles
Key headlines and terms for quick recall
  • Dot (scalar) product a⃗⋅b⃗=∥a⃗∥∥b⃗∥cos⁡θ\vec{a} \cdot \vec{b} = \|\vec{a}\|\|\vec{b}\| \cos\theta
  • Component form a⃗⋅b⃗=a1b1+a2b2+a3b3\vec{a}\cdot\vec{b} = a_1 b_1 + a_2 b_2 + a_3 b_3
  • Cross (vector) product a⃗×b⃗\vec{a} \times \vec{b}
  • Magnitude ∥a⃗×b⃗∥=∥a⃗∥∥b⃗∥sin⁡θ\|\vec{a} \times \vec{b}\| = \|\vec{a}\| \|\vec{b}\| \sin\theta
  • Direction: right-hand rule, perpendicular to both
  • Triple product a⃗⋅(b⃗×c⃗)\vec{a} \cdot (\vec{b} \times \vec{c}) — volume of parallelepiped
Basic Idea
What it is, why it matters, how it works

Dot product (scalar)

a⃗⋅b⃗=∥a⃗∥∥b⃗∥cos⁡θ=a1b1+a2b2+a3b3\vec{a} \cdot \vec{b} = \|\vec{a}\| \|\vec{b}\| \cos\theta = a_1 b_1 + a_2 b_2 + a_3 b_3

Returns a scalar. Measures how much a⃗\vec{a} and b⃗\vec{b} point in the same direction.

Key results.

  • a⃗⋅a⃗=∥a⃗∥2\vec{a} \cdot \vec{a} = \|\vec{a}\|^2
  • a⃗⊥b⃗  ⟺  a⃗⋅b⃗=0\vec{a} \perp \vec{b} \iff \vec{a} \cdot \vec{b} = 0
  • Angle: cos⁡θ=a⃗⋅b⃗∥a⃗∥∥b⃗∥\cos\theta = \dfrac{\vec{a} \cdot \vec{b}}{\|\vec{a}\| \|\vec{b}\|}
  • Work done by force F⃗\vec{F} over displacement d⃗\vec{d} is F⃗⋅d⃗\vec{F} \cdot \vec{d}.

Cross product (vector)

a⃗×b⃗=∣i^j^k^a1a2a3b1b2b3∣\vec{a} \times \vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix}

Returns a vector perpendicular to both a⃗\vec{a} and b⃗\vec{b}, with magnitude ∥a⃗×b⃗∥=∥a⃗∥∥b⃗∥sin⁡θ=area of parallelogram\|\vec{a} \times \vec{b}\| = \|\vec{a}\| \|\vec{b}\| \sin\theta = \text{area of parallelogram} and direction by the right-hand rule.

Key results.

  • a⃗×b⃗=−b⃗×a⃗\vec{a} \times \vec{b} = -\vec{b} \times \vec{a} (anti-commutative)
  • a⃗×a⃗=0⃗\vec{a} \times \vec{a} = \vec{0}
  • a⃗∥b⃗  ⟺  a⃗×b⃗=0⃗\vec{a} \parallel \vec{b} \iff \vec{a} \times \vec{b} = \vec{0}
  • Useful for normals to planes, torque (r⃗×F⃗\vec{r} \times \vec{F}), angular momentum.

Scalar triple product

[a⃗,b⃗,c⃗]=a⃗⋅(b⃗×c⃗)[\vec{a}, \vec{b}, \vec{c}] = \vec{a} \cdot (\vec{b} \times \vec{c}) Equals the signed volume of the parallelepiped with edges a⃗,b⃗,c⃗\vec{a}, \vec{b}, \vec{c}. Zero iff the three vectors are coplanar.

Why this matters in Data Science

Dot product is used in cosine similarity, neural-network forward passes, kernels. Cross product appears in 3D geometry — important for graphics, robotics and physics-based ML.

Mind Map
Visual structure of the concept
DOT vs CROSS
├── DOT  a·b  (scalar)
│   ├── = ‖a‖‖b‖ cos θ
│   ├── = Σ aᵢbᵢ
│   ├── a·a = ‖a‖²
│   └── a⊥b ⇔ a·b = 0
├── CROSS  a×b  (vector)
│   ├── Magnitude: ‖a‖‖b‖ sin θ
│   ├── Direction: right-hand rule
│   ├── Perpendicular to both
│   ├── Anti-commutative
│   └── ‖a×b‖ = area of parallelogram
└── Triple product  a·(b×c)
    └── Volume of parallelepiped
Exam Q&A
Part A (2 marks) and Part B (20 marks) style questions

Part A (2 marks each)

Q1. State the dot product formula. a⃗⋅b⃗=∥a⃗∥∥b⃗∥cos⁡θ=a1b1+a2b2+a3b3\vec{a} \cdot \vec{b} = \|\vec{a}\| \|\vec{b}\| \cos\theta = a_1 b_1 + a_2 b_2 + a_3 b_3.

Q2. State the magnitude of the cross product. ∥a⃗×b⃗∥=∥a⃗∥∥b⃗∥sin⁡θ\|\vec{a} \times \vec{b}\| = \|\vec{a}\| \|\vec{b}\| \sin\theta, equal to the area of the parallelogram formed by the two vectors.

Q3. Find the angle between a⃗=⟨1,0,1⟩\vec{a} = \langle 1, 0, 1 \rangle and b⃗=⟨0,1,1⟩\vec{b} = \langle 0, 1, 1 \rangle. a⃗⋅b⃗=1\vec{a} \cdot \vec{b} = 1, ∥a⃗∥=∥b⃗∥=2\|\vec{a}\| = \|\vec{b}\| = \sqrt{2}, cos⁡θ=1/2⇒θ=60°\cos\theta = 1/2 \Rightarrow \theta = 60°.

Q4. What does a⃗⋅(b⃗×c⃗)=0\vec{a} \cdot (\vec{b} \times \vec{c}) = 0 imply? The three vectors are coplanar.


Part B (20 marks)

Q. Define dot and cross product of vectors. Derive expressions in component form and give geometrical meaning. Given a⃗=i^+2j^+k^\vec{a} = \hat{i} + 2\hat{j} + \hat{k} and b⃗=2i^+j^−k^\vec{b} = 2\hat{i} + \hat{j} - \hat{k}, find a⃗⋅b⃗\vec{a} \cdot \vec{b}, a⃗×b⃗\vec{a} \times \vec{b}, the angle between them, and the area of the parallelogram they span.

Dot product. a⃗⋅b⃗=∥a⃗∥∥b⃗∥cos⁡θ\vec{a} \cdot \vec{b} = \|\vec{a}\| \|\vec{b}\| \cos\theta Component form. Write a⃗=a1i^+a2j^+a3k^\vec{a} = a_1\hat{i} + a_2\hat{j} + a_3\hat{k} etc. Using i^⋅i^=1\hat{i}\cdot\hat{i} = 1, i^⋅j^=0\hat{i}\cdot\hat{j} = 0: a⃗⋅b⃗=a1b1+a2b2+a3b3.\vec{a}\cdot\vec{b} = a_1 b_1 + a_2 b_2 + a_3 b_3. Geometric meaning. Scalar projection times magnitude — measures alignment. Zero ⇒ perpendicular.

Cross product. a⃗×b⃗=∥a⃗∥∥b⃗∥sin⁡θ  n^\vec{a} \times \vec{b} = \|\vec{a}\| \|\vec{b}\| \sin\theta \;\hat{n} where n^\hat{n} is the unit normal by the right-hand rule. Component form: a⃗×b⃗=∣i^j^k^a1a2a3b1b2b3∣.\vec{a} \times \vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix}. Geometric meaning. The magnitude is the area of the parallelogram with sides a⃗\vec{a} and b⃗\vec{b}; the direction is perpendicular to both.

Computations.

Dot product: a⃗⋅b⃗=(1)(2)+(2)(1)+(1)(−1)=2+2−1=3\vec{a} \cdot \vec{b} = (1)(2) + (2)(1) + (1)(-1) = 2 + 2 - 1 = 3.

Cross product: a⃗×b⃗=∣i^j^k^12121−1∣=i^(2⋅−1−1⋅1)−j^(1⋅−1−1⋅2)+k^(1⋅1−2⋅2)=−3i^+3j^−3k^.\vec{a} \times \vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 1 & 2 & 1 \\ 2 & 1 & -1 \end{vmatrix} = \hat{i}(2 \cdot -1 - 1 \cdot 1) - \hat{j}(1 \cdot -1 - 1 \cdot 2) + \hat{k}(1 \cdot 1 - 2 \cdot 2) = -3\hat{i} + 3\hat{j} - 3\hat{k}.

Angle. ∥a⃗∥=6,∥b⃗∥=6\|\vec{a}\| = \sqrt{6}, \|\vec{b}\| = \sqrt{6}. cos⁡θ=36=12⇒θ=60°\cos\theta = \dfrac{3}{6} = \dfrac{1}{2} \Rightarrow \theta = 60°.

Area of parallelogram. ∥a⃗×b⃗∥=9+9+9=33\|\vec{a} \times \vec{b}\| = \sqrt{9 + 9 + 9} = 3\sqrt{3}.