7.1 Length, Gradient and Parallel Lines

SL 2.1

In this section you will learn
  • how to find the length of a line segment from the coordinates of its end points
  • how to find the gradient of a line through two points
  • the angle of inclination of a line, and the link \(m = \tan\theta\)
  • that parallel lines have equal gradients
  • how to use gradients to show that three points are collinear

Length of a line segment

Take two points \(P(x_1, y_1)\) and \(Q(x_2, y_2)\). Draw a horizontal line through \(P\) and a vertical line through \(Q\). They meet at \(R(x_2, y_1)\), and triangle \(PQR\) has a right angle at \(R\) (Figure 1).

Figure 1: The segment \(PQ\) is the hypotenuse of a right-angled triangle

The two shorter sides are

\[ PR = x_2 - x_1 \qquad\text{and}\qquad QR = y_2 - y_1 . \]

By Pythagoras’ theorem, \(PQ^2 = PR^2 + QR^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2\). So:

Distance between two points \((x_1, y_1)\) and \((x_2, y_2)\) In the formula booklet

\[ d = \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2} \]

For the segment \(PQ\) above this is the same as \(PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\).

  • \(d\): the distance between the two points
  • \((x_1, y_1)\): the coordinates of the first point
  • \((x_2, y_2)\): the coordinates of the second point

The differences are squared, so the order of the points does not matter.

Example 1 Find the distance between the points

(a) \((-3, 4)\) and \((5, -2)\),

(b) \((2, -1)\) and \((-4, 3)\), giving your answer in the form \(a\sqrt{b}\).

(a)

\[ d = \sqrt{\big(5 - (-3)\big)^2 + (-2 - 4)^2} = \sqrt{8^2 + (-6)^2} = \sqrt{64 + 36} = \sqrt{100} = 10 . \]

(b)

\[ d = \sqrt{(-4 - 2)^2 + \big(3 - (-1)\big)^2} = \sqrt{36 + 16} = \sqrt{52} = 2\sqrt{13} . \]

Gradient of a straight line

A steep road is harder to climb than a gentle one. We measure steepness with the gradient (or slope). The gradient is the vertical change (the rise) divided by the horizontal change (the run).

For example, a road that rises \(6\) m over a horizontal distance of \(120\) m has gradient \(\dfrac{6}{120} = 0.05\).

Gradient formula — the line through \(A(x_1, y_1)\) and \(B(x_2, y_2)\) In the formula booklet

\[ m = \frac{y_2 - y_1}{x_2 - x_1} \qquad \left(\text{or } m = \frac{y_1 - y_2}{x_1 - x_2}\right), \qquad x_1 \ne x_2 \]

  • \(m\): the gradient of the line
  • \((x_1, y_1)\): the coordinates of \(A\)
  • \((x_2, y_2)\): the coordinates of \(B\)

Use the same order on the top and on the bottom.

Gradient The line …
\(m > 0\) goes up from left to right
\(m < 0\) goes down from left to right
\(m = 0\) is horizontal, \(y = b\)
not defined is vertical, \(x = a\) (the run is \(0\))

Example 2 The line joining the points \((2k, 5)\) and \((k, -7)\) has gradient \(4\). Find the value of \(k\).

\[ \frac{-7 - 5}{k - 2k} = 4 \;\Longrightarrow\; \frac{-12}{-k} = 4 \;\Longrightarrow\; \frac{12}{k} = 4 \;\Longrightarrow\; k = 3 . \]

Check: the points are \((6, 5)\) and \((3, -7)\), and \(\dfrac{-7 - 5}{3 - 6} = \dfrac{-12}{-3} = 4\) ✓.

Angle of inclination

The angle of inclination \(\theta\) of a line is the angle between the line and the positive direction of the \(x\)-axis, measured anticlockwise. So \(0^\circ \le \theta < 180^\circ\). It can be acute or obtuse (Figure 2).

Figure 2: The angle of inclination \(\theta\)

Look again at Figure 1. The angle at \(P\) between \(PR\) and \(PQ\) is \(\theta\), because \(PR\) is parallel to the \(x\)-axis. In the right-angled triangle,

\[ \tan\theta = \frac{\text{opposite}}{\text{adjacent}} = \frac{QR}{PR} = \frac{y_2 - y_1}{x_2 - x_1} = m . \]

Gradient and angle of inclination Not in the formula booklet

\[ m = \tan\theta , \]

  • \(m\): the gradient of the line
  • \(\theta\): the angle the line makes with the positive direction of the \(x\)-axis (the angle of inclination)
  • If \(m > 0\), then \(\theta\) is acute: \(\theta = \tan^{-1} m\).
  • If \(m < 0\), then \(\theta\) is obtuse. The calculator gives a negative angle for \(\tan^{-1} m\), so add \(180^\circ\): \(\theta = \tan^{-1} m + 180^\circ\).

Example 3 (a) Find the acute angle that the line segment joining \(A(1, -3)\) and \(B(4, 6)\) makes with the positive direction of the \(x\)-axis.

(b) A line has angle of inclination \(60^\circ\). Find its exact gradient.

(c) Find the angle of inclination of the line through \((-1, 4)\) and \((3, 0)\).

(a) \(m = \dfrac{6 - (-3)}{4 - 1} = \dfrac{9}{3} = 3\). So \(\tan\theta = 3\) and

\[ \theta = \tan^{-1} 3 = 71.6^\circ \;(\text{3 s.f.}). \]

(b) \(m = \tan 60^\circ = \sqrt{3}\).

(c) \(m = \dfrac{0 - 4}{3 - (-1)} = \dfrac{-4}{4} = -1\). The gradient is negative, so \(\theta\) is obtuse:

\[ \theta = \tan^{-1}(-1) + 180^\circ = -45^\circ + 180^\circ = 135^\circ . \]

Check that the calculator is in degree mode (the top right of the screen must show DEG; click on RAD/DEG to switch).

You can also open Document Settings and change Angle to Degree.

Document Settings: the Angle box (here Degree).

On a Calculator page type tan⁻¹(3) (press ctrl then tan). The answer is \(71.565\ldots^\circ\). For a negative gradient, the calculator gives a negative angle: for example tan⁻¹(-2) \(= -63.4^\circ\). Add \(180^\circ\) to get the angle of inclination, \(116.6^\circ\).

Gradients of parallel lines

Parallel lines make the same angle with the \(x\)-axis. So they have the same value of \(\tan\theta\), which means the same gradient.

Parallel lines Not in the formula booklet

The lines \(y = m_1 x + c_1\) and \(y = m_2 x + c_2\) are parallel if and only if \(m_1 = m_2\).

  • \(m_1\): the gradient of the first line
  • \(c_1\): the \(y\)-intercept of the first line
  • \(m_2\): the gradient of the second line
  • \(c_2\): the \(y\)-intercept of the second line

For example, \(y = -3x\), \(\;y = -3x + 1\) and \(y = -3x - 4\) are a family of parallel lines. All have gradient \(-3\).

“If and only if” means the result works both ways: equal gradients give parallel lines, and parallel lines have equal gradients.

Example 4 Determine whether the lines \(AB\) and \(CD\) are parallel. Give a reason for your answer.

(a) \(A(1, 2)\), \(B(5, 4)\), \(C(-2, -4)\), \(D(4, -1)\)

(b) \(A(-1, 3)\), \(B(2, -3)\), \(C(0, 5)\), \(D(4, -2)\)

(a) \(m_{AB} = \dfrac{4 - 2}{5 - 1} = \dfrac{2}{4} = \dfrac{1}{2}\) and \(m_{CD} = \dfrac{-1 - (-4)}{4 - (-2)} = \dfrac{3}{6} = \dfrac{1}{2}\).

The gradients are equal, so \(AB\) is parallel to \(CD\). (They are not the same line: \(m_{AC} = \dfrac{-4 - 2}{-2 - 1} = 2 \ne \dfrac{1}{2}\).)

(b) \(m_{AB} = \dfrac{-3 - 3}{2 - (-1)} = \dfrac{-6}{3} = -2\) and \(m_{CD} = \dfrac{-2 - 5}{4 - 0} = -\dfrac{7}{4}\).

The gradients are different, so \(AB\) is not parallel to \(CD\).

Collinear points

Points are collinear if they lie on the same straight line. To show that \(P\), \(Q\) and \(R\) are collinear, show that \(m_{PQ} = m_{QR}\). The two segments are then parallel and share the point \(Q\), so they lie on one line.

Example 5 Show that the points \(P(1, k + 3)\), \(Q(-3, k - 5)\) and \(R(4, k + 9)\) are collinear for every value of \(k\).

\[ m_{PQ} = \frac{(k - 5) - (k + 3)}{-3 - 1} = \frac{-8}{-4} = 2, \qquad m_{QR} = \frac{(k + 9) - (k - 5)}{4 - (-3)} = \frac{14}{7} = 2 . \]

\(PQ\) and \(QR\) have the same gradient and the common point \(Q\). So \(P\), \(Q\) and \(R\) are collinear. The value of \(k\) cancels, so this is true for every \(k\).

Common errors

✗ Wrong ✓ Right Why
\(m = \dfrac{x_2 - x_1}{y_2 - y_1}\) \(m = \dfrac{y_2 - y_1}{x_2 - x_1}\) Gradient is rise over run: the \(y\)-change goes on top.
\(m = \dfrac{y_2 - y_1}{x_1 - x_2}\) Same order on top and bottom Mixing the order changes the sign of \(m\).
\(\sqrt{(-6)^2 + 4^2} = -6 + 4\) \(\sqrt{36 + 16} = \sqrt{52}\) Square each difference first; \(\sqrt{a^2 + b^2} \ne a + b\).
\(m = -1\), so \(\theta = \tan^{-1}(-1) = -45^\circ\) \(\theta = -45^\circ + 180^\circ = 135^\circ\) The angle of inclination is between \(0^\circ\) and \(180^\circ\): add \(180^\circ\) when \(m < 0\).
\(m_{AB} = m_{CD}\), so \(A, B, C, D\) are collinear \(AB \parallel CD\) only Equal gradients give parallel lines. Collinear needs a shared point as well.

Exercises

1 Find the distance between the points \((-4, -1)\) and \((2, 7)\).

\(d = \sqrt{(2 + 4)^2 + (7 + 1)^2} = \sqrt{36 + 64} = \sqrt{100} = 10\).

2 Find the exact distance between \((3, -2)\) and \((-1, 4)\). Give your answer in the form \(a\sqrt{b}\).

\(d = \sqrt{(-1 - 3)^2 + (4 + 2)^2} = \sqrt{16 + 36} = \sqrt{52} = 2\sqrt{13}\).

3 The distance between \(A(a, 3)\) and \(B(5, -1)\) is \(5\). Find the possible values of \(a\).

\((5 - a)^2 + (-1 - 3)^2 = 25 \Rightarrow (5 - a)^2 = 9 \Rightarrow 5 - a = \pm 3\).

So \(a = 2\) or \(a = 8\).

4 Find the gradient of the line through \((-2, 5)\) and \((4, 1)\).

\(m = \dfrac{1 - 5}{4 - (-2)} = \dfrac{-4}{6} = -\dfrac{2}{3}\).

5 The line joining \((k, 3)\) and \((5, 2k)\) has gradient \(-3\). Find \(k\).

\(\dfrac{2k - 3}{5 - k} = -3 \Rightarrow 2k - 3 = -15 + 3k \Rightarrow k = 12\).

Check: \((12, 3)\) and \((5, 24)\) give \(\dfrac{24 - 3}{5 - 12} = \dfrac{21}{-7} = -3\) ✓.

6 (a) Find the angle of inclination of the line through \((0, -1)\) and \((2, 3)\).

(b) A line has angle of inclination \(135^\circ\). Find its gradient.

(a) \(m = \dfrac{3 - (-1)}{2 - 0} = 2\), so \(\theta = \tan^{-1} 2 = 63.4^\circ\) (3 s.f.).

(b) \(m = \tan 135^\circ = -1\).

7 An access ramp rises \(0.45\) m over a horizontal distance of \(5.4\) m. Find the gradient of the ramp and its angle of inclination.

\(m = \dfrac{0.45}{5.4} = \dfrac{1}{12} \approx 0.0833\).

\(\theta = \tan^{-1}\left(\dfrac{1}{12}\right) = 4.76^\circ\) (3 s.f.).

8 The points \(A(0, 0)\), \(B(4, 1)\), \(C(5, 4)\) and \(D(1, 3)\) are the vertices of a quadrilateral. Show that \(ABCD\) is a parallelogram.

\(m_{AB} = \dfrac{1}{4}\) and \(m_{DC} = \dfrac{4 - 3}{5 - 1} = \dfrac{1}{4}\), so \(AB \parallel DC\).

\(m_{AD} = \dfrac{3}{1} = 3\) and \(m_{BC} = \dfrac{4 - 1}{5 - 4} = 3\), so \(AD \parallel BC\).

Both pairs of opposite sides are parallel, so \(ABCD\) is a parallelogram.

9 Show that the points \(A(-2, -5)\), \(B(1, 1)\) and \(C(4, 7)\) are collinear.

\(m_{AB} = \dfrac{1 + 5}{1 + 2} = 2\) and \(m_{BC} = \dfrac{7 - 1}{4 - 1} = 2\).

Equal gradients and the common point \(B\), so \(A\), \(B\), \(C\) are collinear.

10 The points \((1, 2)\), \((3, 8)\) and \((t, 14)\) are collinear. Find \(t\).

The gradient of the first two points is \(\dfrac{8 - 2}{3 - 1} = 3\). So

\[ \frac{14 - 2}{t - 1} = 3 \;\Longrightarrow\; 12 = 3(t - 1) \;\Longrightarrow\; t = 5 . \]