Skip to content

3 · Geometry and trigonometry

IB Mathematics: Applications and Interpretation HL · Topic 3

Video lesson for this topic Open the video page
3:05

Geometry and trigonometry

These are selected topics, not the whole syllabus, and every example is fictional. Similar shapes scale lengths by k, areas by k squared and volumes by k…

English narration · English + 中文 subtitles burned in

3.1

Scope and prerequisites

This handout teaches topic 3, Geometry and trigonometry, of Mathematics: Applications and Interpretation, the course first assessed in 2021: distance, volume, surface area and angles in three dimensions, right-angled and non-right-angled triangles, bearings, arcs and sectors, perpendicular bisectors and Voronoi diagrams, and, for HL, radians and the unit circle, matrix transformations, vectors and motion, and graph theory with its algorithms. It is written for both SL and HL students. HL students also apply the further results in the sections marked AHL.

Prerequisites: Pythagoras' theorem, the gradient and equation of a line (topic 2), and, for HL, matrices (topic 1).

3.2

Geometry in three dimensions

A map that stopped an epidemic

In August 1854 cholera killed more than 500 people in ten days in Soho, London. Most doctors believed the disease spread through bad air. The doctor John Snow marked each death on a street map and noticed that they clustered around one public water pump, on Broad Street. In a later version of his map he drew a line round the area that was closer, by walking distance, to the Broad Street pump than to any other pump, and most of the deaths lay inside it. The pump handle was removed, and the outbreak, already slowing, ended. Snow's line is an early example of a Voronoi diagram, which divides a map into the regions nearest to each of a set of points. This topic is about measuring space: distances, angles, areas and regions.

A schematic map divided into nearest-pump cells, with most deaths clustered in the Broad Street pump's cell
Nearest-pump regions (schematic)
A version of John Snow's 1854 map: each dot is a death and each cross a pump; the deaths cluster around the Broad Street pump
A version of John Snow's 1854 map: each dot is a death and each cross a pump; the deaths cluster around the Broad Street pump

Distance and midpoint

In three dimensions a point has coordinates $(x, y, z)$. For points $(x_1, y_1, z_1)$ and $(x_2, y_2, z_2)$:

$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}, \qquad M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \frac{z_1 + z_2}{2}\right)$$

Worked example. For $P(1, 2, 3)$ and $Q(4, 6, 15)$, the differences are 3, 4 and 12, so $PQ = \sqrt{9 + 16 + 144} = 13$. The midpoint 中点 is $(2.5, 4, 9)$.

Volume and surface area

The formula booklet gives these. Here $r$ is a radius, $h$ a perpendicular height and $l$ the slant height 斜高 of a cone.

The pyramids of Giza
The pyramids of Giza: a square-based pyramid has volume one third of base area times height
A cuboid, cylinder, cone and sphere drawn in 3D with their radius, height, length and slant-height dimensions labelled
Common solids and the dimensions ($r$, $h$, $\ell$, slant $l$) used in their volume and surface-area formulas.
Solid Volume Surface area
Prism, cylinder area of cross-section $\times$ length; cylinder $\pi r^2 h$ cylinder curved surface $2\pi r h$
Pyramid 棱锥 $\frac{1}{3} \times$ base area $\times h$ add the areas of the faces
Cone 圆锥 $\frac{1}{3}\pi r^2 h$ curved surface $\pi r l$
Sphere 球 $\frac{4}{3}\pi r^3$ $4\pi r^2$

A hemisphere 半球 is half a sphere: volume $\frac{2}{3}\pi r^3$, curved surface $2\pi r^2$.

Worked example. A pyramid has a square base of side 6 cm and a height of 4 cm.

  • Volume: $\frac{1}{3}(36)(4) = 48$ cm³.
  • Each triangular face has height $\sqrt{4^2 + 3^2} = 5$ cm, from the right-angled triangle between the apex, the centre of the base and the middle of a side.
  • Surface area: $36 + 4 \times \frac{1}{2}(6)(5) = 96$ cm².

Worked example. A grain silo is a cylinder of radius 3 m and height 10 m with a hemisphere on top. Its volume is $\pi(9)(10) + \frac{2}{3}\pi(27) = 108\pi \approx 339$ m³. The curved surfaces that need painting have area $2\pi(3)(10) + 2\pi(9) = 78\pi \approx 245$ m². Split a compound solid into simple solids, and add only the faces that are on the outside.

The angle between a line and a plane

To find the angle between a line and a plane, drop a perpendicular from a point on the line to the plane. The angle is between the line and its “shadow” in the plane, and it sits in a right-angled triangle.

Worked example. A cuboid is 8 cm by 6 cm by 5 cm. Find the angle between the space diagonal 体对角线 $AG$ and the base.

  • Base diagonal: $AC = \sqrt{8^2 + 6^2} = 10$ cm.
  • $CG = 5$ cm is vertical, so triangle $ACG$ has a right angle at $C$.
  • $\tan\theta = \frac{5}{10}$, so $\theta \approx 26.6°$, and $AG = \sqrt{125} \approx 11.2$ cm.
A cuboid 8 by 6 by 5 cm with the base diagonal AC = 10, vertical edge CG = 5 and space diagonal AG, which makes angle theta with the base; tan theta = 5/10, theta about 26.6 degrees
Find the right-angled triangle that contains the angle
Vocabulary Train
English
midpoint/ˈmɪdpɔɪnt/
slant height/slænt haɪt/
pyramid/ˈpɪrəmɪd/
cone/kəʊn/
sphere/sfɪə/
hemisphere/ˈhemɪsfɪə/
space diagonal/speɪs daɪˈæɡənl/
3.3

Triangle trigonometry

Right-angled triangles

Label the sides from the angle $\theta$ you are using: the hypotenuse 斜边 is opposite the right angle, the opposite side faces $\theta$, and the adjacent side is next to it.

Looking up at the Eiffel Tower
Looking up at a tower: an angle of elevation and a measured distance give its height
A right-angled triangle with one angle marked theta, its opposite side, adjacent side and hypotenuse labelled
Name the sides from the angle $\theta$: the opposite is across from it, the adjacent next to it, and the hypotenuse opposite the right angle (SOH-CAH-TOA).
$$\sin\theta = \frac{\text{opposite}}{\text{hypotenuse}}, \qquad \cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}}, \qquad \tan\theta = \frac{\text{opposite}}{\text{adjacent}}$$
  • An angle of elevation 仰角 is measured up from the horizontal; an angle of depression 俯角 is measured down from the horizontal.
  • A bearing 方位角 is an angle measured clockwise from north, written with three figures: 050°, 160°, 305°.

Worked example. From a point 40 m from the foot of a tower, the angle of elevation of the top is 32°. The height is $40\tan 32° \approx 25.0$ m.

Worked example. From the top of a cliff 60 m high, the angle of depression of a boat is 18°. The angle of elevation of the cliff top from the boat is also 18° (alternate angles), so the boat is $\frac{60}{\tan 18°} \approx 185$ m from the foot of the cliff.

The sine rule, the cosine rule and area

For any triangle with sides $a$, $b$, $c$ opposite angles $A$, $B$, $C$:

$$\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}, \qquad c^2 = a^2 + b^2 - 2ab\cos C, \qquad \text{Area} = \frac{1}{2}ab\sin C$$
  • Use the sine rule 正弦定理 when you know a side and the angle opposite it.
  • Use the cosine rule 余弦定理 when you know two sides and the angle between them, or all three sides. To find an angle, rearrange: $\cos C = \dfrac{a^2 + b^2 - c^2}{2ab}$.

Worked example. In triangle $ABC$, $A = 48°$, $B = 75°$ and $a = 12$ cm. Then $b = \dfrac{12\sin 75°}{\sin 48°} \approx 15.6$ cm, $C = 57°$, and the area is $\frac{1}{2}(12)(15.6)\sin 57° \approx 78.5$ cm².

Worked example. A triangle has sides 7, 8 and 10 m. The largest angle is opposite the longest side: $\cos C = \dfrac{49 + 64 - 100}{2(7)(8)} = \dfrac{13}{112}$, so $C \approx 83.3°$.

Worked example (bearings). A ship sails 12 km from $A$ on a bearing of 050° to $B$, then 20 km on a bearing of 160° to $C$. Find the distance and bearing of $C$ from $A$, and the area of triangle $ABC$.

  • At $B$, the bearing back to $A$ is $050° + 180° = 230°$, so angle $ABC = 230° - 160° = 70°$.
  • Cosine rule: $AC^2 = 12^2 + 20^2 - 2(12)(20)\cos 70° \approx 379.8$, so $AC \approx 19.5$ km.
  • Angle at $A$: $\cos A = \dfrac{12^2 + 19.49^2 - 20^2}{2(12)(19.49)} \approx 0.265$, so $A \approx 74.6°$.
  • Bearing of $C$ from $A$: $050° + 74.6° \approx 125°$.
  • Area: $\frac{1}{2}(12)(20)\sin 70° \approx 113$ km².
A ship's route: 12 km on bearing 050 degrees from A to B, then 20 km on bearing 160 degrees to C; angle ABC is 70 degrees, AC is 19.5 km on a bearing of 125 degrees
Draw a north line at every point where a bearing is measured

At SL you will not meet the ambiguous case of the sine rule: when you find an angle with it, the question will make clear whether the angle is acute or obtuse.

Vocabulary Train
English
hypotenuse/haɪˈpɒtənjuːs/
angle of elevation/ˈæŋɡl ɒv ˌelɪˈveɪʃn/
angle of depression/ˈæŋɡl ɒv dɪˈpreʃn/
bearing/ˈbeərɪŋ/
sine rule/saɪn ruːl/
cosine rule/ˈkəʊsaɪn ruːl/
3.4

Arcs, sectors and perpendicular bisectors

Arc length and sector area in degrees

An arc 弧 is part of a circle, and a sector 扇形 is the region between an arc and two radii. A sector with angle $\theta°$ is the fraction $\frac{\theta}{360}$ of the whole circle, so

$$\text{arc length } l = \frac{\theta}{360} \times 2\pi r, \qquad \text{sector area } A = \frac{\theta}{360} \times \pi r^2$$

Worked example. A pizza of radius 15 cm is cut into slices with angle 40°. Each slice has arc $\frac{40}{360} \times 30\pi \approx 10.5$ cm, area $\frac{40}{360} \times 225\pi \approx 78.5$ cm², and perimeter $15 + 15 + 10.5 = 40.5$ cm.

The perpendicular bisector

The perpendicular bisector 垂直平分线 of $AB$ is the line through the midpoint of $AB$ at right angles to it. Every point on it is the same distance from $A$ as from $B$.

Worked example. For $P(2, 1)$ and $Q(6, 5)$: the midpoint is $(4, 3)$, the gradient of $PQ$ is $\frac{5 - 1}{6 - 2} = 1$, so the bisector has gradient $-1$ and equation $y - 3 = -(x - 4)$, that is $y = -x + 7$.

Vocabulary Train
English
arc/ɑːk/
sector/ˈsektə/
perpendicular bisector/ˌpɜːpənˈdɪkjʊlə baɪˈsektə/
3.5

Voronoi diagrams

Sites, cells, edges and vertices

A Voronoi diagram 沃罗诺伊图 divides a region into cells, one for each site 站点, such as a school, a weather station or a mobile phone mast. Each cell 单元 contains the points closer to its site than to any other.

  • An edge 边 is part of the perpendicular bisector of two neighbouring sites.
  • A vertex 顶点 is where three edges meet. It is the same distance from three sites.

Worked example. Four wells are at $A(1, 1)$, $B(7, 1)$, $C(1, 7)$ and $D(9, 9)$, in kilometres, in a farming region $0 \le x \le 10$, $0 \le y \le 10$.

  • The bisector of $A$ and $B$ is $x = 4$, and the bisector of $A$ and $C$ is $y = 4$. They meet at the vertex $(4, 4)$, which is $\sqrt{3^2 + 3^2} \approx 4.24$ km from $A$, $B$ and $C$.
  • The bisector of $B$ and $C$ passes through their midpoint $(4, 4)$ with gradient 1 (because $BC$ has gradient $-1$): it is $y = x$.
  • The bisector of $B$ and $D$ passes through $(8, 5)$ with gradient $-\frac{1}{4}$: $y = -0.25x + 7$. It meets $y = x$ at the vertex $(5.6, 5.6)$, which is about 4.81 km from $B$, $C$ and $D$.
A Voronoi diagram of four wells A(1, 1), B(7, 1), C(1, 7) and D(9, 9) in a 10 by 10 km region, with edges x = 4, y = 4, y = x and y = -0.25x + 7, vertices at (4, 4) and (5.6, 5.6), and a dashed circle of radius 4.81 about (5.6, 5.6) passing through B, C and D
Each cell holds the points nearest its well; the largest empty circle is centred on a vertex

Using a Voronoi diagram

  • Nearest neighbour interpolation 最近邻插值: to estimate a value at a point, use the value at the site of the cell that contains it. A farm at $(3, 2)$ is in cell $A$, so its rainfall is estimated by the rainfall at well $A$.
  • Adding a site: draw the perpendicular bisectors between the new site and its neighbours, then remove the parts of the old edges that now lie inside the new cell.
  • The largest empty circle, sometimes called the toxic waste dump problem: to place something as far as possible from every site, check the vertices, where edges meet the boundary, and the corners of the region. In the example, the vertex $(5.6, 5.6)$ is 4.81 km from its nearest wells, more than $(4, 4)$ at 4.24 km and more than any boundary point (the best is about 4.61 km), so it is the best place for a new storage tank that must be as far from the wells as possible.
Vocabulary Train
English
Voronoi diagram/ˈvɔːrənɔɪ ˈdaɪəɡræm/
site/saɪt/
cell/sel/
edge/edʒ/
vertex/ˈvɜːteks/
nearest neighbour interpolation/ˈnɪərɪst ˈneɪbə ɪnˌtɜːpəˈleɪʃn/
3.6

AHL: Radians and the unit circle

Radians

A radian 弧度 is the angle at the centre of a circle made by an arc equal in length to the radius. A full turn is $2\pi$ radians, so

The Vienna Giant Ferris Wheel against a blue sky
A turning Ferris wheel: angle in radians times radius gives the arc each car travels
The unit circle with the point (cos theta, sin theta), its reflection at pi minus theta with the same height, and its reflection at minus theta with the same x-coordinate; quadrant labels all, sin, tan, cos positive
Reflections in the unit circle give the symmetry rules
$$\pi \text{ radians} = 180°, \qquad l = r\theta, \qquad A = \frac{1}{2}r^2\theta \quad (\theta \text{ in radians})$$

Worked example. $150° = 150 \times \frac{\pi}{180} = \frac{5\pi}{6} \approx 2.62$ radians. A garden sprinkler sprays a sector of radius 8 m through 1.2 radians: the arc is $8 \times 1.2 = 9.6$ m and the area $\frac{1}{2}(64)(1.2) = 38.4$ m². Set the GDC to radian mode before you use these formulae.

The unit circle

On the unit circle 单位圆, radius 1 and centre the origin, the point at angle $\theta$ anticlockwise from the positive $x$-axis is $(\cos\theta, \sin\theta)$. This defines sine and cosine for any angle, and gives

$$\cos^2\theta + \sin^2\theta = 1, \qquad \tan\theta = \frac{\sin\theta}{\cos\theta}$$

Worked example. $\theta$ is obtuse and $\sin\theta = 0.6$. Then $\cos^2\theta = 1 - 0.36 = 0.64$, and cosine is negative for an obtuse angle, so $\cos\theta = -0.8$ and $\tan\theta = -0.75$.

Worked example. Solve $3\sin x + 1 = 2.5$ for $0 \le x \le 2\pi$. Then $\sin x = 0.5$, so $x = \frac{\pi}{6}$ or $\pi - \frac{\pi}{6} = \frac{5\pi}{6}$: by symmetry of the unit circle, two angles have the same height. An equation such as $2\cos x = x$ has no algebraic method: graph both sides and find the intersection, $x \approx 1.03$.

Vocabulary Train
English
radian/ˈreɪdɪən/
unit circle/ˈjuːnɪt ˈsɜːkl/
transformation matrix/trænsfɔːˈmeɪʃn ˈmeɪtrɪks/
3.7

AHL: Matrix transformations

Matrices that move shapes

Multiplying a position vector by a $2 \times 2$ matrix moves the point. The formula booklet gives these transformation matrices 变换矩阵, centred at the origin:

Transformation Matrix
reflection 反射 in $y = (\tan\theta)x$ $\begin{pmatrix} \cos 2\theta & \sin 2\theta \\ \sin 2\theta & -\cos 2\theta \end{pmatrix}$
rotation 旋转 by $\theta$ anticlockwise $\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}$
enlargement 放大, scale factor $k$ $\begin{pmatrix} k & 0 \\ 0 & k \end{pmatrix}$
horizontal stretch 伸缩, factor $k$ $\begin{pmatrix} k & 0 \\ 0 & 1 \end{pmatrix}$
vertical stretch, factor $k$ $\begin{pmatrix} 1 & 0 \\ 0 & k \end{pmatrix}$

A translation adds a vector, so the general transformation is $X' = AX + \mathbf{b}$.

Composite transformations and area

To apply $A$ first and then $B$, use the single matrix $BA$: the first transformation is written on the right. The determinant 行列式 tells you how area changes:

$$\text{area of image} = |\det A| \times \text{area of object}$$

A negative determinant means the shape has been flipped over, as in a reflection.

Worked example. The triangle $P(1, 1)$, $Q(4, 1)$, $R(1, 3)$ has area 3. It is rotated 90° anticlockwise about $O$ and then enlarged with scale factor 2.

  • Rotation: $\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$. Enlargement: $\begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}$.
  • Single matrix: enlargement times rotation $= \begin{pmatrix} 0 & -2 \\ 2 & 0 \end{pmatrix}$, with determinant 4.
  • Images: $P''(-2, 2)$, $Q''(-2, 8)$, $R''(-6, 2)$, and the new area is $4 \times 3 = 12$.
Triangle PQR with vertices (1, 1), (4, 1) and (1, 3) and area 3; its image P'Q'R' after a 90 degree rotation; and the final image P''Q''R'' at (-2, 2), (-2, 8) and (-6, 2) after an enlargement by 2, with area 12
Rotation keeps the area; the enlargement multiplies it by $\det = 4$
Vocabulary Train
English
reflection/rɪˈflekʃn/
rotation/rəʊˈteɪʃn/
enlargement/enˈlɑːdʒmənt/
stretch/stretʃ/
determinant/dɪˈtɜːmɪnənt/
3.8

AHL: Vectors and motion

Vectors, magnitude and the scalar product

A vector 向量 has size and direction. In components, $\mathbf{v} = \begin{pmatrix} 3 \\ -4 \end{pmatrix}$ has magnitude 模 $|\mathbf{v}| = \sqrt{3^2 + 4^2} = 5$, and the unit vector 单位向量 in its direction is $\frac{1}{5}\mathbf{v} = \begin{pmatrix} 0.6 \\ -0.8 \end{pmatrix}$. The vector from $A$ to $B$ is $\overrightarrow{AB} = \mathbf{b} - \mathbf{a}$, where $\mathbf{a}$ and $\mathbf{b}$ are position vectors 位置向量.

Two vectors from a point with the angle between them and the projection of one onto the other
The scalar product picks out $|\mathbf{b}|\cos\theta$, how far $\mathbf{b}$ reaches along $\mathbf{a}$.

The scalar product 数量积 is

$$\mathbf{v} \cdot \mathbf{w} = v_1w_1 + v_2w_2 + v_3w_3 = |\mathbf{v}||\mathbf{w}|\cos\theta$$

so it finds the angle between two vectors, and $\mathbf{v} \cdot \mathbf{w} = 0$ means they are perpendicular.

Worked example. For $\mathbf{v} = \begin{pmatrix} 2 \\ 1 \\ 0 \end{pmatrix}$ and $\mathbf{w} = \begin{pmatrix} 1 \\ 3 \\ 2 \end{pmatrix}$: $\mathbf{v} \cdot \mathbf{w} = 2 + 3 + 0 = 5$, $|\mathbf{v}| = \sqrt{5}$, $|\mathbf{w}| = \sqrt{14}$, so $\cos\theta = \frac{5}{\sqrt{70}}$ and $\theta \approx 53.3°$.

The vector product

The vector product 向量积 $\mathbf{v} \times \mathbf{w}$ is a vector perpendicular to both, with magnitude $|\mathbf{v}||\mathbf{w}|\sin\theta$, the area of the parallelogram they make.

$$\mathbf{v} \times \mathbf{w} = \begin{pmatrix} v_2w_3 - v_3w_2 \\ v_3w_1 - v_1w_3 \\ v_1w_2 - v_2w_1 \end{pmatrix}$$

Worked example. For the vectors above, $\mathbf{v} \times \mathbf{w} = \begin{pmatrix} 2 \\ -4 \\ 5 \end{pmatrix}$, with magnitude $\sqrt{45} \approx 6.71$. The triangle with these two sides has area $\frac{1}{2}\sqrt{45} \approx 3.35$.

Lines and motion

The vector equation of a line 直线的向量方程 is $\mathbf{r} = \mathbf{a} + \lambda\mathbf{b}$: start at the point with position vector $\mathbf{a}$ and move any multiple $\lambda$ of the direction $\mathbf{b}$. In kinematics the parameter is time:

$$\mathbf{r} = \mathbf{r}_0 + t\mathbf{v}$$

where $\mathbf{r}_0$ is the starting position and $\mathbf{v}$ the velocity vector 速度向量. The speed is $|\mathbf{v}|$.

Worked example. A boat leaves harbour $O$ with velocity $\begin{pmatrix} 6 \\ 8 \end{pmatrix}$ km/h, so its speed is 10 km/h and its position is $\mathbf{r} = t\begin{pmatrix} 6 \\ 8 \end{pmatrix}$. A lighthouse is at $L(20, 10)$. When is the boat closest to it?

  • Vector from $L$ to the boat: $\begin{pmatrix} 6t - 20 \\ 8t - 10 \end{pmatrix}$.
  • Distance squared: $(6t - 20)^2 + (8t - 10)^2 = 100t^2 - 400t + 500$, a quadratic with its minimum at $t = 2$.
  • At $t = 2$ the boat is at $(12, 16)$, and the distance is $\sqrt{400 - 800 + 500} = 10$ km. Check: $\begin{pmatrix} -8 \\ 6 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 8 \end{pmatrix} = 0$, so the closest line is perpendicular to the path.
A boat's path from the harbour O in the direction (6, 8), with points marked at t = 1, 2 and 3 hours, and the lighthouse L at (20, 10); the shortest distance, 10 km, is the perpendicular from L meeting the path at (12, 16) when t = 2
At the closest approach the line to $L$ is perpendicular to the path

Worked example. A second ship moves by $\mathbf{r} = \begin{pmatrix} 30 \\ 5 \end{pmatrix} + t\begin{pmatrix} -6 \\ 8 \end{pmatrix}$. The vector from the boat to the ship is $\begin{pmatrix} 30 - 12t \\ 5 \end{pmatrix}$, which is shortest when $t = 2.5$: the two pass 5 km apart, 2.5 hours after leaving.

Motion with variable velocity

When the velocity changes, the position is not a straight line. A ball thrown with velocity $\begin{pmatrix} 15 \\ 20 \end{pmatrix}$ m/s moves by $\mathbf{r} = \begin{pmatrix} 15t \\ 20t - 4.9t^2 \end{pmatrix}$. It lands when $20t - 4.9t^2 = 0$, at $t \approx 4.08$ s, $15 \times 4.08 \approx 61.2$ m away, and its greatest height is about 20.4 m, at $t \approx 2.04$ s.

Vocabulary Train
English
vector/ˈvektə/
magnitude/ˈmæɡnɪtjuːd/
unit vector/ˈjuːnɪt ˈvektə/
position vector/pəˈzɪʃn ˈvektə/
scalar product/ˈskeɪlə ˈprɒdʌkt/
vector product/ˈvektə ˈprɒdʌkt/
vector equation of a line/ˈvektə ɪˈkweɪʒn əvə laɪn/
velocity vector/vəˈlɒsɪti ˈvektə/
3.9

AHL: Graphs and adjacency matrices

The bridges of Königsberg

In 1736 Leonhard Euler was asked whether a walk through the city of Königsberg could cross each of its seven bridges exactly once. He replaced the four areas of land with points and the bridges with lines, and showed that it could not be done. In doing so he started graph theory: the study of what is connected to what, ignoring exact shapes and distances.

A metro map is a network: stations are vertices and the lines between them are edges
A metro map is a graph: stations are vertices and the tracks between them are edges

Words for graphs

A graph 图 is a set of vertices joined by edges. The degree 度 of a vertex is the number of edges that meet there. Adding up all the degrees counts every edge twice, so the sum of the degrees is twice the number of edges.

Three small graphs: the complete graph K4 with 6 edges, a tree with 5 vertices and 4 edges, and a directed graph
Complete graph, tree and directed graph
  • A simple graph has no loops and no repeated edges. In a complete graph 完全图 every pair of vertices is joined: $K_n$ has $\frac{n(n - 1)}{2}$ edges.
  • In a weighted graph 加权图 each edge has a number, such as a distance, time or cost. In a directed graph 有向图 the edges have arrows.
  • A graph is connected 连通 if every vertex can be reached from every other. A tree 树 is a connected graph with no cycles; with $n$ vertices it has $n - 1$ edges.
  • A walk is any route along edges. A trail repeats no edge, a path repeats no vertex, a circuit is a trail that ends where it started, and a cycle is a path that ends where it started.
Kind of route Uses Exists when
Eulerian circuit 欧拉回路 every edge once, back to the start connected, all degrees even
Eulerian trail 欧拉迹 every edge once, ends elsewhere connected, exactly two odd vertices
Hamiltonian cycle 哈密顿圈 every vertex once, back to the start no simple test: search

In Königsberg the four land areas had degrees 5, 3, 3 and 3. With four odd vertices there is no Eulerian trail, which is exactly what Euler proved.

Adjacency matrices and walks

The adjacency matrix 邻接矩阵 $M$ has, in row $i$ and column $j$, the number of edges from vertex $i$ to vertex $j$. The number of walks of length $k$ from $i$ to $j$ is the entry in $M^k$.

A graph on A, B, C, D with edges AB, AC, BC and CD, its adjacency matrix M and the matrix M cubed, whose row A, column C entry 4 counts the walks ABAC, ACAC, ACBC and ACDC
The entry in row A, column C of M³ counts the walks of length 3 from A to C

Worked example. A graph has edges $AB$, $AC$, $BC$ and $CD$. With the vertices in the order $A$, $B$, $C$, $D$:

$$M = \begin{pmatrix} 0 & 1 & 1 & 0 \\ 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}, \qquad M^3 = \begin{pmatrix} 2 & 3 & 4 & 1 \\ 3 & 2 & 4 & 1 \\ 4 & 4 & 2 & 3 \\ 1 & 1 & 3 & 0 \end{pmatrix}$$

There are 4 walks of length 3 from $A$ to $C$: $ABAC$, $ACAC$, $ACBC$ and $ACDC$.

Transition matrices for directed graphs

A random walk on a directed graph, such as a reader clicking links between web pages, is a Markov chain (topic 4). The transition matrix 转移矩阵 has, in each column, the probabilities of leaving that vertex along each edge.

Pages P, Q and R: P links to Q and R with probability 0.5 each, Q to R and R to P with probability 1; steady state 0.4, 0.2, 0.4
A random reader's long-run shares

Worked example. Page $P$ links to $Q$ and $R$, page $Q$ links to $R$, and page $R$ links to $P$. A reader picks a link at random. In the long run the reader spends a share $p$ of the time on $P$, $q$ on $Q$ and $r$ on $R$, where $q = 0.5p$, $r = 0.5p + q$ and $p = r$. So $p = r$ and $q = 0.5p$, and since $p + q + r = 1$, the steady state is $p = 0.4$, $q = 0.2$, $r = 0.4$. Ranking pages by this share is the idea behind early search engines.

Vocabulary Train
English
graph/ɡræf/
degree/dɪˈɡriː/
complete graph/kəmˈpliːt ɡræf/
weighted graph/ˈweɪtɪd ɡræf/
directed graph/daɪˈrektɪd ɡræf/
connected/kəˈnektɪd/
tree/triː/
Eulerian circuit/juːˈlɪərɪən ˈsɜːkɪt/
Eulerian trail/juːˈlɪərɪən treɪl/
Hamiltonian cycle/ˌhæmɪlˈtəʊnɪən ˈsaɪkl/
adjacency matrix/əˈdʒeɪsənsi ˈmeɪtrɪks/
transition matrix/trænˈsɪʃn ˈmeɪtrɪks/
3.10

AHL: Network algorithms

Minimum spanning trees

A spanning tree 生成树 joins all the vertices of a graph with no cycles. A minimum spanning tree 最小生成树 is the one with the least total weight: for example, the cheapest set of cables that connects every building.

The table gives the distances, in km, between five villages.

$A$ $B$ $C$ $D$ $E$
$A$ – 7 4 9 11
$B$ 7 – 3 6 8
$C$ 4 3 – 5 10
$D$ 9 6 5 – 2
$E$ 11 8 10 2 –
  • Kruskal's algorithm 克鲁斯卡尔算法: take the edges in order of weight, and keep each one unless it makes a cycle. $DE = 2$, $BC = 3$, $AC = 4$, $CD = 5$; $BD = 6$ is rejected because $B$, $C$ and $D$ are already joined. Total 14 km.
  • Prim's algorithm 普里姆算法: start at any vertex and repeatedly add the shortest edge that reaches a new vertex. It suits a table: from $A$, add $AC = 4$, then $CB = 3$, then $CD = 5$, then $DE = 2$. Same tree, total 14 km.
Left: a street network A to E with edges AB 7, AC 4, BC 3, BD 6, BE 8, CD 5 and DE 2, odd vertices C and D highlighted and edge CD doubled. Right: the five villages fully joined, with the minimum spanning tree DE, BC, AC and CD drawn thick, total 14
Left: the postman repeats $CD$. Right: the minimum spanning tree weighs 14

The Chinese postman problem

The Chinese postman problem 中国邮递员问题 asks for the shortest route that uses every edge at least once and returns to the start, like a postman covering every street. It was first studied by the Chinese mathematician Guan Meigu in 1960.

  1. Find the vertices of odd degree.
  2. If there are none, the graph has an Eulerian circuit: the answer is the total weight.
  3. If there are two, add the shortest route between them to the total weight.
  4. If there are four, try all three ways of pairing them and add the pairing with the least total.

Worked example. The street network in the figure has edges $AB = 7$, $AC = 4$, $BC = 3$, $BD = 6$, $BE = 8$, $CD = 5$ and $DE = 2$, total 35. The degrees are $A$ 2, $B$ 4, $C$ 3, $D$ 3, $E$ 2. The odd vertices are $C$ and $D$, and the shortest route between them is $CD = 5$. The shortest route is $35 + 5 = 40$ km, repeating $CD$.

The travelling salesman problem

The travelling salesman problem 旅行商问题 asks for the shortest cycle that visits every vertex. No quick method is known for large graphs, so we find bounds.

The complete network on A, B, C, D with weights AB 4, AC 2, AD 7, BC 3, BD 5, CD 6; the nearest-neighbour tour A–C–B–D–A is drawn in orange with steps numbered 1 to 4, beside the working: tour 17 is an upper bound, deleting A gives the lower bound 14
Nearest neighbour gives an upper bound, the deleted-vertex MST a lower bound: the optimal tour lies between 14 and 17
  • An upper bound 上界, from the nearest neighbour algorithm: from a start vertex, always go to the nearest unvisited vertex, then return. From $A$: $A \to C$ (4) $\to B$ (3) $\to D$ (6) $\to E$ (2) $\to A$ (11), total 26.
  • A lower bound 下界, from the deleted vertex algorithm: delete a vertex, find a minimum spanning tree of the rest, then add the two shortest edges from the deleted vertex. Delete $A$: the tree $DE$, $BC$, $CD$ has weight 10, and the two shortest edges from $A$ are 4 and 7, so the lower bound is 21.

So the shortest tour $T$ satisfies $21 \le T \le 26$. Deleting a different vertex can give a better (higher) lower bound: deleting $C$ gives 22. Always state which algorithm and which start vertex you used.

Common mistakes.

  • Using the slant height of a cone or pyramid where the formula needs the perpendicular height.
  • Leaving the calculator in the wrong angle mode.
  • Forgetting the fraction of the circle: a sector of $\theta^\circ$ has area $\dfrac{\theta}{360}\pi r^2$.
  • Measuring a bearing anticlockwise or from east. Bearings are clockwise from north, with three figures.
  • Drawing a Voronoi edge anywhere between two sites. Each edge lies on the perpendicular bisector of the two sites.
  • Adding a site without redrawing every cell it takes area from.
  • HL: applying matrix transformations in the wrong order: $\mathbf{BA}$ means apply $\mathbf A$ first.
  • HL: forgetting the area scale factor is $|\det\mathbf M|$.
  • HL: in Kruskal's algorithm, adding an edge that makes a cycle.
  • HL: treating the nearest-neighbour route as optimal. It gives an upper bound; the deleted-vertex method gives a lower bound.
  • HL: in the Chinese postman problem, repeating any edges. Repeat the shortest pairing of the odd vertices.
Vocabulary Train
English
spanning tree/ˈspænɪŋ triː/
minimum spanning tree/ˈmɪnɪməm ˈspænɪŋ triː/
Kruskal's algorithm/ˈkrʌsklz ˈælɡərɪθəm/
Prim's algorithm/prɪmz ˈælɡərɪθəm/
Chinese postman problem/tʃaɪˈniːz ˈpəʊstmən ˈprɒbləm/
travelling salesman problem/ˈtrævəlɪŋ ˈseɪlzmən ˈprɒbləm/
upper bound/ˈʌpə baʊnd/
lower bound/ˈləʊə baʊnd/
3.11

Practice

  1. Find the distance between $(1, 2, 3)$ and $(4, 6, 15)$, and their midpoint.
  2. A pyramid has a square base of side 6 cm and height 4 cm. Find its volume and total surface area.
  3. A silo is a cylinder of radius 3 m and height 10 m with a hemisphere on top. Find its volume.
  4. A cuboid measures 8 cm by 6 cm by 5 cm. Find the angle between a space diagonal and the base.
  5. The angle of elevation of the top of a tower from 40 m away is 32°. Find its height.
  6. From a cliff 60 m high, the angle of depression of a boat is 18°. How far is the boat from the foot of the cliff?
  7. In triangle $ABC$, $A = 48°$, $B = 75°$ and $a = 12$ cm. Find $b$ and the area.
  8. Find the largest angle of a triangle with sides 7, 8 and 10 m.
  9. A ship sails 12 km on a bearing of 050°, then 20 km on 160°. Find its distance and bearing from the start.
  10. A slice of pizza of radius 15 cm has angle 40°. Find its arc length, area and perimeter.
  11. Find the perpendicular bisector of $P(2, 1)$ and $Q(6, 5)$.
  12. Wells are at $A(1, 1)$, $B(7, 1)$ and $C(1, 7)$. Find the edges between them and the Voronoi vertex.
  13. A fourth well is at $D(9, 9)$. Find the bisector of $B$ and $D$, and the vertex where it meets $y = x$.
  14. Explain why the vertex in question 13 is a good place for a storage tank that must be as far as possible from all four wells, in the region $0 \le x, y \le 10$.
  15. AHL. Convert 150° to radians, and find the arc and area of a sector of radius 8 m and angle 1.2 radians.
  16. AHL. $\theta$ is obtuse and $\sin\theta = 0.6$. Find $\cos\theta$ and $\tan\theta$.
  17. AHL. Solve $3\sin x + 1 = 2.5$ for $0 \le x \le 2\pi$.
  18. AHL. Find the single matrix for a rotation of 90° anticlockwise followed by an enlargement with scale factor 2, and the area of the image of a triangle of area 3.
  19. AHL. Write the matrix for a reflection in $y = x$, and find its determinant. What does the sign tell you?
  20. AHL. Find the angle between $\begin{pmatrix} 2 \\ 1 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 1 \\ 3 \\ 2 \end{pmatrix}$, and the area of the triangle they make.
  21. AHL. A boat moves by $\mathbf{r} = t\begin{pmatrix} 6 \\ 8 \end{pmatrix}$ km. Find its speed, and its closest distance to a lighthouse at $(20, 10)$.
  22. AHL. A ball moves by $\mathbf{r} = \begin{pmatrix} 15t \\ 20t - 4.9t^2 \end{pmatrix}$ m. When and how far away does it land?
  23. AHL. A graph has edges $AB$, $AC$, $BC$ and $CD$. Write its adjacency matrix, and find the number of walks of length 2 from $A$ to $D$.
  24. AHL. Use Kruskal's algorithm on the table of village distances. State the order of the edges and the total weight.
  25. AHL. A network has odd vertices $P$, $Q$, $R$ and $S$, with shortest routes $PQ = 4$, $RS = 6$, $PR = 5$, $QS = 7$, $PS = 8$ and $QR = 3$. The edges total 52. Find the length of the shortest Chinese postman route.
  26. AHL. For the village table, find an upper bound for the travelling salesman problem by nearest neighbour from $A$, and a lower bound by deleting $C$.

Answers.

  1. 13; $(2.5, 4, 9)$.
  2. 48 cm³; 96 cm².
  3. $108\pi \approx 339$ m³.
  4. $\tan\theta = \frac{5}{10}$, $\theta \approx 26.6°$.
  5. $40\tan 32° \approx 25.0$ m.
  6. $\frac{60}{\tan 18°} \approx 185$ m.
  7. $b \approx 15.6$ cm; area $\approx 78.5$ cm².
  8. $\cos C = \frac{13}{112}$, $C \approx 83.3°$.
  9. 19.5 km on a bearing of about 125°.
  10. 10.5 cm; 78.5 cm²; 40.5 cm.
  11. $y = -x + 7$.
  12. $x = 4$ for $y \le 4$, $y = 4$ for $x \le 4$, and $y = x$ for $x \ge 4$, meeting at the vertex $(4, 4)$.
  13. $y = -0.25x + 7$; vertex $(5.6, 5.6)$.
  14. It is about 4.81 km from its three nearest wells, further than the other vertex (4.24 km) and any point on the boundary (at most about 4.61 km).
  15. AHL. $\frac{5\pi}{6} \approx 2.62$; arc 9.6 m; area 38.4 m².
  16. AHL. $\cos\theta = -0.8$; $\tan\theta = -0.75$.
  17. AHL. $x = \frac{\pi}{6}$ or $\frac{5\pi}{6}$.
  18. AHL. $\begin{pmatrix} 0 & -2 \\ 2 & 0 \end{pmatrix}$; determinant 4, so area 12.
  19. AHL. $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$; determinant $-1$: area is kept but the shape is flipped over.
  20. AHL. $\theta \approx 53.3°$; area $\frac{1}{2}\sqrt{45} \approx 3.35$.
  21. AHL. 10 km/h; 10 km, at $t = 2$.
  22. AHL. At $t \approx 4.08$ s, about 61.2 m away.
  23. AHL. $M = \begin{pmatrix} 0 & 1 & 1 & 0 \\ 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}$; the $(A, D)$ entry of $M^2$ is 1 (the walk $ACD$).
  24. AHL. $DE$ 2, $BC$ 3, $AC$ 4, $CD$ 5 ($BD$ rejected); total 14.
  25. AHL. Pairings: $4 + 6 = 10$, $5 + 7 = 12$, $8 + 3 = 11$. Use $PQ$ and $RS$: $52 + 10 = 62$.
  26. AHL. Upper bound 26 ($ACBDEA$); deleting $C$: tree $DE$, $BD$, $AB$ has weight 15, plus $CB = 3$ and $CA = 4$, so lower bound 22.
3.12

Exam tips

  • Draw the right-angled triangle you are using on its own, flat on the page.
  • Draw a north line at every point where a bearing is measured, and give bearings with three figures.
  • Check whether the question wants the curved surface or the total surface area.
  • In degrees, a sector is the fraction $\frac{\theta}{360}$ of the circle.
  • A Voronoi edge is part of a perpendicular bisector: find the midpoint and the negative reciprocal gradient.
  • For the largest empty circle, compare the vertices with the boundary and the corners.
  • HL: set the GDC to radians when using $l = r\theta$ or $A = \frac{1}{2}r^2\theta$.
  • HL: for “$A$ then $B$”, the matrix is $BA$; area scales by $|\det|$.
  • HL: for closest approach, minimise the distance squared, then check that the connecting vector is perpendicular to the velocity.
  • HL: name the algorithm, show each step, and state whether a result is an upper or a lower bound.
Explore

Angle reasoning, similarity and mensuration

For similar shapes with length scale factor k, areas scale by k² and volumes by k³

Match the scale factors to the correct dimension before using 12 cm² or 8 cm³.

Explore

Right triangles and non-right triangles

In a right triangle a²+b²=c²; sinθ=opposite/hypotenuse, cosθ=adjacent/hypotenuse and tanθ=opposite/adjacent

Compare the model with the worked case and explain one change.

Explore

Vectors and transformation geometry

Add corresponding vector components

Compare the model with the worked case and explain one change.

Was this helpful?

Interactive lessons on this topic

Work through it step by step, with instant-check exercises.

More topics in IB Mathematics: Applications and Interpretation HL

Log in or create account

IGCSE, A-Level & AP