Skip to main content
NSWMaths Standard 2Syllabus dot point

What do m and b mean in the equation y = mx + b, how do you read them straight off an equation or a graph, and how do you sketch a line quickly from its gradient and y-intercept?

Use the gradient-intercept form y = mx + b: read the gradient m and the y-intercept b directly from the equation (rearranging first if needed), write the equation of a line from its graph, and sketch a line from m and b

A focused answer to the HSC Maths Standard 2 dot point on the gradient-intercept formula. How to read the gradient m and y-intercept b straight from y = mx + b, rearrange an equation into that form first, write the equation of a drawn line, sketch a line from m and b, and build a real cost model, with worked Australian examples.

Generated by Claude Opus 4.817 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-intercept formula is the single most useful way to write a straight line. When a line's equation is in the form

y=mx+b,y = mx + b,

the two numbers you most want are sitting right there in plain sight. mm is the gradient (the number multiplying xx) and bb is the yy-intercept (the constant on its own). NESA bundles three skills around this form, and a question can test any of them. First, read mm and bb straight from an equation. If the equation is given in a different shape, rearrange it into y=mx+by = mx + b first. Second, write the equation of a line from its graph: read bb off the vertical axis, work out mm from a rise/run step or two points, then assemble y=mx+by = mx + b. Third, sketch a line quickly from mm and bb: plot the intercept, step by the gradient to a second point, and rule the line. In a real context the same idea models a cost: bb is a fixed starting amount and mm is a rate. Interpreting the two numbers in words is part of the dot point too.

The deeper idea that ties it together is that y=mx+by = mx + b is a recipe for building the line: start at height bb on the yy-axis, then climb (or fall) at the steady rate mm for every step to the right. That one sentence explains why bb is where the line begins and why mm controls how fast it rises. You earn the marks in three ways. Compare the equation to y=mx+by = mx + b correctly, including the sign of mm and reading a missing constant as b=0b = 0. Rearrange carefully when the equation is not yet in that form. Lay out a sketch with the intercept marked and a gradient step shown. Marks are lost in predictable ways: reading bb as the coefficient of xx, dropping the minus sign on a negative gradient, forgetting to divide the whole equation through when a coefficient is in front of yy, and confusing the yy-intercept with the xx-intercept.

The answer

Reading the gradient and y-intercept from y = mx + b

When a line is written as y=mx+by = mx + b, you can read both key numbers without any working:

  • the gradient mm is the coefficient of xx (the number it is multiplied by), and
  • the yy-intercept bb is the constant term (the number standing alone, with no xx).

So for y=3x2y = 3x - 2 the gradient is m=3m = 3 and the yy-intercept is b=2b = -2. The sign travels with the number: a 2-2 at the end means the line cuts the yy-axis below the origin at (0,2)(0, -2), and a negative coefficient of xx means a line that slopes downwards. Two cases catch students out. If there is no constant, as in y=6xy = 6x, the yy-intercept is b=0b = 0: the line passes through the origin. If there is no xx term, as in y=4y = 4, the gradient is m=0m = 0: the line is horizontal at height 44. Reading these correctly is just a matter of remembering that a missing term means that number is zero.

The order the terms are written in does not change what they mean, but it can disguise them. The equation y=8xy = 8 - x has the constant first and the xx term second. Reorder it as y=x+8y = -x + 8 and the form is obvious: the coefficient of xx is 1-1, so m=1m = -1, and the constant is 88, so b=8b = 8. Whenever an equation looks unusual, rewrite it as "(xx term) ++ (constant)" before reading off mm and bb.

Rearranging an equation into gradient-intercept form first

An equation only reveals mm and bb at a glance once it is in the form y=mx+by = mx + b, with yy by itself on the left. If it is given any other way, rearrange it first using the same balancing moves you use to solve an equation: whatever you do to one side, do to the other. The goal is always to get yy alone.

Take y3x=4y - 3x = 4. Add 3x3x to both sides to free yy, giving y=3x+4y = 3x + 4, so m=3m = 3 and b=4b = 4. Take 3x+y=123x + y = 12. Subtract 3x3x from both sides to get y=3x+12y = -3x + 12, so m=3m = -3 and b=12b = 12. The step that needs the most care is when a number multiplies yy. For 2y8x=62y - 8x = 6, first add 8x8x to both sides to get 2y=8x+62y = 8x + 6, then divide every term by 22:

y=8x2+62=4x+3,y = \frac{8x}{2} + \frac{6}{2} = 4x + 3,

so m=4m = 4 and b=3b = 3. The classic error is to divide only the 8x8x and forget the 66 (or vice versa). The line is divided all the way through, so each term on the right must be divided by the same number.

Writing the equation of a line from its graph

Going the other way - from a drawn line to its equation - is the reverse of reading mm and bb. You find the two numbers from the picture, then slot them into y=mx+by = mx + b. There are just two things to read off:

  1. Read bb from the yy-axis. Find where the line crosses the vertical axis; that height is bb. This needs no calculation.
  2. Find mm from the line. Either count a rise/run triangle between two grid points, or pick two clear points and use m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1}.

Then write y=mx+by = mx + b with those values. The line below crosses the yy-axis at (0,1)(0, 1), so b=1b = 1. Stepping from that point, a run of 11 across goes with a rise of 22 up to land on the line again at (1,3)(1, 3), so m=21=2m = \tfrac{2}{1} = 2. The equation is therefore y=2x+1y = 2x + 1. The diagram shows exactly the two things you read: the intercept bb on the yy-axis and the gradient mm as a rise-over-run step.

The line y = 2x + 1 showing m and bA straight line with equation y equals 2x plus 1 drawn on a number plane. It cuts the vertical axis at the point 0 comma 1, the y-intercept b. A right-angled step from that point shows a run of 1 across and a rise of 2 up, so the gradient m is 2.-11234-11234560xyb = 1run = 1rise = 2m = 2y = 2x + 1

If the line slopes down, the only change is that mm is negative. A line cutting the yy-axis at (0,4)(0, 4) and dropping to (3,2)(3, -2) has b=4b = 4 and gradient

m=2430=63=2,m = \frac{-2 - 4}{3 - 0} = \frac{-6}{3} = -2,

so its equation is y=2x+4y = -2x + 4. Read the intercept, find the gradient with its sign, and write it down.

Sketching a line from m and b

The gradient-intercept form is also the fastest way to draw a line, because bb hands you one point for free and mm tells you how to reach the next one. A straight line needs only two points, so the method is short:

  1. Plot the yy-intercept (0,b)(0, b) on the vertical axis.
  2. Write the gradient as riserun\dfrac{\text{rise}}{\text{run}}. A whole number mm is m1\dfrac{m}{1} (run 11); a fraction like 12\tfrac{1}{2} is already rise 11 over run 22.
  3. Step to a second point. From the intercept, go run units across (to the right) and rise units up. If the gradient is negative, the rise is downwards.
  4. Rule the line through the two points, extending it past them with arrows on each end.

The stages below sketch y=2x3y = 2x - 3, where m=2m = 2 and b=3b = -3. Reading m=2m = 2 as 21\tfrac{2}{1}, each step is 11 across and 22 up. Plot (0,3)(0, -3), step to (1,1)(1, -1), and the line is determined; stepping once more reaches (2,1)(2, 1) as a free check that the three points line up.

Stage 1, set up the axes
Draw a number plane with enough room for the intercept at y=3y = -3 and the line as it climbs. Nothing is plotted yet; this is just the grid you will build on.
Stage 2, plot the yy-intercept
Read b=3b = -3 from the equation and mark the single point (0,3)(0, -3) on the vertical axis. This is the line's starting point and the one point the equation gives you instantly.
Stage 3, step out using the gradient
Read m=2=21m = 2 = \tfrac{2}{1}. From (0,3)(0, -3) move a run of 11 to the right, then a rise of 22 upwards, landing on (1,1)(1, -1). That right-angled step is the gradient made visible.
Stage 4, rule the line
Join (0,3)(0, -3) and (1,1)(1, -1) with a straight edge and extend the line both ways. Stepping again to (2,1)(2, 1) shows all three points lie on it, confirming the sketch of y=2x3y = 2x - 3.

Sketching y = 2x minus 3 from m and bFour panels building the graph of y equals 2x minus 3. Panel 1 shows blank axes. Panel 2 plots the y-intercept at 0 comma minus 3. Panel 3 steps a run of 1 across and a rise of 2 up to reach 1 comma minus 1. Panel 4 joins the points into the finished straight line.12-31112-31212-31run 1rise 2312-314

A fractional gradient is sketched the same way, you just read the rise and run from the fraction. For y=12x+1y = \tfrac{1}{2}x + 1, the intercept is (0,1)(0, 1) and the gradient 12\tfrac{1}{2} is a rise of 11 for a run of 22, so you step 22 across and 11 up to (2,2)(2, 2), then again to (4,3)(4, 3). Choosing whole-number steps lands you exactly on grid corners, which keeps the sketch tidy.

Building a real model: cost = fixed amount + rate

The reason y=mx+by = mx + b matters beyond the classroom is that it models any quantity that starts at a fixed amount and then changes at a steady rate. The most common version in Maths Standard is a cost: a fixed fee plus a charge per unit. The fixed fee is bb (the cost before anything happens) and the rate is mm (the cost added per unit). The letters are usually changed to fit the situation, but the structure is identical.

Suppose an electrician charges a 60dollarcalloutfeeplus60 dollar call-out fee plus 40 dollars per hour. Let CC be the total cost in dollars and hh the number of hours. The model is

C=60+40h,C = 60 + 40h,

which is y=mx+by = mx + b with the gradient m=40m = 40 and the yy-intercept b=60b = 60. Here b=60b = 60 is the fixed call-out fee (the cost for h=0h = 0 hours, before any work) and m=40m = 40 is the rate of $40 per hour. To predict the cost of any job, substitute the hours: a 33 hour job costs C=60+40×3=180C = 60 + 40 \times 3 = 180 dollars. When a question asks you to "interpret" the gradient or intercept, this is what it wants in words: the intercept is the starting amount with its unit, and the gradient is the rate with its unit (here, dollars per hour). A bare number without the meaning loses the interpretation mark.

How exam questions ask about y = mx + b

The wording points you to which of the three skills to use:

  • "State the gradient and the yy-intercept of y=y = \ldots" means compare to y=mx+by = mx + b and read off the coefficient of xx and the constant, after rearranging if yy is not already by itself.
  • "Write the equation in the form y=mx+by = mx + b" (or "make yy the subject") means rearrange, dividing the whole equation through if a number multiplies yy.
  • "Find the equation of the line" with a graph means read bb off the yy-axis, find mm from a step or two points, and write y=mx+by = mx + b.
  • "Sketch / draw the line y=y = \ldots" means plot (0,b)(0, b), step by the gradient to a second point, and rule the line.
  • "What does the gradient (or yy-intercept) represent?" in a context wants words: the gradient is the rate (with units) and the intercept is the fixed starting value (with its unit).
  • "Write an equation to model this situation" means identify the fixed amount as bb and the per-unit rate as mm, then write the model with letters that fit the context.

Why m and b are exactly what they are

It is worth seeing why the two letters in y=mx+by = mx + b land on the gradient and the yy-intercept, because understanding it removes any need to memorise which is which. Put x=0x = 0 into y=mx+by = mx + b: the xx term vanishes and you are left with y=by = b. That is precisely the point on the yy-axis, so bb must be the yy-intercept. Now increase xx by 11, from any value to the next: the term mxmx grows by exactly mm, so yy goes up by mm for every one-unit step across. That is the definition of the gradient, the rise per unit run, so mm must be the gradient. This also explains the two special cases at a glance: if m=0m = 0 there is no xx term, yy stays at bb for every xx, and the line is horizontal; and if b=0b = 0 the line passes through (0,0)(0, 0), the origin. The formula is not an arbitrary label, it is the line's own building instructions: start at bb, climb at rate mm.

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.

2021 HSC-style3 marksA straight line passes through the points (2,30)(2, 30) and (6,50)(6, 50). Find the equation of the line in the form y=mx+by = mx + b.
Show worked answer →

Find the gradient first. Neither point is on the yy-axis, so start with the gradient using m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1} for the points (2,30)(2, 30) and (6,50)(6, 50):

m=503062=204=5m = \dfrac{50 - 30}{6 - 2} = \dfrac{20}{4} = 5.

Find the yy-intercept. Here bb cannot be read off, so substitute the gradient and one known point into y=mx+by = mx + b and solve for bb. Using (2,30)(2, 30): 30=5×2+b30 = 5 \times 2 + b, so 30=10+b30 = 10 + b and b=20b = 20.

Write and check the equation. Putting m=5m = 5 and b=20b = 20 into y=mx+by = mx + b gives y=5x+20y = 5x + 20. Test the other point (6,50)(6, 50): 5×6+20=30+20=505 \times 6 + 20 = 30 + 20 = 50, which matches.

Markers reward the gradient calculation giving m=5m = 5, the substitution that gives b=20b = 20, and the final equation y=5x+20y = 5x + 20.

2023 HSC-style4 marksA taxi fare is a fixed flagfall plus a charge for each kilometre travelled. A 44 km trip costs $22 and a 1010 km trip costs $40. The fare CC dollars for a trip of dd kilometres is linear. (a) Find the equation for CC in the form C=md+bC = md + b. (b) State what the gradient and the yy-intercept represent. (c) Find the fare for a 1515 km trip.
Show worked answer →

Part (a), find the gradient (the per-km rate). Treat the trips as the points (4,22)(4, 22) and (10,40)(10, 40) and use m=4022104=186=3m = \dfrac{40 - 22}{10 - 4} = \dfrac{18}{6} = 3.

Now find bb by substituting m=3m = 3 and the point (4,22)(4, 22) into C=md+bC = md + b: 22=3×4+b22 = 3 \times 4 + b, so 22=12+b22 = 12 + b and b=10b = 10. The model is C=3d+10C = 3d + 10.

Part (b), interpret the two numbers. The gradient m=3m = 3 is the rate: each extra kilometre adds $3, so the charge is $3 per km. The yy-intercept b=10b = 10 is the cost when d=0d = 0 km, the fixed flagfall of $10 charged before any distance.

Part (c), fare for 1515 km. Substitute d=15d = 15: C=3×15+10=45+10=55C = 3 \times 15 + 10 = 45 + 10 = 55, so a 1515 km trip costs $55.

Markers reward the gradient m=3m = 3 and the model C=3d+10C = 3d + 10, a worded interpretation of the rate and the flagfall, and the substituted answer of $55.

2022 HSC-style5 marksA line has equation 3y6x=243y - 6x = 24. (a) Rearrange it into the form y=mx+by = mx + b and state the gradient and yy-intercept. (b) Write down the coordinates of the point where the line crosses the yy-axis. (c) Find the coordinates of the point where the line crosses the xx-axis.
Show worked answer →

Part (a), make yy the subject. Add 6x6x to both sides to get 3y=6x+243y = 6x + 24, then divide every term by 33:

y=6x3+243=2x+8y = \dfrac{6x}{3} + \dfrac{24}{3} = 2x + 8.

In the form y=mx+by = mx + b the gradient is m=2m = 2 and the yy-intercept is b=8b = 8. The common slip is dividing only the 6x6x and forgetting to divide the 2424.

Part (b), the yy-intercept point. The line cuts the vertical axis at (0,b)(0, b), so the point is (0,8)(0, 8).

Part (c), the xx-intercept point. The line crosses the xx-axis where y=0y = 0. Set y=0y = 0 in y=2x+8y = 2x + 8: 0=2x+80 = 2x + 8, so 2x=82x = -8 and x=4x = -4. The point is (4,0)(-4, 0).

Markers reward dividing the whole equation through to reach y=2x+8y = 2x + 8 with m=2m = 2 and b=8b = 8, the yy-intercept (0,8)(0, 8), and setting y=0y = 0 to find the xx-intercept (4,0)(-4, 0).

Practice questions

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

foundation2 marksWrite down the gradient mm and the yy-intercept bb of each line: (a) y=3x2y = 3x - 2; (b) y=8xy = 8 - x; (c) y=12x+4y = \tfrac{1}{2}x + 4.
Show worked solution →
Match each equation to y=mx+by = mx + b
The gradient mm is the number multiplying xx, and the yy-intercept bb is the constant on its own.
Part (a), y=3x2y = 3x - 2
The coefficient of xx is 33 and the constant is 2-2, so m=3m = 3 and b=2b = -2.
Part (b), y=8xy = 8 - x
Reorder it as y=x+8y = -x + 8 first. The coefficient of xx is 1-1 and the constant is 88, so m=1m = -1 and b=8b = 8.
Part (c), y=12x+4y = \tfrac{1}{2}x + 4
The coefficient of xx is 12\tfrac{1}{2} and the constant is 44, so m=12m = \tfrac{1}{2} and b=4b = 4.
foundation2 marksA line has gradient m=4m = -4 and yy-intercept b=5b = 5. (a) Write its equation in the form y=mx+by = mx + b. (b) Use the equation to find yy when x=2x = 2.
Show worked solution →

Part (a), write the equation. Substitute m=4m = -4 and b=5b = 5 into y=mx+by = mx + b:

y=4x+5.y = -4x + 5.

Part (b), find yy when x=2x = 2. Substitute x=2x = 2 and evaluate, multiplying before adding:

y=4×2+5=8+5=3.y = -4 \times 2 + 5 = -8 + 5 = -3.

State the answer. The equation is y=4x+5y = -4x + 5, and when x=2x = 2, y=3y = -3.

core3 marksRearrange each equation into the form y=mx+by = mx + b and state the gradient and yy-intercept: (a) y2x=7y - 2x = 7; (b) 3x+y=123x + y = 12; (c) 2y8x=62y - 8x = 6.
Show worked solution →

Part (a), y2x=7y - 2x = 7. Add 2x2x to both sides to leave yy alone:

y=2x+7.y = 2x + 7.

So m=2m = 2 and b=7b = 7.

Part (b), 3x+y=123x + y = 12. Subtract 3x3x from both sides:

y=3x+12.y = -3x + 12.

So m=3m = -3 and b=12b = 12.

Part (c), 2y8x=62y - 8x = 6. First add 8x8x to both sides, then divide every term by 22:

2y=8x+6,y=4x+3.2y = 8x + 6, \qquad y = 4x + 3.

So m=4m = 4 and b=3b = 3. The key step is dividing the whole right-hand side by 22, not just one term.

core3 marksA straight line is drawn on a number plane. It crosses the yy-axis at (0,1)(0, 1) and also passes through the point (2,5)(2, 5). Find the equation of the line in the form y=mx+by = mx + b.
Show worked solution →

Read the yy-intercept. The line cuts the vertical axis at (0,1)(0, 1), so b=1b = 1.

Find the gradient. Use the two points (0,1)(0, 1) and (2,5)(2, 5) in the gradient formula:

m=5120=42=2.m = \frac{5 - 1}{2 - 0} = \frac{4}{2} = 2.

Write the equation. Put m=2m = 2 and b=1b = 1 into y=mx+by = mx + b:

y=2x+1.y = 2x + 1.

Check. At x=2x = 2, y=2×2+1=5y = 2 \times 2 + 1 = 5, which matches the given point (2,5)(2, 5).

core4 marksSketch the line y=2x3y = 2x - 3 using its gradient and yy-intercept. Show the yy-intercept and one gradient step, and give the coordinates of two points the line passes through.
Show worked solution →
Read mm and bb
Comparing y=2x3y = 2x - 3 with y=mx+by = mx + b gives gradient m=2m = 2 and yy-intercept b=3b = -3.
Plot the yy-intercept
Mark the point (0,3)(0, -3) on the vertical axis. This is the first point on the line.
Step out using the gradient
Write m=2m = 2 as 21\tfrac{2}{1}, a rise of 22 for a run of 11. From (0,3)(0, -3) go 11 across and 22 up to reach

(1, 3+2)=(1,1).(1,\ -3 + 2) = (1, -1).

Get a third point and draw. Stepping again from (1,1)(1, -1) gives (2,1)(2, 1). Rule a straight line through (0,3)(0, -3), (1,1)(1, -1) and (2,1)(2, 1).

State two points. The line passes through (0,3)(0, -3) and (1,1)(1, -1) (and also (2,1)(2, 1)), exactly as built in the stage figure above.

exam5 marksAn electrician charges a fixed call-out fee plus an hourly rate. The total cost CC dollars for a job lasting hh hours is C=60+40hC = 60 + 40h. (a) State the gradient and the yy-intercept of this model. (b) Explain what each of them means in this context. (c) Find the cost of a job that lasts 33 hours.
Show worked solution →
Part (a), gradient and intercept
The model C=60+40hC = 60 + 40h is in the form C=b+mhC = b + mh, so the gradient is m=40m = 40 and the yy-intercept is b=60b = 60.
Part (b), what they mean
The yy-intercept b=60b = 60 is the cost when h=0h = 0 hours, that is, the fixed call-out fee of 60dollarschargedbeforeanywork.Thegradient60 dollars charged before any work. The gradient m = 40istherate:eachextrahouradds is the **rate**: each extra hour adds 40 dollars, so the labour costs $40 per hour.
Part (c), cost of a 33-hour job
Substitute h=3h = 3 into the model:

C=60+40×3=60+120=180.C = 60 + 40 \times 3 = 60 + 120 = 180.

State the answer. A 33-hour job costs $180 dollars: the $60 call-out fee (the intercept) plus $120 of labour at the $40 per hour rate (the gradient).

exam5 marksA straight line graph cuts the yy-axis at (0,4)(0, 4) and passes through (3,2)(3, -2). (a) Find the equation of the line in the form y=mx+by = mx + b. (b) State whether the line is increasing or decreasing, and explain how the gradient tells you. (c) Find where the line crosses the xx-axis.
Show worked solution →

Part (a), find the equation. The yy-intercept is b=4b = 4. The gradient from (0,4)(0, 4) to (3,2)(3, -2) is

m=2430=63=2.m = \frac{-2 - 4}{3 - 0} = \frac{-6}{3} = -2.

So the equation is y=2x+4y = -2x + 4.

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.

Part (c), the xx-intercept. The line crosses the xx-axis where y=0y = 0. Set y=0y = 0 and solve:

0=2x+4,2x=4,x=2.0 = -2x + 4, \qquad 2x = 4, \qquad x = 2.

State the answer. The equation is y=2x+4y = -2x + 4; the line is decreasing; and it crosses the xx-axis at (2,0)(2, 0).

Related dot points