Straight-line graphs: gradients and equations
A straight line has a constant rate of change. Its equation connects every point on the line, its gradient describes the line’s direction and steepness, and its intercept records where it crosses an axis.
These ideas are essential for coordinate geometry, simultaneous equations, differentiation, kinematics and mathematical modelling.
Before you begin
Section titled “Before you begin”You should be able to:
- plot and read coordinates;
- substitute into an expression;
- rearrange and solve linear equations;
- calculate accurately with negative numbers and fractions.
Review coordinate geometry, linear equations or rearranging formulae if needed.
Gradient measures change
Section titled “Gradient measures change”For two distinct points and on a non-vertical line, the gradient is
Gradient is a ratio, not an angle or a length. It tells you how much changes when increases by .
| Gradient | Behaviour from left to right |
|---|---|
| the line rises | |
| the line falls | |
| the line is horizontal | |
| undefined | the line is vertical |
The steeper line has the greater value of . Thus a line of gradient is steeper than one of gradient , even though .
Worked example 1: gradient from two points
Section titled “Worked example 1: gradient from two points”Find the gradient of the line through and .
Use the same subtraction order in numerator and denominator:
So every increase of in produces a decrease of in .
Reversing both subtraction orders gives the same result:
Common misconception: mismatched subtraction
Section titled “Common misconception: mismatched subtraction”If you calculate on top, you must calculate underneath. Mixing the orders changes the sign incorrectly.
Self-check 1
Section titled “Self-check 1”Find the gradient through and .
Answer
The equation
Section titled “The equation y=mx+cy=mx+cy=mx+c”Every non-vertical straight line can be written as
where:
- is the gradient;
- is the intercept, the value of when .
For example, in
the gradient is and the line crosses the axis at .
The equation is a rule for generating points. If , then
so lies on the line.
Worked example 2: draw a line efficiently
Section titled “Worked example 2: draw a line efficiently”Sketch .
- The intercept is , so plot that point.
- The gradient means a change of right and up.
- This reaches . Repeat to reach .
- Join the points with a straight line and extend it in both directions.
A table gives the same points:
Choose convenient values. When the gradient contains thirds, multiples of avoid awkward plotting decimals.
Axis intercepts
Section titled “Axis intercepts”To find where a graph crosses an axis:
- on the axis, ;
- on the axis, .
Worked example 3: find both intercepts
Section titled “Worked example 3: find both intercepts”For :
When ,
so the intercept is .
When ,
so the intercept is . Two points determine a unique line, so these intercepts are enough to draw it.
Common misconception: confusing with the intercept
Section titled “Common misconception: confusing ccc with the xxx intercept”In , is the intercept because setting gives . The intercept must usually be calculated by setting .
Recognising the gradient in other forms
Section titled “Recognising the gradient in other forms”An equation may need rearranging before its gradient and intercept are visible.
Worked example 4: rearrange to
Section titled “Worked example 4: rearrange to y=mx+cy=mx+cy=mx+c”Find the gradient and intercepts of
Make the subject:
Therefore the gradient is and the intercept is .
For the intercept, set in either form:
Hence the intercept is .
Do not read the coefficient in as the gradient. The equation must first be rearranged into a form where is the subject.
Finding the equation of a line
Section titled “Finding the equation of a line”Different information suggests different methods.
Given the gradient and intercept
Section titled “Given the gradient and yyy intercept”Substitute directly into .
Worked example 5
Section titled “Worked example 5”A line has gradient and crosses the axis at . Its equation is
Given a gradient and one point
Section titled “Given a gradient and one point”If a line of gradient passes through , use the point-gradient form
This says that the change in from the known point equals times the change in .
Worked example 6: point and gradient
Section titled “Worked example 6: point and gradient”Find the equation of the line with gradient through .
Substitute , and :
Rearrange if is required:
Check the known point:
An equally valid method is to begin with , substitute , and solve .
Given two points
Section titled “Given two points”First calculate the gradient. Then use either point to find the equation.
Worked example 7: equation through two points
Section titled “Worked example 7: equation through two points”Find the equation through and .
First,
Use in point-gradient form:
Expand:
so
Check :
Checking the second point catches most arithmetic and sign errors.
Self-check 2
Section titled “Self-check 2”Find the equation of the line through and .
Answer
Using ,
so
Horizontal and vertical lines
Section titled “Horizontal and vertical lines”A horizontal line has equation
because every point has the same coordinate. Its gradient is .
A vertical line has equation
because every point has the same coordinate. Its gradient is undefined: calculating change in divided by change in would require division by zero.
A vertical line cannot be written as . It is not a function of , because one value corresponds to many values.
Worked example 8: special cases
Section titled “Worked example 8: special cases”The line through and is
The line through and is
Do not try to force either result through the general two-point calculation without first noticing the equal coordinates.
Parallel and perpendicular lines
Section titled “Parallel and perpendicular lines”Parallel non-vertical lines have equal gradients:
Distinct parallel lines have different intercepts. If both gradient and intercept are equal, the equations describe the same line.
Perpendicular lines meet at a right angle. For finite, non-zero gradients,
Therefore the perpendicular gradient to is the negative reciprocal
One gradient changes sign and the fraction turns upside down. Horizontal and vertical lines form the exceptional perpendicular pair.
Worked example 9: a parallel line
Section titled “Worked example 9: a parallel line”Find the equation of the line parallel to through .
Rearrange the given line:
The required gradient is therefore . Through :
Hence
Worked example 10: a perpendicular line
Section titled “Worked example 10: a perpendicular line”Find the equation of the perpendicular bisector of the segment joining and .
The midpoint is
The gradient of is
The perpendicular gradient is , since
Using the midpoint:
so
This line is perpendicular to and passes through its midpoint, so both required properties have been established.
Common misconception: only change the sign
Section titled “Common misconception: only change the sign”The perpendicular gradient to is , not . The perpendicular gradient to is , not .
Intersections and simultaneous equations
Section titled “Intersections and simultaneous equations”At an intersection, the same point satisfies both line equations. If both equations give , set their right sides equal.
Worked example 11: find an intersection
Section titled “Worked example 11: find an intersection”Find where
intersect.
At the intersection,
Therefore
Substitute into either equation:
The intersection is
Substitution in the other equation gives , confirming the result. This is the graphical meaning of solving two simultaneous equations.
Straight lines as models
Section titled “Straight lines as models”In a model
the gradient has units
and the intercept is the modelled value of when . Interpret both in context.
Worked example 12: interpret a model
Section titled “Worked example 12: interpret a model”A taxi fare pounds is modelled by
where is the distance in kilometres.
- The gradient means the fare increases by £ for each additional kilometre.
- The intercept represents the initial charge of £.
- For a km journey,
so the model predicts a fare of £.
The algebraic line extends indefinitely, but the practical model may only be sensible for distances in a stated domain, usually .
A reliable method
Section titled “A reliable method”When solving a straight-line problem:
- Identify what is known: points, gradient, intercept, parallelism or perpendicularity.
- Calculate the gradient carefully, preserving subtraction order.
- Use when a point and gradient are known.
- Rearrange only if the requested form requires it.
- Substitute known points to check the equation.
- Treat horizontal and vertical lines separately.
- Include units and interpretation in modelling questions.
Mixed self-check
Section titled “Mixed self-check”- State the gradient and intercept of .
- Find both axis intercepts of .
- Find the equation of the line with gradient through .
- Find the equation through and .
- Find the equation of the line parallel to through .
- Find the equation of the line perpendicular to through .
- Find the intersection of and .
- The line through and has gradient . Find .
- Find the perpendicular bisector of the segment from to .
- A tank contains litres after minutes. Interpret the gradient and intercept, then find when the model predicts that the tank is empty.
Answers
Section titled “Answers”- and .
- Setting gives ; setting gives .
- , so .
- , so .
- The given gradient is . Thus , so .
- The perpendicular gradient is . Thus , so .
- gives , then . The intersection is .
- , so and .
- The midpoint is and the segment gradient is , so the perpendicular gradient is . Hence , or .
- The initial volume is litres and the volume decreases by litres per minute. Setting gives , so the tank is empty after minutes.
What to learn next
Section titled “What to learn next”Continue to graphs of functions to compare straight lines with other important graph families, and graph transformations to understand how equations move and reshape graphs.
For the full A-level treatment, including exact coordinate arguments and more demanding line problems, study straight lines in coordinate geometry. The same gradient ideas underpin differentiation and gradients.