Skip to main content
NSWMaths Standard 2Syllabus dot point

What is the gradient of a straight line, what do its sign and size tell you, and how do you find the gradient from a graph or from two points and read the y-intercept?

Find the gradient of a straight line as rise over run, interpret the sign of the gradient and what steepness means, read the y-intercept from a graph, and calculate the gradient between two points

A focused answer to the HSC Maths Standard 2 dot point on gradient and intercept. Gradient as rise over run, what positive, negative, zero and undefined gradients mean and what steepness tells you, reading the y-intercept off a graph, and the gradient formula between two points, with worked ramp, hourly-pay and phone-plan examples.

Generated by Claude Opus 4.816 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

The gradient of a straight line measures how steeply it slopes, and it is the single most important number a line carries. NESA wants you to find it two ways, read its meaning, and pair it with the line's starting value. Four skills are bundled here, and a question can test any of them: find a gradient from a graph by counting the rise over the run; find the gradient between two given points using the formula; read the sign of a gradient (positive, negative, zero or undefined) and say what its size tells you about steepness; and read the yy-intercept straight off a graph. In a real context the gradient is always a rate (dollars per hour, dollars per kilometre, metres climbed per metre across) and the yy-intercept is always the starting value (a fixed fee, a flagfall, a height at the start). So interpreting them in words is part of the dot point too.

The deeper idea worth carrying through all of it is that the gradient is a rate of change: it says how much yy moves for each one-unit step in xx. That is why a steeper line means a faster change, a negative gradient means yy is falling as xx grows, and a flat line (zero gradient) means yy never changes. The marks come from a correctly drawn rise/run triangle, subtracting the coordinates in a consistent order, dividing rise by run the right way up, and stating the sign and units. Marks are lost in predictable ways. The usual slips are dividing run by rise, subtracting the two points in opposite orders top and bottom, reading a falling line as positive, and confusing the yy-intercept with the xx-intercept.

The answer

Gradient as rise over run

The gradient of a line, usually called mm, is the vertical rise divided by the horizontal run between any two points on it:

m=riserun=change in ychange in x.m = \frac{\text{rise}}{\text{run}} = \frac{\text{change in } y}{\text{change in } x}.

To find it from a graph, pick two points where the line passes cleanly through grid corners, then build a right-angled triangle: go across from the first point to under the second (that horizontal distance is the run), then up or down to the second point (that vertical distance is the rise). Divide the rise by the run. Because a straight line has the same steepness everywhere, it does not matter which two points you choose or how big you make the triangle: the ratio is always the same, which is exactly what makes the gradient a single number for the whole line.

The line below passes through (1,1)(1, 1) and (5,4)(5, 4). Going across from (1,1)(1, 1) to (5,1)(5, 1) is a run of 44, and going up from (5,1)(5, 1) to (5,4)(5, 4) is a rise of 33, so the gradient is 34\tfrac{3}{4}. A bigger triangle, say from (1,1)(1, 1) all the way across, would give the same ratio.

Gradient as rise over runA straight line through the points 1 comma 1 and 5 comma 4 on a number plane, with a right-angled triangle drawn under it showing a horizontal run of 4 and a vertical rise of 3, giving a gradient of three quarters.123456123450xypoint (1, 1)point (5, 4)run = 4rise = 3

So m=riserun=34=0.75m = \dfrac{\text{rise}}{\text{run}} = \dfrac{3}{4} = 0.75. The order matters less than the consistency: as long as you go across and up in the same direction, the signs look after themselves.

The sign of the gradient: positive, negative, zero and undefined

The sign of the gradient tells you which way the line tilts, before you even look at how steep it is. Read every line left to right (the direction of increasing xx) and ask what yy is doing.

  • A positive gradient (m>0m > 0) means the line goes up to the right: as xx increases, yy increases. The rise and the run have the same sign.
  • A negative gradient (m<0m < 0) means the line goes down to the right: as xx increases, yy decreases. A positive run pairs with a negative rise.
  • A zero gradient (m=0m = 0) means a horizontal line: there is no rise, so 0run=0\tfrac{0}{\text{run}} = 0 and yy never changes. These are the lines y=ky = k.
  • An undefined gradient means a vertical line: there is no run, so rise0\tfrac{\text{rise}}{0} asks you to divide by zero, which is not allowed. These are the lines x=kx = k. We say the gradient is undefined, not zero or infinite.

The three panels below show the first three cases on identical axes, so you can compare the tilt at a glance.

Positive, negative and zero gradientsThree small number planes side by side. The first shows a line sloping up to the right, a positive gradient. The second shows a line sloping down to the right, a negative gradient. The third shows a flat horizontal line, a zero gradient.positiveup to the rightnegativedown to the rightzeroflat (horizontal)

A vertical line is the fourth case and does not fit a panel like these, because it would be a single upright stroke with no run; remember it separately as the undefined gradient, the line x=kx = k.

What steepness means: the size of the gradient

While the sign tells you the direction, the size of the gradient (its value ignoring any minus sign) tells you the steepness. A larger size is a steeper line, because yy changes more for each step across. A gradient of 33 climbs three times as fast as a gradient of 11; a gradient of 12\tfrac{1}{2} is gentle, rising only half a unit per unit across. To compare steepness, compare the absolute values: a line of gradient 3-3 is steeper than a line of gradient 22, because 3=3|-3| = 3 is bigger than 2=2|2| = 2, even though one falls and one rises. This is why a wheelchair ramp built to the Australian standard of at most 11 in 1414 (a gradient of about 0.070.07) looks almost flat, while a steep driveway at 11 in 55 (a gradient of 0.20.2) is noticeably harder to climb: the bigger the number, the steeper the slope.

Reading the y-intercept from a graph

The yy-intercept is the value of yy where the line crosses the vertical axis, the point (0,b)(0, b). You read it straight off a graph by finding where the line cuts the yy-axis: no calculation needed. The letter bb is the usual name for it. In a real context the yy-intercept is the starting value of the relationship, what yy equals when xx is zero: a fixed monthly fee before you use any data, a taxi flagfall before the car moves, a tank's level before you start draining it.

Reading it correctly means looking at the vertical axis. A frequent slip is to read the xx-intercept (where the line crosses the horizontal axis) by mistake; the yy-intercept is always the crossing on the up-and-down axis. The diagram below shows a phone-plan cost line: it cuts the vertical axis at (0,20)(0, 20), so the yy-intercept is 20dollars,thefixedfee.Thesamelineletsyoureaditsgradientwitharise/runtriangle:from20 dollars, the fixed fee. The same line lets you read its gradient with a rise/run triangle: from x = 10to to x = 30therunis the run is 20GBandthecostrisesfrom GB and the cost rises from 25 dollars to 35dollars,ariseof35 dollars, a rise of 10 dollars, giving m=1020=0.5m = \tfrac{10}{20} = 0.5, that is, $0.50 per GB.

Reading the y-intercept and gradient in contextA straight cost line for a phone plan rising from the point 0 comma 20 on the vertical axis. The y-intercept of 20 dollars is the fixed fee, and a rise over run triangle from 10 to 30 gigabytes shows a rise of 10 dollars over a run of 20 gigabytes, a gradient of 0.5.10203040102030400x (extra GB)C ($)y-intercept (0, 20): fixed feerun = 20 GBrise = $10m = 0.5

Finding the gradient between two points

When you are given two points rather than a graph, you do not need to plot anything: the gradient formula computes the rise over run straight from the coordinates. For points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2),

m=y2y1x2x1.m = \frac{y_2 - y_1}{x_2 - x_1}.

The top is the rise (the difference in the yy-values) and the bottom is the run (the difference in the xx-values). The one rule that prevents almost every error is to subtract in the same order top and bottom: if you start with the second point's yy on top, start with the second point's xx on the bottom. Take (2,56)(2, 56) and (5,140)(5, 140) for a worker's pay against hours:

m=1405652=843=28.m = \frac{140 - 56}{5 - 2} = \frac{84}{3} = 28.

The gradient is 2828, which in context is the pay rate of 28dollarsperhour.Itwouldnotmatterifyousubtractedtheotherway,28 dollars per hour. It would not matter if you subtracted the other way, \tfrac{56 - 140}{2 - 5} = \tfrac{-84}{-3} = 28,becausebothsignsflipandcancel;whatbreaksitismixingtheorders,, because both signs flip and cancel; what breaks it is mixing the orders, \tfrac{140 - 56}{2 - 5} = \tfrac{84}{-3} = -28$, which gives the wrong sign.

How exam questions ask about gradient and intercept

The wording tells you which skill to reach for:

  • "Find the gradient of the line" with a graph means draw a rise/run triangle between two grid points and divide rise by run.
  • "Find the gradient of the line through ()(\ldots) and ()(\ldots)" means use the formula m=y2y1x2x1m = \tfrac{y_2 - y_1}{x_2 - x_1}, keeping the subtraction order consistent.
  • "State whether the gradient is positive or negative" (or "is the line increasing or decreasing?") is testing the sign: up to the right is positive and increasing, down to the right is negative and decreasing.
  • "Which line is steeper?" is testing the size: compare the gradients ignoring their signs.
  • "Write down the yy-intercept" or "where does the line cut the yy-axis?" means read the value off the vertical axis at (0,b)(0, b).
  • "What does the gradient represent?" or "interpret the yy-intercept in this context" wants words: the gradient is the rate (with units like dollars per hour) and the intercept is the starting value (a fixed fee or initial amount).

Why the order of subtraction does not change the gradient

It is worth seeing why subtracting the two points in either order gives the same gradient. This is the reasoning that stops the most common formula error from worrying you. The gradient is a ratio of two differences, and if you swap which point comes first, both the top and the bottom change sign:

y2y1x2x1versusy1y2x1x2.\frac{y_2 - y_1}{x_2 - x_1} \quad\text{versus}\quad \frac{y_1 - y_2}{x_1 - x_2}.

In the second version the top is the negative of the first top and the bottom is the negative of the first bottom, so the two minus signs cancel and the value is identical. What you must not do is take y2y1y_2 - y_1 on top but x1x2x_1 - x_2 on the bottom: then only one sign flips, and the gradient comes out with the wrong sign, turning an increasing line into a decreasing one. The safe habit is to write the second point's coordinates first in both the top and the bottom, every time. There is one edge case the formula handles automatically and one it cannot. A horizontal line has y2=y1y_2 = y_1, so the top is 00 and m=0m = 0 as expected. A vertical line has x2=x1x_2 = x_1, so the bottom is 00, and dividing by zero is undefined, which is exactly why a vertical line has no gradient.

Exam-style practice questions

Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

2022 HSC-style2 marksA rainwater tank is being drained. Its volume in litres is shown by a straight line on a volume-versus-time graph that passes through (0,1200)(0, 1200) and (8,400)(8, 400), where xx is the time in hours. Find the gradient of the line and state what it represents.
Show worked answer →

Apply the gradient formula. Subtract in the same order, yy on top and xx on the bottom, using the points (0,1200)(0, 1200) and (8,400)(8, 400):

m=400120080=8008=100.m = \frac{400 - 1200}{8 - 0} = \frac{-800}{8} = -100.

State what it represents. The gradient is 100-100. In context it is the rate at which the tank empties: the volume falls by 100100 litres each hour, so 100100 L per hour. The negative sign shows the volume is decreasing.

Markers reward the substituted formula with a consistent subtraction order, the value 100-100, and an interpretation as a draining rate (with the negative sign explained) in litres per hour.

2024 HSC-style4 marksTwo e-scooter hire apps each charge an unlock fee plus a rate per minute, shown as straight lines on a cost-versus-time graph (cost in dollars, xx in minutes). App A passes through (0,3)(0, 3) and (20,11)(20, 11). App B passes through (10,4)(10, 4) and (30,10)(30, 10). (a) Find the gradient of each line and say what it represents. (b) State which app charges the steeper per-minute rate. (c) Find the cost of a 2525 minute ride with App A.
Show worked answer →

Part (a), gradient of App A. Use (0,3)(0, 3) and (20,11)(20, 11):

mA=113200=820=0.4.m_A = \frac{11 - 3}{20 - 0} = \frac{8}{20} = 0.4.

So App A charges $0.40 per minute. Gradient of App B, using (10,4)(10, 4) and (30,10)(30, 10):

mB=1043010=620=0.3.m_B = \frac{10 - 4}{30 - 10} = \frac{6}{20} = 0.3.

So App B charges $0.30 per minute. Each gradient is the rate per minute of riding.

Part (b), which is steeper. Steepness is the size of the gradient. Since 0.4>0.30.4 > 0.3, App A has the steeper per-minute rate.

Part (c), a 2525 minute ride with App A. App A meets the vertical axis at (0,3)(0, 3), so the $3 unlock fee is its yy-intercept. Add the rate times the minutes:

C=3+0.4×25=3+10=13.C = 3 + 0.4 \times 25 = 3 + 10 = 13.

The ride costs 1313 dollars.

Markers reward both gradients with units, the steeper rate identified by comparing sizes, the unlock fee read as the intercept, and the final cost of $13 for App A.

Practice questions

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

foundation2 marksA straight line passes through the points (1,1)(1, 1) and (5,4)(5, 4). Find its gradient as rise over run.
Show worked solution →

Find the rise. The rise is the change in the vertical (yy) values from the first point to the second:

rise=41=3.\text{rise} = 4 - 1 = 3.

Find the run. The run is the matching change in the horizontal (xx) values, taken in the same order:

run=51=4.\text{run} = 5 - 1 = 4.

Divide rise by run. The gradient is

m=riserun=34=0.75.m = \frac{\text{rise}}{\text{run}} = \frac{3}{4} = 0.75.

State the answer. The gradient is 34\dfrac{3}{4}. It is positive, so the line slopes up to the right, rising 33 units for every 44 units across.

foundation2 marksFor each line, state whether the gradient is positive, negative, zero or undefined: (a) a line sloping up to the right; (b) a horizontal line; (c) a line sloping down to the right; (d) a vertical line.
Show worked solution →
Part (a), up to the right
A line going up as you move right has a positive gradient, because the rise and the run have the same sign.
Part (b), horizontal
A flat line has no rise, so m=0run=0m = \dfrac{0}{\text{run}} = 0. The gradient is zero.
Part (c), down to the right
A line going down as you move right has a negative gradient, because a positive run goes with a negative rise.
Part (d), vertical
A vertical line has no run, so m=rise0m = \dfrac{\text{rise}}{0}, and you cannot divide by zero. The gradient is undefined.
core2 marksA part-time worker is paid the same rate for every hour. After 22 hours she has earned 56dollars,andafter56 dollars, and after 5hoursshehasearned hours she has earned 140 dollars. Find the gradient of the pay line and state what it represents.
Show worked solution →

Set up the two points. Put hours across and pay up, giving the points (2,56)(2, 56) and (5,140)(5, 140).

Apply the gradient formula. Subtract in the same order, top and bottom:

m=1405652=843=28.m = \frac{140 - 56}{5 - 2} = \frac{84}{3} = 28.

State the answer. The gradient is 2828. In this context it is the pay rate: the worker earns $28 dollars for each extra hour worked, that is, $28 per hour.

Quick check. At 22 hours, 56÷2=2856 \div 2 = 28; at 55 hours, 140÷5=28140 \div 5 = 28. The rate is the same, confirming a constant gradient.

core3 marksA taxi fare is shown by a straight line on a cost-versus-distance graph. The line crosses the vertical axis at 4dollars,anditpassesthroughthepoints4 dollars, and it passes through the points (2, 8)and and (5, 14),where, where xisthedistanceinkmandthecostisindollars.(a)Statethe is the distance in km and the cost is in dollars. (a) State the y$-intercept and what it means. (b) Find the gradient and what it means.
Show worked solution →

Part (a), the yy-intercept. The line cuts the vertical axis at 44, so the yy-intercept is (0,4)(0, 4). It is the cost when the distance is 00 km, that is, the flagfall of $4 dollars charged just for getting in.

Part (b), find the gradient. Use the two given points (2,8)(2, 8) and (5,14)(5, 14):

m=14852=63=2.m = \frac{14 - 8}{5 - 2} = \frac{6}{3} = 2.

Interpret the gradient. The gradient is 22, the rate per kilometre: the fare rises $2 dollars for each extra km travelled, so $2 per km.

Tie it together. The fare starts at the $4 flagfall (the intercept) and climbs at $2 per km (the gradient), so for example 55 km costs 4+2×5=144 + 2 \times 5 = 14 dollars, matching the point (5,14)(5, 14).

exam4 marksA straight line passes through the points (2,5)(-2, 5) and (4,7)(4, -7). (a) Find the gradient. (b) State whether the line is increasing or decreasing, and explain how the gradient tells you. (c) Find the gradient of a second line through (3,1)(-3, -1) and (3,5)(3, 5), and state which of the two lines is steeper.
Show worked solution →

Part (a), gradient of the first line. Subtract the coordinates in the same order:

m=754(2)=126=2.m = \frac{-7 - 5}{4 - (-2)} = \frac{-12}{6} = -2.

Part (b), increasing or decreasing. The gradient is 2-2, which is negative, so the line is decreasing: it slopes down to the right, falling 22 units for every 11 unit across. A negative rise with a positive run gives the negative sign.

Part (c), the second line and which is steeper. For the line through (3,1)(-3, -1) and (3,5)(3, 5):

m=5(1)3(3)=66=1.m = \frac{5 - (-1)}{3 - (-3)} = \frac{6}{6} = 1.

Steepness is measured by the size of the gradient, ignoring the sign. Comparing 2=2|-2| = 2 with 1=1|1| = 1, the first line is steeper because 2>12 > 1.

exam5 marksA mobile phone plan charges a fixed monthly fee plus a set rate for each extra gigabyte (GB) of data. The monthly cost CC dollars for xx extra GB is shown by a straight line through (10,25)(10, 25) and (30,35)(30, 35). (a) Find the gradient and say what it means. (b) The line meets the vertical axis at (0,20)(0, 20); state the yy-intercept and what it means. (c) Use your results to find the cost for 4040 extra GB in a month.
Show worked solution →

Part (a), find the gradient. Use the two points (10,25)(10, 25) and (30,35)(30, 35):

m=35253010=1020=0.5.m = \frac{35 - 25}{30 - 10} = \frac{10}{20} = 0.5.

In context the gradient is the rate per gigabyte: each extra GB adds $0.50 dollars to the bill, that is, $0.50 per GB.

Part (b), the yy-intercept. The line meets the vertical axis at (0,20)(0, 20), so the yy-intercept is 2020. It is the cost when x=0x = 0 extra GB, that is, the fixed monthly fee of $20 dollars you pay before any extra data.

Part (c), cost for 4040 extra GB. The cost is the fixed fee plus the rate times the GB:

C=20+0.5×40=20+20=40.C = 20 + 0.5 \times 40 = 20 + 20 = 40.

State the answer. For 4040 extra GB the monthly cost is 40dollars.Theintercept(40 dollars. The intercept (20)setswherethelinestartsandthegradient() sets where the line starts and the gradient (0.5$) sets how fast it climbs.

Related dot points