Skip to main content

Linear functions and the straight line for HSC Maths Advanced: gradient as rise over run and as tan of the angle of inclination, the gradient-intercept, point-gradient and general forms, parallel (equal gradients) and perpendicular (product of gradients minus one) conditions, and the length (distance) and midpoint of an interval, with worked examples and practice questions

Syllabus dot point

“Work with the gradient of a line as rise over run and as the tangent of its angle of inclination, write the equation of a line in gradient-intercept, point-gradient and general form, use the parallel and perpendicular gradient conditions, and find the length and midpoint of an interval”

HSCMaths AdvancedYear 11: Functions22 min read

Quick answer

The gradient of the line through P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2) is rise over run, m=y2−y1x2−x1m = \dfrac{y_2 - y_1}{x_2 - x_1}, and it equals tan⁡θ\tan\theta where θ\theta is the line's angle of inclination to the xx-axis (positive gradient acute, negative gradient obtuse). Write a line's equation in gradient-intercept form y=mx+by = mx + b, point-gradient form y−y1=m(x−x1)y - y_1 = m(x - x_1), or general form ax+by+c=0ax + by + c = 0; for the line through two points, find the gradient then use point-gradient form, and tidy. Two lines are parallel when their gradients are equal and perpendicular when the product of their gradients is −1-1 (so the perpendicular gradient is the negative reciprocal, flip and change sign). The length of the interval PQPQ is (x2−x1)2+(y2−y1)2\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} (Pythagoras, kept as an exact surd), and its midpoint is the average of the coordinates, (x1+x22,y1+y22)\left( \dfrac{x_1 + x_2}{2}, \dfrac{y_1 + y_2}{2} \right). Find axis intercepts by setting y=0y = 0 (for the xx-intercept) and x=0x = 0 (for the yy-intercept). A perpendicular bisector combines the midpoint with the perpendicular gradient.

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Practice questions

What this dot point is asking

Every straight line in the plane is captured by two numbers: how steep it is, and where it sits. This dot point is the toolkit for both. The gradient measures steepness as rise over run, and it is also the tangent of the line's angle to the horizontal, which links coordinate geometry to trigonometry. Once you have a gradient and a point, you can write the line's equation in whichever of three standard forms a question wants. Two lines are parallel when their gradients are equal and perpendicular when the product of their gradients is −1-1. And the length and midpoint of the interval joining two points come straight from Pythagoras and from averaging the coordinates.

None of these ideas is hard on its own, but the marks live in choosing the right tool and laying out the working cleanly. A "find the equation of the line through two points" question is really two steps (gradient, then point-gradient form); a "perpendicular" question hinges on the negative-reciprocal gradient; a "distance" question is Pythagoras in disguise. This page is also the launch pad for the rest of coordinate geometry: tangents and normals to curves in calculus are just lines through a point with a known (or perpendicular) gradient, so the technique you build here is used again and again.

The answer

Gradient: rise over run

The gradient of an interval (or of the line through it) measures its steepness as you walk from one point to the other. It is the rise (the vertical change) divided by the run (the horizontal change). For two points P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2),

gradient=riserun=y2−y1x2−x1.\text{gradient} = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}.

The order does not matter as long as you subtract the coordinates the same way in the top and the bottom: swapping PP and QQ changes the sign of both the rise and the run, and the two sign changes cancel. A positive gradient slopes up to the right; a negative gradient slopes down to the right; a horizontal line has gradient 00 (zero rise); and a vertical line has no gradient at all, because the run is zero and you cannot divide by zero.

The figure below shows the line through (−2,−1)(-2, -1) and (2,2)(2, 2). Walking from the first point to the second, the run is 44 to the right and the rise is 33 up, so the gradient is 34\dfrac{3}{4}. The right-angled triangle drawn under the line is the gradient triangle: its horizontal leg is the run, its vertical leg is the rise, and you can build it between any two points on the line and always get the same ratio.

Gradient as rise over runThe line through the points minus two, minus one and two, two. A right-angled gradient triangle has a horizontal run of four to the right and a vertical rise of three up, so the gradient is three quarters.xy-2242-1(-2, -1)(2, 2)run = 4rise = 3gradient m = rise/run = 3/4

Key fact

The gradient of the line through P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2) is

m=riserun=y2−y1x2−x1.m = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}.

Subtract the coordinates in the same order top and bottom. Positive means uphill to the right, negative means downhill, a horizontal line has m=0m = 0, and a vertical line has no gradient (the run is zero). The gradient is the same no matter which two points on the line you choose.

Gradient as the tangent of the angle of inclination

There is a second, equivalent way to read a gradient. The angle of inclination θ\theta is the angle the line makes with the positive xx-axis, measured anticlockwise. Because the gradient triangle is a right-angled triangle with the rise opposite θ\theta and the run adjacent to it,

m=tan⁡θ.m = \tan\theta.

So a gradient and an angle carry the same information. A line of gradient 11 rises at tan⁡−11=45∘\tan^{-1} 1 = 45^\circ; a steeper gradient gives a larger angle. A positive gradient gives an acute angle (0∘<θ<90∘0^\circ < \theta < 90^\circ); a negative gradient gives an obtuse angle (90∘<θ<180∘90^\circ < \theta < 180^\circ), because the line tilts back the other way. To go from a gradient to its angle you take tan⁡−1\tan^{-1} of the gradient; if that comes out negative (as it does for a downhill line, where the calculator returns a value between −90∘-90^\circ and 0∘0^\circ), add 180∘180^\circ to land in the correct 90∘90^\circ to 180∘180^\circ range.

Key fact

The gradient is the tangent of the angle of inclination θ\theta (the angle the line makes with the positive xx-axis):

m=tan⁡θ.m = \tan\theta.

To find the angle from the gradient, take θ=tan⁡−1m\theta = \tan^{-1} m. A positive mm gives an acute angle; a negative mm gives an obtuse angle, so if tan⁡−1m\tan^{-1} m returns a negative value, add 180∘180^\circ.

The three forms of the equation of a line

NESA expects you to move fluently between three standard forms. Each is best for a different job.

  • Gradient-intercept form y=mx+by = mx + b. Here mm is the gradient and bb is the yy-intercept (the value of yy when x=0x = 0). This is the form to use when you can read the gradient and intercept directly, and the form most graphs are sketched from.
  • Point-gradient form y−y1=m(x−x1)y - y_1 = m(x - x_1). This builds the equation of the line with gradient mm that passes through a specific point (x1,y1)(x_1, y_1). It is the workhorse: whenever you know a gradient and one point, start here.
  • General form ax+by+c=0ax + by + c = 0. Every term is on one side and equals zero, with integer coefficients where possible and the coefficient of yy non-zero for a genuine function. This is the tidy "final answer" form, and the one that also covers vertical lines, which the other two forms cannot (a vertical line x=kx = k has no gradient).

When a question does not specify a form, gradient-intercept or general form is acceptable; if you give general form, clear any fractions and divide out any common factor first. To convert y=−32x+52y = -\dfrac{3}{2}x + \dfrac{5}{2} to general form, multiply through by 22 to get 2y=−3x+52y = -3x + 5, then collect: 3x+2y−5=03x + 2y - 5 = 0.

Key fact

The equation of a straight line, in the three forms you must know:

  • gradient-intercept: y=mx+by = mx + b (mm = gradient, bb = yy-intercept);
  • point-gradient: y−y1=m(x−x1)y - y_1 = m(x - x_1) (gradient mm through the point (x1,y1)(x_1, y_1));
  • general: ax+by+c=0ax + by + c = 0 (all terms one side, integer coefficients).

Know a gradient and a point? Use point-gradient form. Then rearrange to whichever form the question wants.

The line through two given points

This is the most common equation question, and it is a clean two-step recipe. First find the gradient from the two points with the rise-over-run formula. Then substitute that gradient and either point into point-gradient form, and tidy up. It does not matter which of the two points you use in the second step; both give the same line, which is a useful self-check.

For the line through A(−3,7)A(-3, 7) and B(5,1)B(5, 1): the gradient is 1−75−(−3)=−68=−34\dfrac{1 - 7}{5 - (-3)} = \dfrac{-6}{8} = -\dfrac{3}{4}, and then through A(−3,7)A(-3, 7), point-gradient form gives y−7=−34(x+3)y - 7 = -\dfrac{3}{4}(x + 3), which tidies to y=−34x+194y = -\dfrac{3}{4}x + \dfrac{19}{4} or, in general form, 3x+4y−19=03x + 4y - 19 = 0. Substituting B(5,1)B(5, 1) into the general form gives 15+4−19=015 + 4 - 19 = 0, confirming BB is on the line.

Parallel and perpendicular lines

Two non-vertical lines are parallel exactly when they have the same gradient. That is the whole test: equal gradients means the lines never meet (or are the same line). Any two vertical lines are also parallel.

Two lines are perpendicular exactly when the product of their gradients is −1-1:

m1m2=−1,equivalentlym2=−1m1.m_1 m_2 = -1, \qquad \text{equivalently} \qquad m_2 = -\frac{1}{m_1}.

So the gradient perpendicular to a given one is its negative reciprocal: flip the fraction and change the sign. The gradient perpendicular to 23\dfrac{2}{3} is −32-\dfrac{3}{2}; the gradient perpendicular to −4-4 is 14\dfrac{1}{4}. The one special case the product rule cannot see is a horizontal line (gradient 00) with a vertical line (no gradient): these are perpendicular, but you cannot multiply 00 by an undefined gradient, so handle that pair by inspection.

The figure below shows a perpendicular pair: y=12x+1y = \dfrac{1}{2}x + 1 has gradient 12\dfrac{1}{2} and y=−2x+6y = -2x + 6 has gradient −2-2, and their product is 12×(−2)=−1\dfrac{1}{2} \times (-2) = -1. They cross at (2,2)(2, 2), and the small square marks the right angle between them.

A perpendicular pair of linesTwo lines meeting at the point two, two at a right angle. One has gradient one half and the other gradient minus two; the product of the gradients is minus one.xy22(2, 2)y = ½x + 1y = -2x + 6gradients ½ and -2: product ½ × (-2) = -1

Key fact

For two non-vertical lines with gradients m1m_1 and m2m_2:

  • parallel if and only if m1=m2m_1 = m_2 (equal gradients);
  • perpendicular if and only if m1m2=−1m_1 m_2 = -1, i.e. m2=−1m1m_2 = -\dfrac{1}{m_1} (negative reciprocal).

The perpendicular gradient is the flip-and-change-sign of the original. A horizontal line and a vertical line are also perpendicular, the one case the product rule cannot test directly.

This same idea tests whether three points are collinear (all on one line): find the gradient between the first pair and the gradient between the second pair, and if the two gradients are equal, the points lie on a single straight line.

Length and midpoint of an interval

The interval joining P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2) has a length and a midpoint, and both come from the run and the rise.

The length (distance) is the hypotenuse of the gradient triangle, so by Pythagoras,

d=(x2−x1)2+(y2−y1)2.d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.

The squares make the order of subtraction irrelevant. Where the answer is not a whole number, leave it as a simplified surd unless a decimal is asked for, for example 45=35\sqrt{45} = 3\sqrt{5}.

The midpoint is the point halfway along, found by averaging the coordinates:

M=(x1+x22,  y1+y22).M = \left( \frac{x_1 + x_2}{2}, \; \frac{y_1 + y_2}{2} \right).

The figure below joins C(2,3)C(2, 3) to D(8,11)D(8, 11). The dashed triangle has run 66 and rise 88, so the length is 62+82=100=10\sqrt{6^2 + 8^2} = \sqrt{100} = 10, and the midpoint is the average (5,7)(5, 7), marked on the interval.

Midpoint and length of an intervalThe interval from C at two, three to D at eight, eleven. Its midpoint is five, seven and its length is ten. A dashed right triangle shows a horizontal run of six and a vertical rise of eight, giving length the square root of six squared plus eight squared, which is ten.xy2583711run = 6rise = 8C (2, 3)D (8, 11)M (5, 7)length 10length = √(6² + 8²) = √100 = 10; midpoint M is the average of the ends

Key fact

For the interval joining P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2):

  • length (distance): d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} (Pythagoras on the run and rise);
  • midpoint: M=(x1+x22,  y1+y22)M = \left( \dfrac{x_1 + x_2}{2}, \; \dfrac{y_1 + y_2}{2} \right) (average the coordinates).

Distance squares, so the order does not matter; leave a non-whole length as a simplified surd.

Lines in real contexts

A straight line is the natural model whenever a quantity changes at a constant rate. Suppose a Sydney plumber charges a fixed callout fee of $90 plus $75 for each hour on site. The total cost CC for hh hours is C=90+75hC = 90 + 75h. This is a line in disguise: the gradient 7575 is the rate (the cost per extra hour) and the intercept 9090 is the starting value (the cost before any hours are billed). For a three-hour job, C=90+75×3=315C = 90 + 75 \times 3 = 315, so the bill is $315. Reading a worded rate problem as y=mx+by = mx + b, with the rate as the gradient and the fixed amount as the intercept, turns it straight into the algebra above.

Gradient as tan⁡θ\tan\theta also has a physical reading: it is the slope of a ramp or road. A wheelchair ramp that rises 0.50.5 m over a horizontal run of 66 m has gradient 0.56=112\dfrac{0.5}{6} = \dfrac{1}{12}, and its angle to the horizontal is tan⁡−1(112)≈4.8∘\tan^{-1}\left( \dfrac{1}{12} \right) \approx 4.8^\circ, which is why accessibility standards quote ramp slopes as a ratio like 1:121 : 12.

How exam questions ask about lines

The wording tells you which tool to reach for:

  • "Find the gradient of the line / interval through ... and ..." is the rise-over-run formula. State it as a fraction in lowest terms unless told otherwise.
  • "Find the equation of the line through the two points ... and ..." is the two-step recipe: gradient first, then point-gradient form, then tidy. Either point works in step two.
  • "Find the equation of the line through ... parallel to / perpendicular to ..." Read off the given line's gradient. Parallel keeps it; perpendicular takes the negative reciprocal. Then use point-gradient form through the given point.
  • "Show that ... is perpendicular to ..." Compute both gradients and show their product is −1-1. "Show that ... is parallel to ..." shows the gradients are equal.
  • "Show that the three points ... are collinear." Show the gradient of one pair equals the gradient of another pair sharing a point.
  • "Find the midpoint / the length / the distance between ... and ..." Average the coordinates for the midpoint; use the distance formula for the length, leaving a surd in exact form.
  • "Find the angle of inclination / the angle the line makes with the xx-axis." Find the gradient, then take tan⁡−1\tan^{-1}; add 180∘180^\circ if the gradient is negative so the angle is obtuse.
  • "Find where the line cuts the axes / find the intercepts." Put y=0y = 0 for the xx-intercept and x=0x = 0 for the yy-intercept.
  • "Find the equation of the perpendicular bisector of ..." Combine two skills: the midpoint of the interval and the perpendicular gradient, then point-gradient form through the midpoint.
Worked example

Five examples: the equation of a line through two given points, a line parallel and a line perpendicular to a given line through a point, the midpoint and length of an interval (whole-number and surd), where a line cuts the axes, and the angle of inclination from a gradient.

Find the equation of the line through A(−3,7)A(-3, 7) and B(5,1)B(5, 1)

Use the two-step recipe: gradient, then point-gradient form.

Find the gradient. Subtracting in the same order top and bottom,

m=y2−y1x2−x1=1−75−(−3)=−68=−34.m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{1 - 7}{5 - (-3)} = \frac{-6}{8} = -\frac{3}{4}.

Use point-gradient form through A(−3,7)A(-3, 7).

y−7=−34 (x−(−3))=−34 (x+3).y - 7 = -\frac{3}{4}\,(x - (-3)) = -\frac{3}{4}\,(x + 3).

Rearrange to gradient-intercept form. Expand the bracket and add 77:

y=−34x−94+7=−34x+194.y = -\frac{3}{4}x - \frac{9}{4} + 7 = -\frac{3}{4}x + \frac{19}{4}.

Convert to general form. Multiply through by 44 and collect every term on the left:

4y=−3x+19  ⇒  3x+4y−19=0.4y = -3x + 19 \;\Rightarrow\; 3x + 4y - 19 = 0.

Check with the other point. Substituting B(5,1)B(5, 1): 3(5)+4(1)−19=15+4−19=03(5) + 4(1) - 19 = 15 + 4 - 19 = 0, so BB lies on the line, as it must. The equation is 3x+4y−19=03x + 4y - 19 = 0 (or y=−34x+194y = -\dfrac{3}{4}x + \dfrac{19}{4}).

Find the lines through (6,1)(6, 1) parallel and perpendicular to 2x+3y−12=02x + 3y - 12 = 0

First read the given line's gradient, then apply each condition.

Find the gradient of the given line. Rearrange 2x+3y−12=02x + 3y - 12 = 0 into gradient-intercept form: 3y=−2x+123y = -2x + 12, so y=−23x+4y = -\dfrac{2}{3}x + 4. Its gradient is −23-\dfrac{2}{3}.

Parallel line: keep the gradient. A parallel line also has gradient −23-\dfrac{2}{3}. Through (6,1)(6, 1), point-gradient form gives

y−1=−23 (x−6)  ⇒  y=−23x+5.y - 1 = -\frac{2}{3}\,(x - 6) \;\Rightarrow\; y = -\frac{2}{3}x + 5.

In general form (multiply by 33): 2x+3y−15=02x + 3y - 15 = 0.

Perpendicular line: take the negative reciprocal. The perpendicular gradient is −1−2/3=32-\dfrac{1}{-2/3} = \dfrac{3}{2} (as a check, −23×32=−1-\dfrac{2}{3} \times \dfrac{3}{2} = -1). Through (6,1)(6, 1),

y−1=32 (x−6)  ⇒  y=32x−8.y - 1 = \frac{3}{2}\,(x - 6) \;\Rightarrow\; y = \frac{3}{2}x - 8.

In general form (multiply by 22): 3x−2y−16=03x - 2y - 16 = 0.

State both answers. Parallel: 2x+3y−15=02x + 3y - 15 = 0. Perpendicular: 3x−2y−16=03x - 2y - 16 = 0. The parallel line shares the slope −23-\dfrac{2}{3}; the perpendicular line uses its negative reciprocal 32\dfrac{3}{2}.

Find the midpoint and length of the interval joining C(2,3)C(2, 3) and D(8,11)D(8, 11)

Both come from the run 66 and the rise 88.

Find the midpoint by averaging.

M=(2+82,  3+112)=(5,7).M = \left( \frac{2 + 8}{2}, \; \frac{3 + 11}{2} \right) = (5, 7).

Find the length by Pythagoras.

CD=(8−2)2+(11−3)2=62+82=36+64=100=10.CD = \sqrt{(8 - 2)^2 + (11 - 3)^2} = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10.

A surd version for contrast. For E(1,2)E(1, 2) and F(4,8)F(4, 8), the run is 33 and the rise is 66, so

EF=32+62=9+36=45=9×5=35.EF = \sqrt{3^2 + 6^2} = \sqrt{9 + 36} = \sqrt{45} = \sqrt{9 \times 5} = 3\sqrt{5}.

State the answers. CDCD has midpoint (5,7)(5, 7) and length 1010; EFEF has length 353\sqrt{5} (left in exact surd form, since 4545 is not a perfect square).

Find where the line 3x−4y−12=03x - 4y - 12 = 0 cuts the axes

The axis intercepts come from setting one variable to zero at a time.

Find the xx-intercept (put y=0y = 0).

3x−4(0)−12=0  ⇒  3x=12  ⇒  x=4,3x - 4(0) - 12 = 0 \;\Rightarrow\; 3x = 12 \;\Rightarrow\; x = 4,

so the xx-intercept is (4,0)(4, 0).

Find the yy-intercept (put x=0x = 0).

3(0)−4y−12=0  ⇒  −4y=12  ⇒  y=−3,3(0) - 4y - 12 = 0 \;\Rightarrow\; -4y = 12 \;\Rightarrow\; y = -3,

so the yy-intercept is (0,−3)(0, -3).

Read off the gradient as a bonus check. Rearranged, 3x−4y−12=03x - 4y - 12 = 0 gives y=34x−3y = \dfrac{3}{4}x - 3, so the gradient is 34\dfrac{3}{4} and the yy-intercept is −3-3, matching the point (0,−3)(0, -3) just found. The line cuts the axes at (4,0)(4, 0) and (0,−3)(0, -3).

Find the angle of inclination of three lines from their gradients

Each angle is tan⁡−1\tan^{-1} of the gradient, with 180∘180^\circ added when the gradient is negative.

A line of gradient 3\sqrt{3}.

θ=tan⁡−1 ⁣(3)=60∘.\theta = \tan^{-1}\!\left( \sqrt{3} \right) = 60^\circ.

This is one of the exact-value angles, since tan⁡60∘=3\tan 60^\circ = \sqrt{3}.

A line of gradient 1.21.2.

θ=tan⁡−1(1.2)=50.19…∘≈50∘  (to the nearest degree).\theta = \tan^{-1}(1.2) = 50.19\ldots^\circ \approx 50^\circ \;(\text{to the nearest degree}).

The gradient is positive, so the angle is acute, which 50∘50^\circ confirms.

A line of gradient −1-1. The calculator returns tan⁡−1(−1)=−45∘\tan^{-1}(-1) = -45^\circ, which is outside the 0∘0^\circ to 180∘180^\circ range. Because the gradient is negative the angle is obtuse, so add 180∘180^\circ:

θ=−45∘+180∘=135∘.\theta = -45^\circ + 180^\circ = 135^\circ.

State the answers. Gradient 3\sqrt{3} gives 60∘60^\circ; gradient 1.21.2 gives about 50∘50^\circ; gradient −1-1 gives 135∘135^\circ. Always check that a positive gradient lands acute and a negative gradient lands obtuse.

Final answers: the line through A(−3,7)A(-3, 7) and B(5,1)B(5, 1) is 3x+4y−19=03x + 4y - 19 = 0; through (6,1)(6, 1) the parallel line to 2x+3y−12=02x + 3y - 12 = 0 is 2x+3y−15=02x + 3y - 15 = 0 and the perpendicular line is 3x−2y−16=03x - 2y - 16 = 0; CDCD has midpoint (5,7)(5, 7) and length 1010 while EFEF has length 353\sqrt{5}; the line 3x−4y−12=03x - 4y - 12 = 0 cuts the axes at (4,0)(4, 0) and (0,−3)(0, -3); and the angles of inclination are 60∘60^\circ, about 50∘50^\circ, and 135∘135^\circ.

Common traps
Subtracting the coordinates in different orders
The gradient is y2−y1x2−x1\dfrac{y_2 - y_1}{x_2 - x_1}: start at the same point top and bottom. Writing y2−y1x1−x2\dfrac{y_2 - y_1}{x_1 - x_2} flips the sign and gives the wrong slope.
Using the reciprocal without the minus for a perpendicular
The perpendicular gradient is the negative reciprocal. Perpendicular to 23\dfrac{2}{3} is −32-\dfrac{3}{2}, not 32\dfrac{3}{2}; the product must come out to −1-1, so always check m1m2=−1m_1 m_2 = -1.
Forgetting the angle is obtuse for a negative gradient
tan⁡−1\tan^{-1} of a negative gradient returns a negative angle. Add 180∘180^\circ so the angle of inclination lands between 90∘90^\circ and 180∘180^\circ.
Leaving general form with fractions or a common factor
Clear fractions and divide out any common factor: write 3x+2y−5=03x + 2y - 5 = 0, not 32x+y−52=0\dfrac{3}{2}x + y - \dfrac{5}{2} = 0 or 6x+4y−10=06x + 4y - 10 = 0.
Mixing up the midpoint and the distance
The midpoint averages the coordinates and is a point; the distance uses squares and a square root and is a length. Do not subtract for the midpoint or average for the distance.
Treating a vertical line as having a gradient
A vertical line x=kx = k has no gradient (the run is zero). It cannot be written as y=mx+by = mx + b; use general form x−k=0x - k = 0, and recall it is perpendicular to any horizontal line.
Exam technique

Markers reward the formula written before numbers go in, working that stays in exact form, and the answer given in the requested form. To bank the method marks:

  • Find the gradient first, then choose a form. For any "equation of a line" question, compute mm, then start from point-gradient form y−y1=m(x−x1)y - y_1 = m(x - x_1). It is the most reliable route and the line where the method mark sits.
  • State the parallel or perpendicular gradient explicitly. Write "parallel, so m=…m = \ldots" or "perpendicular, so m=−1m1=…m = -\dfrac{1}{m_1} = \ldots" before substituting, and confirm m1m2=−1m_1 m_2 = -1 for a perpendicular.
  • Give general form tidily. Clear fractions, make the coefficients integers, and divide out any common factor. If no form is specified, gradient-intercept or general form is fine.
  • Keep lengths exact. Leave a distance as a simplified surd such as 353\sqrt{5} unless a decimal is asked for; only round at the very end, and state the rounding.
  • Check the angle's quadrant. Positive gradient gives an acute angle, negative gives obtuse; add 180∘180^\circ to a negative tan⁡−1\tan^{-1} result.
  • Verify with the second point. After finding a line through two points, substitute the point you did not use; if it satisfies the equation, the working is sound.

Practice questions

Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.

foundation3 marks
For the interval joining A(1,2)A(1, 2) and B(7,10)B(7, 10), find (a) its gradient, (b) its midpoint, and (c) its length.
Show worked solution →

Set up the two points. Take A(1,2)A(1, 2) as (x1,y1)(x_1, y_1) and B(7,10)B(7, 10) as (x2,y2)(x_2, y_2). The differences are x2−x1=6x_2 - x_1 = 6 and y2−y1=8y_2 - y_1 = 8, and all three formulas use these.

(a) Gradient (rise over run).

m=y2−y1x2−x1=10−27−1=86=43.m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{10 - 2}{7 - 1} = \frac{8}{6} = \frac{4}{3}.

(b) Midpoint (average the coordinates).

M=(x1+x22,  y1+y22)=(1+72,  2+102)=(4,6).M = \left( \frac{x_1 + x_2}{2}, \; \frac{y_1 + y_2}{2} \right) = \left( \frac{1 + 7}{2}, \; \frac{2 + 10}{2} \right) = (4, 6).

(c) Length (Pythagoras on the run and rise).

AB=(x2−x1)2+(y2−y1)2=62+82=36+64=100=10.AB = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10.

State the answers. Gradient 43\dfrac{4}{3}, midpoint (4,6)(4, 6), length 1010. The same two differences 66 and 88 fed all three results, so compute them once and reuse them.

foundation3 marks
A line has gradient 33 and cuts the yy-axis at −2-2. (a) Write its equation in gradient-intercept form. (b) Write it in general form. (c) Find its xx-intercept.
Show worked solution →

(a) Gradient-intercept form. With m=3m = 3 and b=−2b = -2, substitute straight into y=mx+by = mx + b:

y=3x−2.y = 3x - 2.

(b) General form. Move every term to one side so the form is ax+by+c=0ax + by + c = 0. From y=3x−2y = 3x - 2, take yy across:

3x−y−2=0.3x - y - 2 = 0.

(c) xx-intercept (put y=0y = 0). The xx-intercept is where the line crosses the xx-axis, so set y=0y = 0 in y=3x−2y = 3x - 2:

0=3x−2  ⇒  3x=2  ⇒  x=23.0 = 3x - 2 \;\Rightarrow\; 3x = 2 \;\Rightarrow\; x = \frac{2}{3}.

State the answers. (a) y=3x−2y = 3x - 2; (b) 3x−y−2=03x - y - 2 = 0; (c) the xx-intercept is (23,0)\left( \dfrac{2}{3}, 0 \right). The yy-intercept −2-2 was given; the xx-intercept always comes from setting y=0y = 0.

core3 marks
Find the equation of the line through P(−1,4)P(-1, 4) and Q(3,−2)Q(3, -2), and give it in general form.
Show worked solution →

Find the gradient first. Using P(−1,4)P(-1, 4) and Q(3,−2)Q(3, -2),

m=y2−y1x2−x1=−2−43−(−1)=−64=−32.m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{-2 - 4}{3 - (-1)} = \frac{-6}{4} = -\frac{3}{2}.

Use point-gradient form with one of the points. Take P(−1,4)P(-1, 4) in y−y1=m(x−x1)y - y_1 = m(x - x_1):

y−4=−32 (x+1).y - 4 = -\frac{3}{2}\,(x + 1).

Rearrange to gradient-intercept form. Expand and tidy:

y−4=−32x−32  ⇒  y=−32x+52.y - 4 = -\frac{3}{2}x - \frac{3}{2} \;\Rightarrow\; y = -\frac{3}{2}x + \frac{5}{2}.

Convert to general form. Multiply through by 22 to clear the fractions, then collect on one side:

2y=−3x+5  ⇒  3x+2y−5=0.2y = -3x + 5 \;\Rightarrow\; 3x + 2y - 5 = 0.

Check with the other point. Substituting Q(3,−2)Q(3, -2): 3(3)+2(−2)−5=9−4−5=03(3) + 2(-2) - 5 = 9 - 4 - 5 = 0, so QQ lies on the line. The equation is 3x+2y−5=03x + 2y - 5 = 0.

core4 marks
Find the equation of the perpendicular bisector of the interval joining A(2,1)A(2, 1) and B(8,5)B(8, 5). Give your answer in general form.
Show worked solution →

Understand what is wanted. The perpendicular bisector passes through the midpoint of ABAB and is perpendicular to ABAB, so it needs two ingredients: the midpoint, and the perpendicular gradient.

Find the midpoint of ABAB.

M=(2+82,  1+52)=(5,3).M = \left( \frac{2 + 8}{2}, \; \frac{1 + 5}{2} \right) = (5, 3).

Find the gradient of ABAB, then the perpendicular gradient.

mAB=5−18−2=46=23.m_{AB} = \frac{5 - 1}{8 - 2} = \frac{4}{6} = \frac{2}{3}.

The perpendicular gradient is the negative reciprocal, so m=−32m = -\dfrac{3}{2} (and as a check 23×(−32)=−1\dfrac{2}{3} \times \left( -\dfrac{3}{2} \right) = -1).

Use point-gradient form through the midpoint. With m=−32m = -\dfrac{3}{2} through M(5,3)M(5, 3):

y−3=−32 (x−5)  ⇒  y=−32x+212.y - 3 = -\frac{3}{2}\,(x - 5) \;\Rightarrow\; y = -\frac{3}{2}x + \frac{21}{2}.

Convert to general form. Multiply by 22 and collect:

2y=−3x+21  ⇒  3x+2y−21=0.2y = -3x + 21 \;\Rightarrow\; 3x + 2y - 21 = 0.

State the answer. The perpendicular bisector is 3x+2y−21=03x + 2y - 21 = 0. It bisects ABAB (through M(5,3)M(5, 3)) and meets it at a right angle (gradient −32-\dfrac{3}{2} against ABAB's 23\dfrac{2}{3}).

exam4 marks
A triangle has vertices A(−1,2)A(-1, 2), B(2,3)B(2, 3) and C(3,0)C(3, 0). (a) Show that the angle at BB is a right angle. (b) Hence find the area of the triangle, giving any lengths in exact (surd) form.
Show worked solution →

(a) Show the angle at BB is a right angle. The angle at BB is between BABA and BCBC, so find both gradients and test their product.

mAB=3−22−(−1)=13,mBC=0−33−2=−31=−3.m_{AB} = \frac{3 - 2}{2 - (-1)} = \frac{1}{3}, \qquad m_{BC} = \frac{0 - 3}{3 - 2} = \frac{-3}{1} = -3.

Their product is 13×(−3)=−1\dfrac{1}{3} \times (-3) = -1, so AB⊥BCAB \perp BC and the angle at BB is 90∘90^\circ.

(b) Find the two legs by the distance formula. With the right angle at BB, the legs are ABAB and BCBC:

AB=(2−(−1))2+(3−2)2=32+12=10,AB = \sqrt{(2 - (-1))^2 + (3 - 2)^2} = \sqrt{3^2 + 1^2} = \sqrt{10},

BC=(3−2)2+(0−3)2=12+(−3)2=10.BC = \sqrt{(3 - 2)^2 + (0 - 3)^2} = \sqrt{1^2 + (-3)^2} = \sqrt{10}.

Compute the area. For a right-angled triangle the area is half the product of the two legs:

Area=12×AB×BC=12×10×10=12×10=5 square units.\text{Area} = \frac{1}{2} \times AB \times BC = \frac{1}{2} \times \sqrt{10} \times \sqrt{10} = \frac{1}{2} \times 10 = 5 \text{ square units}.

Check with Pythagoras. The hypotenuse ACAC has AC2=(3−(−1))2+(0−2)2=16+4=20AC^2 = (3 - (-1))^2 + (0 - 2)^2 = 16 + 4 = 20, and AB2+BC2=10+10=20AB^2 + BC^2 = 10 + 10 = 20, which matches, confirming the right angle. The area is 55 square units.

exam4 marks
A surveyor marks two pegs on a straight boundary at the points P(20,15)P(20, 15) and Q(80,55)Q(80, 55), with coordinates in metres. (a) Find the gradient of PQPQ as a fraction in lowest terms. (b) Find the angle of inclination of PQPQ to the horizontal, to the nearest degree. (c) Find the distance PQPQ in exact (surd) form and to the nearest 0.10.1 m.
Show worked solution →

Set up the two points. Take P(20,15)P(20, 15) and Q(80,55)Q(80, 55), so x2−x1=60x_2 - x_1 = 60 and y2−y1=40y_2 - y_1 = 40 (both in metres).

(a) Gradient.

m=y2−y1x2−x1=55−1580−20=4060=23.m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{55 - 15}{80 - 20} = \frac{40}{60} = \frac{2}{3}.

(b) Angle of inclination. The gradient equals tan⁡θ\tan\theta, so

tan⁡θ=23  ⇒  θ=tan⁡−1 ⁣(23)=33.69…∘≈34∘.\tan\theta = \frac{2}{3} \;\Rightarrow\; \theta = \tan^{-1}\!\left( \frac{2}{3} \right) = 33.69\ldots^\circ \approx 34^\circ.

The gradient is positive, so the angle is acute, which 34∘34^\circ confirms.

(c) Distance.

PQ=(x2−x1)2+(y2−y1)2=602+402=3600+1600=5200.PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} = \sqrt{60^2 + 40^2} = \sqrt{3600 + 1600} = \sqrt{5200}.

Simplify the surd: 5200=400×135200 = 400 \times 13, so 5200=2013\sqrt{5200} = 20\sqrt{13}. As a decimal, 2013=72.11…≈72.120\sqrt{13} = 72.11\ldots \approx 72.1 m.

State the answers. (a) 23\dfrac{2}{3}; (b) about 34∘34^\circ; (c) 201320\sqrt{13} m, which is 72.172.1 m to the nearest tenth. The same run 6060 and rise 4040 drove every part.

Practise this

Sources & how we know this

ExamExplained