Skip to main content
ExamExplained
NSW · Maths Extension 1
Maths Extension 1 study scene
§-Syllabus dot point
NSWMaths Extension 1Syllabus dot point

What is the scalar (dot) product of two vectors, and what does it measure?

Compute the scalar product of two vectors in component or geometric form and use it to find the angle between vectors and test orthogonality

A focused answer to the HSC Maths Extension 1 dot point on the scalar product. The component formula a dot b = a1 b1 + a2 b2, the geometric formula |a||b| cos theta, why the two agree, the sign of the dot product, bilinearity, finding the angle between vectors and testing orthogonality, with worked examples and diagrams.

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

What this dot point is asking

NESA wants you to compute the scalar (dot) product of two vectors using either the component formula or the geometric formula, understand it as a measure of how much two vectors point the same way, and use it for the two jobs it does in this course: finding the angle between vectors, and testing whether they are perpendicular. The dot product is also the engine of the next dot point, projection, and shows up constantly in geometric proofs, so it is worth knowing cold.

The answer

For two-dimensional vectors a=(a1,a2)\mathbf{a} = (a_1, a_2) and b=(b1,b2)\mathbf{b} = (b_1, b_2) there are two formulas for the same number.

Component form (the one you compute with):

ab=a1b1+a2b2.\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2.

Geometric form (the one that gives it meaning):

ab=abcosθ,0θπ,\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}|\,|\mathbf{b}| \cos \theta, \qquad 0 \le \theta \le \pi,

where θ\theta is the angle between the two arrows when their tails are placed together.

The dot product and the angle between two vectors Vectors a and b drawn from a common point O with the angle theta between them marked. The dot product equals the magnitude of a times the magnitude of b times cosine theta. a b θ O a . b = |a| |b| cos θ

Why the two formulas agree

This is worth seeing once. Apply the cosine rule to the triangle whose sides are a\mathbf{a}, b\mathbf{b} and ab\mathbf{a} - \mathbf{b} (the side opposite the angle θ\theta):

ab2=a2+b22abcosθ.|\mathbf{a} - \mathbf{b}|^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2|\mathbf{a}|\,|\mathbf{b}|\cos\theta.

Now expand the left side in components: ab2=(a1b1)2+(a2b2)2=a2+b22(a1b1+a2b2)|\mathbf{a} - \mathbf{b}|^2 = (a_1 - b_1)^2 + (a_2 - b_2)^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2(a_1 b_1 + a_2 b_2). Comparing the two right-hand sides, the a2+b2|\mathbf{a}|^2 + |\mathbf{b}|^2 terms cancel and we are left with a1b1+a2b2=abcosθa_1 b_1 + a_2 b_2 = |\mathbf{a}|\,|\mathbf{b}|\cos\theta. The component formula and the geometric formula are the same number, which is exactly why one can be used to compute the other.

The sign of the dot product tells you the angle

Because a|\mathbf{a}| and b|\mathbf{b}| are positive, the sign of ab\mathbf{a} \cdot \mathbf{b} matches the sign of cosθ\cos\theta. So without computing the angle at all you can read off whether it is acute, right or obtuse.

Acute angle: the dot product is positive. The vectors broadly agree in direction, cosθ>0\cos\theta > 0, so ab>0\mathbf{a} \cdot \mathbf{b} > 0.

Acute angle: positive dot product Two vectors a and b from a point with a small acute angle theta between them; the dot product is positive. a b θ θ < 90°: a . b > 0

Right angle: the dot product is zero. Perpendicular vectors have cos90=0\cos 90^\circ = 0, so ab=0\mathbf{a} \cdot \mathbf{b} = 0. This is the orthogonality test.

Right angle: zero dot product Vectors a and b perpendicular, with a small square marking the right angle; the dot product is zero. a b θ = 90°: a . b = 0

Obtuse angle: the dot product is negative. The vectors broadly oppose, cosθ<0\cos\theta < 0, so ab<0\mathbf{a} \cdot \mathbf{b} < 0.

Obtuse angle: negative dot product Two vectors a and b from a point with a large obtuse angle theta between them; the dot product is negative. a b θ θ > 90°: a . b < 0

Finding the angle between two vectors

Rearranging the geometric formula gives the angle directly:

cosθ=abab,θ=arccos ⁣(abab).\cos \theta = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}|\,|\mathbf{b}|}, \qquad \theta = \arccos\!\left(\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}|\,|\mathbf{b}|}\right).

This works for any two non-zero vectors. Because 0θπ0 \le \theta \le \pi, arccos\arccos returns exactly the right range (no quadrant ambiguity to resolve), which is one reason the dot product is the standard tool for angles between vectors.

Properties (bilinearity)

The scalar product behaves like ordinary multiplication, with one caveat: the output is a scalar. It is commutative, ab=ba\mathbf{a} \cdot \mathbf{b} = \mathbf{b} \cdot \mathbf{a}, and bilinear (linear in each slot):

a(b+c)=ab+ac,λ(ab)=(λa)b=a(λb).\mathbf{a} \cdot (\mathbf{b} + \mathbf{c}) = \mathbf{a} \cdot \mathbf{b} + \mathbf{a} \cdot \mathbf{c}, \qquad \lambda(\mathbf{a} \cdot \mathbf{b}) = (\lambda\mathbf{a}) \cdot \mathbf{b} = \mathbf{a} \cdot (\lambda\mathbf{b}).

These rules let you expand brackets exactly as in algebra. In particular, since aa=a2\mathbf{a} \cdot \mathbf{a} = |\mathbf{a}|^2,

a+b2=(a+b)(a+b)=a2+2ab+b2,|\mathbf{a} + \mathbf{b}|^2 = (\mathbf{a} + \mathbf{b}) \cdot (\mathbf{a} + \mathbf{b}) = |\mathbf{a}|^2 + 2\,\mathbf{a} \cdot \mathbf{b} + |\mathbf{b}|^2,

which is the vector analogue of (a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2 and a workhorse in proofs.

How exam questions ask about the scalar product

  • "Show that a\mathbf{a} and b\mathbf{b} are perpendicular" or "... orthogonal": compute ab\mathbf{a} \cdot \mathbf{b} and show it is 00.
  • "Find the value of kk so that a\mathbf{a} and b\mathbf{b} are perpendicular": set ab=0\mathbf{a} \cdot \mathbf{b} = 0 and solve for kk.
  • "Find the angle between ...": use θ=arccos ⁣(abab)\theta = \arccos\!\big(\frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|}\big), then round if asked.
  • "Find a vector perpendicular to a\mathbf{a}": in 2D, swap the components and negate one, (a1,a2)(a2,a1)(a_1, a_2) \to (-a_2, a_1); check with a dot product.
  • "Hence find a+b|\mathbf{a} + \mathbf{b}| given a|\mathbf{a}|, b|\mathbf{b}| and the angle": expand a+b2=a2+2ab+b2|\mathbf{a} + \mathbf{b}|^2 = |\mathbf{a}|^2 + 2\mathbf{a}\cdot\mathbf{b} + |\mathbf{b}|^2 with ab=abcosθ\mathbf{a}\cdot\mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta.
  • "ab=\mathbf{a} \cdot \mathbf{b} = \ldots and ac=\mathbf{a} \cdot \mathbf{c} = \ldots; find a(pb+qc)\mathbf{a} \cdot (p\mathbf{b} + q\mathbf{c})": a bilinearity drill, distribute the dot product.

Exam-style practice questions

Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

2023 HSC Q193 marksVectors a=(2,3)\mathbf{a} = (2, 3) and b=(1,k)\mathbf{b} = (-1, k) are perpendicular. Find kk.
Show worked answer →

Perpendicular vectors satisfy ab=0\mathbf{a} \cdot \mathbf{b} = 0.

Compute: ab=(2)(1)+(3)(k)=2+3k\mathbf{a} \cdot \mathbf{b} = (2)(-1) + (3)(k) = -2 + 3 k.

Set to zero: 2+3k=0-2 + 3 k = 0, so k=23k = \frac{2}{3}.

Markers reward stating the orthogonality condition, the dot product computation, and the algebra.

2021 HSC Q124 marksFind the angle between the vectors a=(1,2)\mathbf{a} = (1, 2) and b=(3,1)\mathbf{b} = (3, -1) in degrees to the nearest degree.
Show worked answer →

ab=(1)(3)+(2)(1)=32=1\mathbf{a} \cdot \mathbf{b} = (1)(3) + (2)(-1) = 3 - 2 = 1.

a=1+4=5|\mathbf{a}| = \sqrt{1 + 4} = \sqrt{5}, b=9+1=10|\mathbf{b}| = \sqrt{9 + 1} = \sqrt{10}.

cosθ=abab=1510=150=152\cos \theta = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}| |\mathbf{b}|} = \frac{1}{\sqrt{5} \sqrt{10}} = \frac{1}{\sqrt{50}} = \frac{1}{5 \sqrt{2}}.

θ=arccos ⁣(152)arccos(0.1414)81.87\theta = \arccos\!\left( \frac{1}{5 \sqrt{2}} \right) \approx \arccos(0.1414) \approx 81.87^\circ, so about 8282^\circ.

Markers reward the formula, the magnitudes, the angle formula, and the rounded numerical answer.

ExamExplained