Skip to main content
NSWMaths AdvancedSyllabus dot point

How do you measure the steepness of a line, write its equation in the form a question wants, decide when two lines are parallel or perpendicular, and find the length and midpoint of the interval joining two points?

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

A Year 11 Maths Advanced answer on the straight line: gradient as rise over run and as tan of the angle of inclination, the gradient-intercept, point-gradient and general forms, the parallel and perpendicular gradient tests, and the length and midpoint of an interval, with worked examples and practice questions.

Generated by Claude Opus 4.822 min answer

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

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=y2y1x2x1.\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

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 tan11=45\tan^{-1} 1 = 45^\circ; a steeper gradient gives a larger angle. A positive gradient gives an acute angle (0<θ<900^\circ < \theta < 90^\circ); a negative gradient gives an obtuse angle (90<θ<18090^\circ < \theta < 180^\circ), because the line tilts back the other way. To go from a gradient to its angle you take tan1\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 00^\circ), add 180180^\circ to land in the correct 9090^\circ to 180180^\circ range.

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 yy1=m(xx1)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+2y5=03x + 2y - 5 = 0.

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 175(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 y7=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+4y19=03x + 4y - 19 = 0. Substituting B(5,1)B(5, 1) into the general form gives 15+419=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

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=(x2x1)2+(y2y1)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

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 tan1(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 tan1\tan^{-1}; add 180180^\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.

Practice questions

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

foundation3 marksFor 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 x2x1=6x_2 - x_1 = 6 and y2y1=8y_2 - y_1 = 8, and all three formulas use these.

(a) Gradient (rise over run).

m=y2y1x2x1=10271=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=(x2x1)2+(y2y1)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 marksA 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=3x2.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=3x2y = 3x - 2, take yy across:

3xy2=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=3x2y = 3x - 2:

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

State the answers. (a) y=3x2y = 3x - 2; (b) 3xy2=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 marksFind 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=y2y1x2x1=243(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 yy1=m(xx1)y - y_1 = m(x - x_1):

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

Rearrange to gradient-intercept form. Expand and tidy:

y4=32x32    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+2y5=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=945=03(3) + 2(-2) - 5 = 9 - 4 - 5 = 0, so QQ lies on the line. The equation is 3x+2y5=03x + 2y - 5 = 0.

core4 marksFind 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=5182=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):

y3=32(x5)    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+2y21=0.2y = -3x + 21 \;\Rightarrow\; 3x + 2y - 21 = 0.

State the answer. The perpendicular bisector is 3x+2y21=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 marksA 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=322(1)=13,mBC=0332=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 ABBCAB \perp BC and the angle at BB is 9090^\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+(32)2=32+12=10,AB = \sqrt{(2 - (-1))^2 + (3 - 2)^2} = \sqrt{3^2 + 1^2} = \sqrt{10},

BC=(32)2+(03)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+(02)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 marksA 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 x2x1=60x_2 - x_1 = 60 and y2y1=40y_2 - y_1 = 40 (both in metres).

(a) Gradient.

m=y2y1x2x1=55158020=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    θ=tan1 ⁣(23)=33.6934.\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 3434^\circ confirms.

(c) Distance.

PQ=(x2x1)2+(y2y1)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.1172.120\sqrt{13} = 72.11\ldots \approx 72.1 m.

State the answers. (a) 23\dfrac{2}{3}; (b) about 3434^\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.

Related dot points