Resources For Teachers For Tutors For Students & Parents AI New Books Pricing
Year 11 (2026) Maths Advanced (2026) Linear Functions

Gradients Of Line Segments And Lines

20 practice questions 0 video lessons Theory + worked examples
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

The gradient of a line measures its steepness as rise over run, and the angle of inclination links it to the angle the line makes with the \(x\)-axis through \(m=\tan\theta\). This Year 11 Mathematics Advanced page covers the gradient formula, gradients from equations and angles, exact surd gradients, parallel and perpendicular lines, collinear points, and finding an unknown from a gradient condition.

The gradient \(m\) of a line measures how steep it is: the change in \(y\) (the rise) for each change in \(x\) (the run). A line with a positive gradient goes up from left to right; a negative gradient goes down. A horizontal line has gradient \(0\), and a vertical line has an undefined gradient.

A straight line has the same gradient everywhere, so any two points on it give the same value of \(\dfrac{\text{rise}}{\text{run}}\). This is the gradient formula.

The angle of inclination \(\theta\) of a line is the angle measured anticlockwise from the positive direction of the \(x\)-axis to the line, with \(0^\circ\le\theta\lt 180^\circ\). Since rise over run is the tangent ratio, \(m=\tan\theta\). A positive gradient gives an acute angle; a negative gradient gives an obtuse angle.

To read the gradient from an equation, rearrange it to the form \(y=mx+c\). The gradient is the coefficient of \(x\).

Parallel lines have equal gradients. Perpendicular lines (neither vertical) have gradients that multiply to \(-1\). Points are collinear if they lie on one straight line.

Gradient as rise over run, and the angle of inclinationThe line through (1, 1) and (5, 3) rises 2 for a run of 4, so its gradient is 1/2. It makes an acute angle theta with the positive x-axis where it crosses at (-1, 0), and tan theta = 1/2. x y −1 1 2 3 4 5 6 1 2 3 4 θ (1, 1) (5, 3) run = 4 rise = 2
From \((1,1)\) to \((5,3)\) the rise is \(2\) and the run is \(4\), so \(m=\tan\theta=\dfrac{1}{2}\) and \(\theta\approx 26.6^\circ\).
Obtuse angle of inclination for a negative gradientThe line y = -x + 3 falls from left to right. Measured anticlockwise from the positive x-direction at (3, 0), its angle of inclination is 135 degrees; the acute angle it makes with the negative x-axis is 45 degrees. tan 135 degrees = -1. x y 1 2 4 5 1 2 4 θ = 135° 45°
\(y=-x+3\) has \(m=-1\). The angle of inclination is obtuse: \(\theta=180^\circ-45^\circ=135^\circ\), and \(\tan 135^\circ=-1\).

For the points \((x_1,y_1)\) and \((x_2,y_2)\):

\[m=\dfrac{y_2-y_1}{x_2-x_1}=\dfrac{\text{rise}}{\text{run}}\]
m equals y2 minus y1 over x2 minus x1, rise over run

For a line with angle of inclination \(\theta\), where \(0^\circ\le\theta\lt 180^\circ\) and \(\theta\neq 90^\circ\):

\[m=\tan\theta\]
m equals tan theta

Exact gradients for the special angles (\(\dfrac{1}{\sqrt{3}}=\dfrac{\sqrt{3}}{3}\)):

\(\theta\)\(0^\circ\)\(30^\circ\)\(45^\circ\)\(60^\circ\)\(120^\circ\)\(135^\circ\)\(150^\circ\)
\(m=\tan\theta\)\(0\)\(\dfrac{1}{\sqrt{3}}\)\(1\)\(\sqrt{3}\)\(-\sqrt{3}\)\(-1\)\(-\dfrac{1}{\sqrt{3}}\)

Parallel and perpendicular lines with gradients \(m_1\) and \(m_2\):

\[\text{parallel: } m_1=m_2\qquad\qquad \text{perpendicular: } m_1m_2=-1,\ \text{ so } m_2=-\dfrac{1}{m_1}\]
parallel lines: m1 equals m2. perpendicular lines: m1 times m2 equals negative 1, so m2 equals negative 1 over m1
Gradient from an equation. Make \(y\) the subject. \(2x-3y+6=0\) gives \(3y=2x+6\), so \(y=\dfrac{2}{3}x+2\) and \(m=\dfrac{2}{3}\).
Perpendicular gradient: flip and change the sign. \(\dfrac{2}{3}\) becomes \(-\dfrac{3}{2}\); \(-4\) becomes \(\dfrac{1}{4}\). Check: the product must be \(-1\).
Collinear points. \(A\), \(B\) and \(C\) are collinear when \(m_{AB}=m_{BC}\): the two segments share the point \(B\) and have the same steepness, so they lie on one line.

How to find a gradient

  1. From two points: substitute into \(m=\dfrac{y_2-y_1}{x_2-x_1}\), keeping the same order on the top and the bottom. Simplify surds and rationalise the denominator if asked.
  2. From an equation: rearrange to \(y=mx+c\) and read off the coefficient of \(x\).
  3. From an angle: \(m=\tan\theta\). Use exact values for \(30^\circ\), \(45^\circ\), \(60^\circ\) and their supplements.

How to find the angle of inclination

  1. Find the gradient \(m\).
  2. If \(m\gt 0\): \(\theta=\tan^{-1}m\), an acute angle.
  3. If \(m\lt 0\): find the related acute angle \(\tan^{-1}|m|\), then \(\theta=180^\circ-\) that angle (Example 2).

Parallel, perpendicular and collinear problems

  1. Write both gradients, in terms of the unknown if there is one.
  2. Set up the condition: \(m_1=m_2\) (parallel or collinear) or \(m_1m_2=-1\) (perpendicular).
  3. Solve for the unknown. With the unknown in a denominator, multiply both sides by it first.
  4. To show a right angle at a vertex, show that the gradients of the two sides meeting there multiply to \(-1\) (Example 4).
  5. Lines that meet on the \(y\)-axis have the same \(y\)-intercept, so also set \(c_1=c_2\).
  6. Equation of a perpendicular line through \((x_1,y_1)\): find \(m_\perp=-\dfrac{1}{m}\), substitute into the point–gradient form \(y-y_1=m_\perp(x-x_1)\), then rearrange. Perpendicular to \(y=2x-1\) through \((4,1)\): \(m_\perp=-\dfrac{1}{2}\), \(y-1=-\dfrac{1}{2}(x-4)\), \(2y-2=-x+4\), so \(x+2y-6=0\).
Example 1 — Gradient from two points
Find the gradient of the line through each pair of points.
(i) \(A(-2,5)\) and \(B(4,-7)\)
(ii) \(P(\sqrt{2},3)\) and \(Q(2\sqrt{2},5)\), in exact form
Solution

Use the gradient formula \(m=\dfrac{y_2-y_1}{x_2-x_1}\).

(i)

\(m\)\(=\)\(\dfrac{-7-5}{4-(-2)}\)
\(\)\(=\)\(\dfrac{-12}{6}\)
\(\)\(=\)\(-2\)
m equals negative 7 minus 5 over 4 minus negative 2, which is negative 12 over 6, which is negative 2
Gradient of the segment from A(-2, 5) to B(4, -7)The segment from A(-2, 5) down to B(4, -7). The dashed triangle shows a run of 6 and a rise of -12, so the gradient is -2. x y A(−2, 5) B(4, −7) run 6 rise −12

\(\therefore\) \(\boldsymbol{m=-2}\). The line falls from left to right, as a negative gradient should.

(ii)

\(m\)\(=\)\(\dfrac{5-3}{2\sqrt{2}-\sqrt{2}}\)
\(\)\(=\)\(\dfrac{2}{\sqrt{2}}\times\dfrac{\sqrt{2}}{\sqrt{2}}\)
\(\)\(=\)\(\dfrac{2\sqrt{2}}{2}\)
\(\)\(=\)\(\sqrt{2}\)
m equals 2 over root 2, which is root 2

\(\therefore\) \(\boldsymbol{m=\sqrt{2}}\)

Example 2 — Angle of inclination
(i) A line has an angle of inclination of \(60^\circ\). Find its exact gradient.
(ii) Find the angle of inclination of the line \(3x+2y-6=0\), correct to 1 decimal place.
Solution

(i) \(m=\tan 60^\circ\)

\(\therefore\) \(\boldsymbol{m=\sqrt{3}}\)

(ii) Rearrange to find the gradient:

\(3x+2y-6\)\(=\)\(0\)
\(2y\)\(=\)\(-3x+6\)
\(y\)\(=\)\(-\dfrac{3}{2}x+3\)
3x plus 2y minus 6 equals 0, so y equals negative 3 over 2 x plus 3

\(m=-\dfrac{3}{2}\), so \(\tan\theta=-\dfrac{3}{2}\). The gradient is negative, so \(\theta\) is obtuse. Find the related acute angle first:

\(\tan^{-1}\dfrac{3}{2}\)\(=\)\(56.309\ldots^\circ\)
\(\theta\)\(=\)\(180^\circ-56.309\ldots^\circ\)
\(\)\(=\)\(123.690\ldots^\circ\)
the related angle is tan inverse of 3 over 2, about 56.3 degrees, so theta is 180 degrees minus 56.3 degrees, about 123.7 degrees
Angle of inclination of 3x + 2y - 6 = 0The line 3x + 2y - 6 = 0 crosses the axes at (2, 0) and (0, 3). Its angle of inclination theta at (2, 0) is obtuse, about 123.7 degrees; the acute angle with the negative x-axis is about 56.3 degrees. x y 1 3 4 1 2 4 θ 56.3°

\(\therefore\) \(\boldsymbol{\theta\approx 123.7^\circ}\)

Example 3 — Parallel or perpendicular
The lines \(\ell_1: 2x+y-4=0\) and \(\ell_2: 4x+ky+3=0\) are given. Find the value of \(k\) if the lines are
(a) parallel
(b) perpendicular.
Solution

Write both lines in the form \(y=mx+c\):

\(\ell_1:\ y\)\(=\)\(-2x+4,\ \ m_1=-2\)
\(\ell_2:\ ky\)\(=\)\(-4x-3\)
\(y\)\(=\)\(-\dfrac{4}{k}x-\dfrac{3}{k},\ \ m_2=-\dfrac{4}{k}\)
l1 has gradient negative 2; l2 has gradient negative 4 over k

(a) Parallel: \(m_1=m_2\)

\(-\dfrac{4}{k}\)\(=\)\(-2\)
\(-4\)\(=\)\(-2k\)
\(k\)\(=\)\(2\)
negative 4 over k equals negative 2, so k equals 2

(b) Perpendicular: \(m_1m_2=-1\)

\(-2\times\left(-\dfrac{4}{k}\right)\)\(=\)\(-1\)
\(\dfrac{8}{k}\)\(=\)\(-1\)
\(k\)\(=\)\(-8\)
negative 2 times negative 4 over k equals negative 1, so 8 over k equals negative 1 and k equals negative 8

\(\therefore\) (a) \(\boldsymbol{k=2}\)  (b) \(\boldsymbol{k=-8}\)

Line l1 with the parallel and perpendicular casesThe line l1: 2x + y - 4 = 0 (gradient -2). The dashed red line 4x + 2y + 3 = 0 (k = 2) is parallel to it. The orange line 4x - 8y + 3 = 0 (k = -8, gradient 1/2) meets it at right angles. x y ℓ₁ k = 2 k = −8

Check (b): with \(k=-8\), \(\ell_2\) is \(y=\dfrac{1}{2}x+\dfrac{3}{8}\), and \(-2\times\dfrac{1}{2}=-1\).

Example 4 — Making a right angle
The points \(A(-1,2)\), \(B(3,4)\) and \(C(k,-4)\) are the vertices of a triangle. Find the value of \(k\) for which \(\triangle ABC\) is right-angled at \(B\).
Solution

The right angle is at \(B\), so \(AB\perp BC\) and \(m_{AB}\times m_{BC}=-1\).

\(m_{AB}\)\(=\)\(\dfrac{4-2}{3-(-1)}=\dfrac{2}{4}=\dfrac{1}{2}\)
the gradient of AB is 2 over 4, which is one half

So \(m_{BC}=-2\):

\(\dfrac{-4-4}{k-3}\)\(=\)\(-2\)
\(-8\)\(=\)\(-2(k-3)\)
\(4\)\(=\)\(k-3\)
\(k\)\(=\)\(7\)
negative 8 over k minus 3 equals negative 2, so k minus 3 equals 4 and k equals 7

\(\therefore\) \(\boldsymbol{k=7}\)

Triangle ABC with a right angle at BTriangle with vertices A(-1, 2), B(3, 4) and C(7, -4). AB has gradient 1/2 and BC has gradient -2, so the angle at B is a right angle. x y A(−1, 2) B(3, 4) C(7, −4) m = 1/2 m = −2

Check: \(m_{BC}=\dfrac{-4-4}{7-3}=-2\) and \(m_{AB}\times m_{BC}=\dfrac{1}{2}\times(-2)=-1\), so \(AB\perp BC\).

Common pitfalls

Keep the same order on the top and the bottom. If the top is \(y_2-y_1\), the bottom must be \(x_2-x_1\). Mixing the order flips the sign of the gradient.
Rise over run, not run over rise. The change in \(y\) goes on top. A quick check: a line rising steeply should have a gradient bigger than \(1\).
Make \(y\) the subject before reading the gradient. The gradient of \(3x+4y-12=0\) is \(-\dfrac{3}{4}\), not \(3\).
A negative gradient gives an obtuse angle. A calculator gives \(\tan^{-1}(-1.5)\approx -56.3^\circ\), which is not an angle of inclination. Use the related acute angle and subtract it from \(180^\circ\).
Perpendicular means flip and change the sign. The perpendicular gradient to \(\dfrac{2}{3}\) is \(-\dfrac{3}{2}\), not \(-\dfrac{2}{3}\) and not \(\dfrac{3}{2}\).

Frequently asked questions

How do you find the gradient of a line through two points?

Subtract the \(y\)-coordinates and divide by the difference of the \(x\)-coordinates, in the same order: \(m=\dfrac{y_2-y_1}{x_2-x_1}\). For \((1,2)\) and \((4,8)\), \(m=\dfrac{6}{3}=2\).

What is the angle of inclination of a line?

It is the angle measured anticlockwise from the positive direction of the \(x\)-axis to the line, with \(0^\circ\le\theta\lt 180^\circ\). The gradient is its tangent: \(m=\tan\theta\).

How do you find the gradient of a perpendicular line?

Take the negative reciprocal: turn the gradient upside down and change its sign. Perpendicular to a gradient of \(3\) is a gradient of \(-\dfrac{1}{3}\), because \(m_1m_2=-1\).

What is the gradient of a horizontal or a vertical line?

A horizontal line has gradient \(0\) because its rise is \(0\). A vertical line has an undefined gradient because its run is \(0\), and division by \(0\) is not defined.

How do you show that three points are collinear?

Find \(m_{AB}\) and \(m_{BC}\). If they are equal, the two segments have the same steepness and share the point \(B\), so \(A\), \(B\) and \(C\) lie on one straight line.