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 ab=abcosθ\vec{a} \cdot \vec{b} = \|\vec{a}\|\|\vec{b}\| \cos\theta
  • Component form ab=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=absinθ\|\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)

ab=abcosθ=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.

  • aa=a2\vec{a} \cdot \vec{a} = \|\vec{a}\|^2
  • ab    ab=0\vec{a} \perp \vec{b} \iff \vec{a} \cdot \vec{b} = 0
  • Angle: cosθ=abab\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 Fd\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=absinθ=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}
  • ab    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. ab=abcosθ=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=absinθ\|\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. ab=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 ab\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. ab=abcosθ\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: ab=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=absinθ  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: ab=(1)(2)+(2)(1)+(1)(1)=2+21=3\vec{a} \cdot \vec{b} = (1)(2) + (2)(1) + (1)(-1) = 2 + 2 - 1 = 3.

Cross product: a×b=i^j^k^121211=i^(2111)j^(1112)+k^(1122)=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}.