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.
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
the two numbers you most want are sitting right there in plain sight. is the gradient (the number multiplying ) and is the -intercept (the constant on its own). NESA bundles three skills around this form, and a question can test any of them. First, read and straight from an equation. If the equation is given in a different shape, rearrange it into first. Second, write the equation of a line from its graph: read off the vertical axis, work out from a rise/run step or two points, then assemble . Third, sketch a line quickly from and : 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: is a fixed starting amount and 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 is a recipe for building the line: start at height on the -axis, then climb (or fall) at the steady rate for every step to the right. That one sentence explains why is where the line begins and why controls how fast it rises. You earn the marks in three ways. Compare the equation to correctly, including the sign of and reading a missing constant as . 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 as the coefficient of , dropping the minus sign on a negative gradient, forgetting to divide the whole equation through when a coefficient is in front of , and confusing the -intercept with the -intercept.
The answer
Reading the gradient and y-intercept from y = mx + b
When a line is written as , you can read both key numbers without any working:
- the gradient is the coefficient of (the number it is multiplied by), and
- the -intercept is the constant term (the number standing alone, with no ).
So for the gradient is and the -intercept is . The sign travels with the number: a at the end means the line cuts the -axis below the origin at , and a negative coefficient of means a line that slopes downwards. Two cases catch students out. If there is no constant, as in , the -intercept is : the line passes through the origin. If there is no term, as in , the gradient is : the line is horizontal at height . 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 has the constant first and the term second. Reorder it as and the form is obvious: the coefficient of is , so , and the constant is , so . Whenever an equation looks unusual, rewrite it as "( term) (constant)" before reading off and .
Rearranging an equation into gradient-intercept form first
An equation only reveals and at a glance once it is in the form , with 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 alone.
Take . Add to both sides to free , giving , so and . Take . Subtract from both sides to get , so and . The step that needs the most care is when a number multiplies . For , first add to both sides to get , then divide every term by :
so and . The classic error is to divide only the and forget the (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 and . You find the two numbers from the picture, then slot them into . There are just two things to read off:
- Read from the -axis. Find where the line crosses the vertical axis; that height is . This needs no calculation.
- Find from the line. Either count a rise/run triangle between two grid points, or pick two clear points and use .
Then write with those values. The line below crosses the -axis at , so . Stepping from that point, a run of across goes with a rise of up to land on the line again at , so . The equation is therefore . The diagram shows exactly the two things you read: the intercept on the -axis and the gradient as a rise-over-run step.
If the line slopes down, the only change is that is negative. A line cutting the -axis at and dropping to has and gradient
so its equation is . 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 hands you one point for free and tells you how to reach the next one. A straight line needs only two points, so the method is short:
- Plot the -intercept on the vertical axis.
- Write the gradient as . A whole number is (run ); a fraction like is already rise over run .
- 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.
- Rule the line through the two points, extending it past them with arrows on each end.
The stages below sketch , where and . Reading as , each step is across and up. Plot , step to , and the line is determined; stepping once more reaches 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 and the line as it climbs. Nothing is plotted yet; this is just the grid you will build on.
- Stage 2, plot the -intercept
- Read from the equation and mark the single point 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 . From move a run of to the right, then a rise of upwards, landing on . That right-angled step is the gradient made visible.
- Stage 4, rule the line
- Join and with a straight edge and extend the line both ways. Stepping again to shows all three points lie on it, confirming the sketch of .
A fractional gradient is sketched the same way, you just read the rise and run from the fraction. For , the intercept is and the gradient is a rise of for a run of , so you step across and up to , then again to . 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 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 (the cost before anything happens) and the rate is (the cost added per unit). The letters are usually changed to fit the situation, but the structure is identical.
Suppose an electrician charges a 40 dollars per hour. Let be the total cost in dollars and the number of hours. The model is
which is with the gradient and the -intercept . Here is the fixed call-out fee (the cost for hours, before any work) and is the rate of $40 per hour. To predict the cost of any job, substitute the hours: a hour job costs 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 -intercept of " means compare to and read off the coefficient of and the constant, after rearranging if is not already by itself.
- "Write the equation in the form " (or "make the subject") means rearrange, dividing the whole equation through if a number multiplies .
- "Find the equation of the line" with a graph means read off the -axis, find from a step or two points, and write .
- "Sketch / draw the line " means plot , step by the gradient to a second point, and rule the line.
- "What does the gradient (or -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 and the per-unit rate as , 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 land on the gradient and the -intercept, because understanding it removes any need to memorise which is which. Put into : the term vanishes and you are left with . That is precisely the point on the -axis, so must be the -intercept. Now increase by , from any value to the next: the term grows by exactly , so goes up by for every one-unit step across. That is the definition of the gradient, the rise per unit run, so must be the gradient. This also explains the two special cases at a glance: if there is no term, stays at for every , and the line is horizontal; and if the line passes through , the origin. The formula is not an arbitrary label, it is the line's own building instructions: start at , climb at rate .
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 and . Find the equation of the line in the form .Show worked answer →
Find the gradient first. Neither point is on the -axis, so start with the gradient using for the points and :
.
Find the -intercept. Here cannot be read off, so substitute the gradient and one known point into and solve for . Using : , so and .
Write and check the equation. Putting and into gives . Test the other point : , which matches.
Markers reward the gradient calculation giving , the substitution that gives , and the final equation .
2023 HSC-style4 marksA taxi fare is a fixed flagfall plus a charge for each kilometre travelled. A km trip costs $22 and a km trip costs $40. The fare dollars for a trip of kilometres is linear. (a) Find the equation for in the form . (b) State what the gradient and the -intercept represent. (c) Find the fare for a km trip.Show worked answer →
Part (a), find the gradient (the per-km rate). Treat the trips as the points and and use .
Now find by substituting and the point into : , so and . The model is .
Part (b), interpret the two numbers. The gradient is the rate: each extra kilometre adds $3, so the charge is $3 per km. The -intercept is the cost when km, the fixed flagfall of $10 charged before any distance.
Part (c), fare for km. Substitute : , so a km trip costs $55.
Markers reward the gradient and the model , a worded interpretation of the rate and the flagfall, and the substituted answer of $55.
2022 HSC-style5 marksA line has equation . (a) Rearrange it into the form and state the gradient and -intercept. (b) Write down the coordinates of the point where the line crosses the -axis. (c) Find the coordinates of the point where the line crosses the -axis.Show worked answer →
Part (a), make the subject. Add to both sides to get , then divide every term by :
.
In the form the gradient is and the -intercept is . The common slip is dividing only the and forgetting to divide the .
Part (b), the -intercept point. The line cuts the vertical axis at , so the point is .
Part (c), the -intercept point. The line crosses the -axis where . Set in : , so and . The point is .
Markers reward dividing the whole equation through to reach with and , the -intercept , and setting to find the -intercept .
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 and the -intercept of each line: (a) ; (b) ; (c) .Show worked solution →
- Match each equation to
- The gradient is the number multiplying , and the -intercept is the constant on its own.
- Part (a),
- The coefficient of is and the constant is , so and .
- Part (b),
- Reorder it as first. The coefficient of is and the constant is , so and .
- Part (c),
- The coefficient of is and the constant is , so and .
foundation2 marksA line has gradient and -intercept . (a) Write its equation in the form . (b) Use the equation to find when .Show worked solution →
Part (a), write the equation. Substitute and into :
Part (b), find when . Substitute and evaluate, multiplying before adding:
State the answer. The equation is , and when , .
core3 marksRearrange each equation into the form and state the gradient and -intercept: (a) ; (b) ; (c) .Show worked solution →
Part (a), . Add to both sides to leave alone:
So and .
Part (b), . Subtract from both sides:
So and .
Part (c), . First add to both sides, then divide every term by :
So and . The key step is dividing the whole right-hand side by , not just one term.
core3 marksA straight line is drawn on a number plane. It crosses the -axis at and also passes through the point . Find the equation of the line in the form .Show worked solution →
Read the -intercept. The line cuts the vertical axis at , so .
Find the gradient. Use the two points and in the gradient formula:
Write the equation. Put and into :
Check. At , , which matches the given point .
core4 marksSketch the line using its gradient and -intercept. Show the -intercept and one gradient step, and give the coordinates of two points the line passes through.Show worked solution →
- Read and
- Comparing with gives gradient and -intercept .
- Plot the -intercept
- Mark the point on the vertical axis. This is the first point on the line.
- Step out using the gradient
- Write as , a rise of for a run of . From go across and up to reach
Get a third point and draw. Stepping again from gives . Rule a straight line through , and .
State two points. The line passes through and (and also ), exactly as built in the stage figure above.
exam5 marksAn electrician charges a fixed call-out fee plus an hourly rate. The total cost dollars for a job lasting hours is . (a) State the gradient and the -intercept of this model. (b) Explain what each of them means in this context. (c) Find the cost of a job that lasts hours.Show worked solution →
- Part (a), gradient and intercept
- The model is in the form , so the gradient is and the -intercept is .
- Part (b), what they mean
- The -intercept is the cost when hours, that is, the fixed call-out fee of m = 4040 dollars, so the labour costs $40 per hour.
- Part (c), cost of a -hour job
- Substitute into the model:
State the answer. A -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 -axis at and passes through . (a) Find the equation of the line in the form . (b) State whether the line is increasing or decreasing, and explain how the gradient tells you. (c) Find where the line crosses the -axis.Show worked solution →
Part (a), find the equation. The -intercept is . The gradient from to is
So the equation is .
Part (b), increasing or decreasing. The gradient is , which is negative, so the line is decreasing: it slopes down to the right, falling units for every unit across.
Part (c), the -intercept. The line crosses the -axis where . Set and solve:
State the answer. The equation is ; the line is decreasing; and it crosses the -axis at .
Related dot points
- 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.
- Graph linear functions by constructing a table of values and plotting the points, recognise a linear relationship, sketch horizontal and vertical lines, and graph a line using its x- and y-intercepts
A focused answer to the HSC Maths Standard 2 dot point on graphing linear functions. Build a table of values, plot the points and rule a straight line, sketch horizontal lines and vertical lines, graph a line from its x- and y-intercepts, and read values off the graph, with worked Australian cost and distance examples.
- Construct a linear model y = mx + b for a practical situation made of a fixed amount plus a constant rate, interpret the gradient as the rate and the y-intercept as the fixed starting amount in context, and use the model to predict an output and to find the input that gives a required output
A focused answer to the HSC Maths Standard 2 dot point on linear models. How to build y = mx + b from a fixed amount plus a rate, interpret the gradient and y-intercept in words with units, predict a value and read the model backwards, with worked plumber, taxi, mobile-plan and tank-filling examples.
- Recognise and model direct variation y = kx, where one quantity is a constant multiple of another, find the constant of variation k from a data pair, write and use the equation, identify direct variation from a constant ratio in a table or a straight-line graph through the origin, and contrast it with simple inverse variation y = k/x
A focused answer to the HSC Maths Standard 2 dot point on direct variation. How y = kx works, finding the constant of variation k from a data pair, why the graph is a straight line through the origin, recognising direct variation from a table or graph, and a brief contrast with inverse variation y = k/x, with worked pay, cost and speed examples.
- Solve linear equations using inverse operations, including one-step, two-step and multi-step equations, equations with brackets and fractions, and equations with the variable on both sides
A focused answer to the HSC Maths Standard 2 dot point on solving linear equations. Inverse operations and keeping the equation balanced, one-step, two-step and multi-step equations, brackets, clearing fractions with the lowest common denominator, the variable on both sides, and checking by substitution, with worked Australian examples.