PYQ Vault

HSC Maths · Vectors

Dot Product: Angle, Projections, Direction Cosines and Proofs

The scalar product a · b = |a||b| cos θ, the angle between two vectors and the test for perpendicular vectors, scalar and vector projections, direction angles, direction cosines and direction ratios, and proofs in geometry by the dot product.

Why this matters

67 questions, eight of them from board papers: the proof that l² + m² + n² = 1 followed by a missing direction angle (2017), the acute angle between lines with given direction ratios (2018), direction cosines from direction angles (2020), the altitudes of a triangle are concurrent (2022), the angle in a semicircle is a right angle and a third direction angle (2024), a missing direction angle (2025) and the value of p for perpendicular vectors (2026). The textbook rows are Exercise 5.3, its solved examples and the Miscellaneous Exercise questions on these ideas.

Concept 1 of 4: Scalar product, the angle between vectors and perpendicular vectors

The dot product measures how much two vectors point the same way. It is largest when they are parallel, zero when they are at right angles, and negative when the angle between them is obtuse. Because it is also a simple sum of products of components, it turns 'find the angle' into arithmetic.

Definition

  • a⃗⋅b⃗=∣a⃗∣∣b⃗∣cos⁡θ\vec{a}\cdot\vec{b} = |\vec{a}||\vec{b}|\cos\theta, where 0≤θ≤π0 \le \theta \le \pi is the angle between them. The result is a scalar.
  • In components: a⃗⋅b⃗=a1b1+a2b2+a3b3\vec{a}\cdot\vec{b} = a_1b_1 + a_2b_2 + a_3b_3, and cos⁡θ=a⃗⋅b⃗∣a⃗∣∣b⃗∣\cos\theta = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{a}||\vec{b}|}.
  • For non-zero vectors: a⃗⋅b⃗=0\vec{a}\cdot\vec{b} = 0 means perpendicular; a⃗⋅b⃗>0\vec{a}\cdot\vec{b} > 0 means θ\theta is acute; a⃗⋅b⃗<0\vec{a}\cdot\vec{b} < 0 means θ\theta is more than π2\dfrac{\pi}{2}.
  • i^⋅i^=j^⋅j^=k^⋅k^=1\hat{i}\cdot\hat{i} = \hat{j}\cdot\hat{j} = \hat{k}\cdot\hat{k} = 1 and i^⋅j^=j^⋅k^=k^⋅i^=0\hat{i}\cdot\hat{j} = \hat{j}\cdot\hat{k} = \hat{k}\cdot\hat{i} = 0.
  • The dot product is commutative and distributive, and a⃗⋅a⃗=∣a⃗∣2\vec{a}\cdot\vec{a} = |\vec{a}|^2, so ∣a⃗+b⃗∣2=∣a⃗∣2+2 a⃗⋅b⃗+∣b⃗∣2|\vec{a} + \vec{b}|^2 = |\vec{a}|^2 + 2\,\vec{a}\cdot\vec{b} + |\vec{b}|^2.

Scalar product and the angle

a⃗⋅b⃗=∣a⃗∣∣b⃗∣cos⁡θ=a1b1+a2b2+a3b3,cos⁡θ=a⃗⋅b⃗∣a⃗∣∣b⃗∣\vec{a}\cdot\vec{b} = |\vec{a}||\vec{b}|\cos\theta = a_1b_1 + a_2b_2 + a_3b_3, \qquad \cos\theta = \frac{\vec{a}\cdot\vec{b}}{|\vec{a}||\vec{b}|}

Worked example

Find the angle between a⃗=2i^+j^−2k^\vec{a} = 2\hat{i} + \hat{j} - 2\hat{k} and b⃗=i^+j^\vec{b} = \hat{i} + \hat{j}.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

Maharashtra HSC Class 12 · 2026 · Q. 7Easy

Example 1 · Vectors · Dot Product of Vectors

Find the value of pp, for which the vectors aˉ=3i^+2j^+9k^\bar{a} = 3\hat{i} + 2\hat{j} + 9\hat{k} and bˉ=i^+pj^+3k^\bar{b} = \hat{i} + p\hat{j} + 3\hat{k} are perpendicular to each other.

Writing the dot product as a vector

a⃗⋅b⃗\vec{a}\cdot\vec{b} is a number. An answer with i^\hat{i}, j^\hat{j} or k^\hat{k} in it has gone wrong.

Squaring a sum without the middle term

∣a⃗+b⃗∣2=∣a⃗∣2+2 a⃗⋅b⃗+∣b⃗∣2|\vec{a} + \vec{b}|^2 = |\vec{a}|^2 + 2\,\vec{a}\cdot\vec{b} + |\vec{b}|^2. Dropping 2 a⃗⋅b⃗2\,\vec{a}\cdot\vec{b} is right only when the vectors are perpendicular.

Concept 2 of 4: Scalar and vector projections

The projection of b on a is the shadow b casts on the line of a when light falls at right angles to that line. Its length is |b| cos θ, which the dot product gives without finding θ. The vector projection is that length laid along the unit vector of a.

Definition

  • Scalar projection of b⃗\vec{b} on a⃗\vec{a}: ∣b⃗∣cos⁡θ=a⃗⋅b⃗∣a⃗∣|\vec{b}|\cos\theta = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{a}|}.
  • Vector projection of b⃗\vec{b} on a⃗\vec{a}: (a⃗⋅b⃗∣a⃗∣2)a⃗\left(\dfrac{\vec{a}\cdot\vec{b}}{|\vec{a}|^2}\right)\vec{a}.
  • b⃗\vec{b} splits into a part parallel to a⃗\vec{a}, its vector projection, and the rest, which is perpendicular to a⃗\vec{a}.
  • The projections of pi^+qj^+rk^p\hat{i} + q\hat{j} + r\hat{k} on the axes are pp, qq and rr.
  • Foot of the perpendicular from P to the line AB: take Q on AB as a⃗+t AB→\vec{a} + t\,\overrightarrow{AB} and solve PQ→⋅AB→=0\overrightarrow{PQ}\cdot\overrightarrow{AB} = 0 for tt.

Projections of b on a

scalar: a⃗⋅b⃗∣a⃗∣,vector: (a⃗⋅b⃗∣a⃗∣2)a⃗\text{scalar: } \frac{\vec{a}\cdot\vec{b}}{|\vec{a}|}, \qquad \text{vector: } \left(\frac{\vec{a}\cdot\vec{b}}{|\vec{a}|^2}\right)\vec{a}

Worked example

Find the scalar and vector projections of b⃗=3i^+j^+2k^\vec{b} = 3\hat{i} + \hat{j} + 2\hat{k} on a⃗=i^+2j^+2k^\vec{a} = \hat{i} + 2\hat{j} + 2\hat{k}.
Practise this conceptself-check · 2 quick reps

The same idea in a textbook question:

Balbharati textbook · 5.3 SolvedEx.6Moderate

Example 2 · Vectors · Dot Product of Vectors

Find the vector projection of PQ⃗\vec{PQ} on AB⃗\vec{AB} where P, Q, A, B are the points (−2,1,3)(-2, 1, 3), (3,2,5)(3, 2, 5), (4,−3,5)(4, -3, 5) and (7,−5,−1)(7, -5, -1) respectively.

Dividing by the wrong magnitude

The projection of b⃗\vec{b} ON a⃗\vec{a} divides by ∣a⃗∣|\vec{a}|, the vector you project onto. Read 'of' and 'on' carefully.

Vector projection with |a| instead of |a|²

The vector projection is the scalar projection times the UNIT vector a^\hat{a}, which makes ∣a⃗∣2|\vec{a}|^2 in the denominator.

Concept 3 of 4: Direction angles, direction cosines and direction ratios

The direction of a line in space is fixed by the three angles it makes with the axes. Their cosines are the components of a unit vector along the line, and a unit vector has length 1, so the squares of the three cosines must add to 1. That single fact answers most questions here.

Definition

  • Direction angles α,β,γ\alpha, \beta, \gamma (each from 00 to π\pi) are the angles a vector makes with the positive X, Y and Z axes. Direction cosines: l=cos⁡αl = \cos\alpha, m=cos⁡βm = \cos\beta, n=cos⁡γn = \cos\gamma.
  • Proof of the identity l2+m2+n2=1l^2 + m^2 + n^2 = 1:
  • For a⃗=a1i^+a2j^+a3k^\vec{a} = a_1\hat{i} + a_2\hat{j} + a_3\hat{k}, cos⁡α=a⃗⋅i^∣a⃗∣∣i^∣=a1∣a⃗∣\cos\alpha = \dfrac{\vec{a}\cdot\hat{i}}{|\vec{a}||\hat{i}|} = \dfrac{a_1}{|\vec{a}|}; likewise cos⁡β=a2∣a⃗∣\cos\beta = \dfrac{a_2}{|\vec{a}|} and cos⁡γ=a3∣a⃗∣\cos\gamma = \dfrac{a_3}{|\vec{a}|}.
  • Squaring and adding: cos⁡2α+cos⁡2β+cos⁡2γ=a12+a22+a32∣a⃗∣2=1\cos^2\alpha + \cos^2\beta + \cos^2\gamma = \dfrac{a_1^2 + a_2^2 + a_3^2}{|\vec{a}|^2} = 1, since ∣a⃗∣2=a12+a22+a32|\vec{a}|^2 = a_1^2 + a_2^2 + a_3^2.
  • So the direction cosines are the components of the unit vector a^\hat{a}. A line has direction cosines l,m,nl, m, n or −l,−m,−n-l, -m, -n.
  • Direction ratios a,b,ca, b, c are any numbers proportional to l,m,nl, m, n; then l=±aa2+b2+c2l = \pm\dfrac{a}{\sqrt{a^2 + b^2 + c^2}}, and so on. A line has infinitely many sets of direction ratios.
  • Lines with direction ratios a1,b1,c1a_1, b_1, c_1 and a2,b2,c2a_2, b_2, c_2: cos⁡θ=∣a1a2+b1b2+c1c2∣a12+b12+c12a22+b22+c22\cos\theta = \dfrac{|a_1a_2 + b_1b_2 + c_1c_2|}{\sqrt{a_1^2 + b_1^2 + c_1^2}\sqrt{a_2^2 + b_2^2 + c_2^2}} for the acute angle; they are perpendicular when a1a2+b1b2+c1c2=0a_1a_2 + b_1b_2 + c_1c_2 = 0.

Direction cosines

l=a1∣a⃗∣, m=a2∣a⃗∣, n=a3∣a⃗∣,l2+m2+n2=1l = \frac{a_1}{|\vec{a}|},\ m = \frac{a_2}{|\vec{a}|},\ n = \frac{a_3}{|\vec{a}|}, \qquad l^2 + m^2 + n^2 = 1

Worked example

Find the direction cosines of the line from A(1,2,−1)A(1, 2, -1) to B(3,−1,5)B(3, -1, 5).
Practise this conceptself-check · 2 quick reps

The same idea in a real exam question:

Maharashtra HSC Class 12 · 2017 · Q. 3. (B) i.Moderate

Example 3 · Vectors · Dot Product of Vectors

If l,m,nl,m,n are the direction cosines of a line, then prove that l2+m2+n2=1l^{2} + m^{2} + n^{2} = 1. Hence find the direction angles of the line with the X axis which makes direction angles of 135∘135^{\circ} and 45∘45^{\circ} with Y and Z axes respectively.

Keeping one root of a squared cosine

When cos⁡2γ\cos^2\gamma has a value between 0 and 1, cos⁡γ\cos\gamma can be positive or negative, so there are two direction angles. Give both unless the question fixes the sign.

Using direction ratios as direction cosines

Direction ratios must be divided by a2+b2+c2\sqrt{a^2 + b^2 + c^2} first. Test: the squares of direction cosines add to 1.

Proving the identity with numbers

'Prove that l2+m2+n2=1l^2 + m^2 + n^2 = 1' needs the general vector a1i^+a2j^+a3k^a_1\hat{i} + a_2\hat{j} + a_3\hat{k}. A numerical example earns no proof marks.

Concept 4 of 4: Proofs in geometry by the dot product

Many geometry facts are statements about right angles, and a right angle is exactly a dot product of 0. Choose the origin well, write each segment as a difference of position vectors, and expand the dot product. If it collapses to 0, the right angle is proved.

Definition

  • Two segments PA and PB (neither of zero length) are perpendicular if and only if PA→⋅PB→=0\overrightarrow{PA}\cdot\overrightarrow{PB} = 0.
  • The angle in a semicircle is a right angle. Proof outline:
  • Take the centre O as origin; let AB be a diameter with a⃗\vec{a} and −a⃗-\vec{a} the position vectors of A and B, and P(r⃗)P(\vec{r}) a point on the circle, so ∣r⃗∣=∣a⃗∣|\vec{r}| = |\vec{a}| (both are radii).
  • PA→=a⃗−r⃗\overrightarrow{PA} = \vec{a} - \vec{r} and PB→=−a⃗−r⃗\overrightarrow{PB} = -\vec{a} - \vec{r}.
  • PA→⋅PB→=−(a⃗−r⃗)⋅(a⃗+r⃗)=−(∣a⃗∣2−∣r⃗∣2)=0\overrightarrow{PA}\cdot\overrightarrow{PB} = -(\vec{a} - \vec{r})\cdot(\vec{a} + \vec{r}) = -(|\vec{a}|^2 - |\vec{r}|^2) = 0.
  • So PA→⊥PB→\overrightarrow{PA} \perp \overrightarrow{PB} and ∠APB=90∘\angle APB = 90^{\circ}.
  • The altitudes of a triangle are concurrent. Let the altitudes from A and B meet at P(p⃗)P(\vec{p}).
  • AP⊥BCAP \perp BC: (p⃗−a⃗)⋅(c⃗−b⃗)=0(\vec{p} - \vec{a})\cdot(\vec{c} - \vec{b}) = 0. BP⊥CABP \perp CA: (p⃗−b⃗)⋅(a⃗−c⃗)=0(\vec{p} - \vec{b})\cdot(\vec{a} - \vec{c}) = 0.
  • Expanding and adding the two gives (p⃗−c⃗)⋅(a⃗−b⃗)=0(\vec{p} - \vec{c})\cdot(\vec{a} - \vec{b}) = 0, so CP⊥ABCP \perp AB: the third altitude also passes through P.

Test for perpendicular segments

PA→⋅PB→=0 ⇒ PA⊥PB\overrightarrow{PA}\cdot\overrightarrow{PB} = 0 \ \Rightarrow\ PA \perp PB

Worked example

Prove by the vector method that the diagonals of a rhombus are perpendicular.
Practise this conceptself-check · 2 quick reps

The same idea in a real exam question:

Maharashtra HSC Class 12 · 2024 · Q. 18Moderate

Example 4 · Vectors · Dot Product of Vectors

Prove by vector method, the angle subtended on a semicircle is a right angle.

Not saying why the last line is zero

In the semicircle proof, ∣a⃗∣2−∣r⃗∣2=0|\vec{a}|^2 - |\vec{r}|^2 = 0 only because both are radii. State it; it is the step the marks hang on.

Concluding perpendicular from a zero dot product alone

A zero dot product also happens when one vector is zero. Add 'neither vector is zero (P is distinct from A and B)' before concluding the right angle.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (4)

  • Scalar product, the angle between vectors and perpendicular vectors

    Scalar product and the angle

    a⃗⋅b⃗=∣a⃗∣∣b⃗∣cos⁡θ=a1b1+a2b2+a3b3,cos⁡θ=a⃗⋅b⃗∣a⃗∣∣b⃗∣\vec{a}\cdot\vec{b} = |\vec{a}||\vec{b}|\cos\theta = a_1b_1 + a_2b_2 + a_3b_3, \qquad \cos\theta = \frac{\vec{a}\cdot\vec{b}}{|\vec{a}||\vec{b}|}
  • Scalar and vector projections

    Projections of b on a

    scalar: a⃗⋅b⃗∣a⃗∣,vector: (a⃗⋅b⃗∣a⃗∣2)a⃗\text{scalar: } \frac{\vec{a}\cdot\vec{b}}{|\vec{a}|}, \qquad \text{vector: } \left(\frac{\vec{a}\cdot\vec{b}}{|\vec{a}|^2}\right)\vec{a}
  • Direction angles, direction cosines and direction ratios

    Direction cosines

    l=a1∣a⃗∣, m=a2∣a⃗∣, n=a3∣a⃗∣,l2+m2+n2=1l = \frac{a_1}{|\vec{a}|},\ m = \frac{a_2}{|\vec{a}|},\ n = \frac{a_3}{|\vec{a}|}, \qquad l^2 + m^2 + n^2 = 1
  • Proofs in geometry by the dot product

    Test for perpendicular segments

    PA→⋅PB→=0 ⇒ PA⊥PB\overrightarrow{PA}\cdot\overrightarrow{PB} = 0 \ \Rightarrow\ PA \perp PB

Watch out for (9)

Test yourself on Vectors

10 past MH HSC 12 questions from this chapter, timed at 15 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.

Take the Vectors chapter test