Key points about equations of a line and calculating gradient

- The general equation of a straight line is ๐ฆ = ๐๐ฅ + ๐.
- ๐ is the gradientA measure of the slope of a line. and is the change in ๐ฆ-coordinates รท the change in ๐ฅ-coordinates.
- ๐ is the ๐ฆ-interceptThe point at which the line crosses the ๐ฆ-axis. and shows where the line crosses the ๐ฆ-axis.
Revise plotting straight line graphs to make sure you are confident with the link between equations and coordinates.
Video โ Straight line graphs
Watch this video to find out how the equation ๐ฆ = ๐๐ฅ + ๐ can be used to work out the gradient and ๐ฆ-intercept on a straight line graph.
Straight line graphs.
All straight line graphs have an equation that can be written in the form ๐ฆ equals ๐๐ฅ add ๐, where ๐, the coefficient of the ๐ฅ term, is the gradient or slope of the line. The constant, ๐, is the ๐ฆ-intercept. This is the value where the line crosses the ๐ฆ-axis.
Let's look at an example question.
A straight line passes through the points (1, 5) and (3, โ1). Find the equation of this line.
First, draw a sketch to help make sure your answers are sensible. This doesn't need to be accurate, but you should mark the two given points in roughly the right positions, in the correct quadrants.
Remember, the first coordinate represents movement along the ๐ฅ-axis, left or right, and the second coordinate represents movement along the ๐ฆ-axis, up or down.
To finish the sketch, draw a straight line that goes through each of the points and the ๐ฆ-axis.
Then, you need to find two pieces of information, the gradient, ๐, and the ๐ฆ-intercept, ๐.
To find the gradient, you need to calculate the change in ๐ฆ divided by the change in ๐ฅ.
It can be helpful to label the two points as A and B here.
The change in ๐ฆ is given by the ๐ฆ coordinate of point B, ๐ฆB, subtract the ๐ฆ coordinate of A, ๐ฆA. Then, the change in ๐ฅ is given by the ๐ฅ coordinate of point B, ๐ฅB subtract the ๐ฅ coordinate of A, ๐ฅA.
It doesn't matter which way round you label the points. You'll get the same answer if you chose to subtract the coordinates of point B from the coordinates of point A.
Labelling (1, 5) as point A and (3, โ1) as point B, and using ๐ฆB subtract ๐ฆA over ๐ฅB subtract ๐ฅA, this gives a change in ๐ฆ of โ1 subtract 5, and a change in ๐ฅ of 3 subtract 1.
Simplified, this is โ6 divided by 2, which equals โ3. So, the gradient, ๐, equals โ3.
You can substitute this into the general equation for a straight line, ๐ฆ equals โ3๐ฅ add ๐.
Now you've worked out the gradient, don't forget to check your answer makes sense.
The sketch shows that the ๐ฆ value decreases as the ๐ฅ value increases, meaning the line slopes downhill from left to right. This means the gradient is negative, which matches the calculated gradient of โ3.
Next, to find the ๐ฆ-intercept, ๐, choose one of the given points, for example (1, 5), and then substitute ๐ฅ equals 1 and ๐ฆ equals 5 into the lineโs equation, with the variable ๐ staying unknown for now. Doing this gives 5 equals โ3 times 1 add ๐, which simplifies to 5 equals โ3 add ๐.
Finally, solve this equation for ๐ so that you have all the information needed to find the equation of the line. So, add 3 to both sides to isolate ๐ on the right-hand side.
5 add 3 equals 8, so ๐ equals 8 and the equation of the line is ๐ฆ equals โ3๐ฅ add 8.
To check, look at your sketch. The line crosses the ๐ฆ-axis at a positive ๐ฆ-value that's greater than 5, so 8 is a realistic answer for the ๐ฆ-intercept.
Video โ Finding the gradient
Watch this video to find out how to determine if a straight line graph has a positive or negative gradient and how to calculate the gradient of a line.
Finding the gradient.
Any straight line graph has a constant gradient, which is calculated by the change in ๐ฆ divided by the change in ๐ฅ, along any section of the graph.
The gradient is measuring the steepness of the graph, so a constant gradient means the steepness stays the same across the entire graph.
Before calculating the gradient, consider if it will be positive or negative.
To do this, imagine walking along the line from left to right. You would be going uphill, which means the gradient is positive.
Then choose any two coordinates on the line, for example (2, 3) and (8, 6), and then work out the change in ๐ฆ divided by the change in ๐ฅ.
So, the gradient is one half.
Now, what if we draw another line?
Again, consider if the gradient will be positive or negative. This time, if you are walking along the line from left to right, you would be walking downhill, so the gradient will be negative.
Then, choosing two random points on the line and using the same method as before, we can work out that the gradient is โ2.
Check your understanding
Equation of a line from a graph
The general equation of a straight line is ๐ฆ = ๐๐ฅ + ๐.
๐ is the gradient of the line. ๐ is the coefficientA number or symbol multiplied with a variable or an unknown quantity in an algebraic term. For example, 4 is the coefficient of 4nยฒ. of ๐ฅ.
- The gradient shows how much the line goes up or down (vertical change) for every 1 unit it goes across (horizontal change).
- Gradient is calculated as
change in ๐ฆ รท change in ๐ฅ. - A gradient of 8 is steeper than a gradient of 3.
- A negative value of ๐ shows the line has a downward slope.
- A gradient of โ8 is steeper than a gradient of โ3.
๐ is the ๐ฆ-intercept of the line. The ๐ฆ-intercept shows where the line crosses the ๐ฆ-axis.

Remember:
If the equation does not have ๐ฆ as the subjectThe subject of a formula or equation is the variable on its own on one side of the equals sign, eg ๐ฆ is the subject in ๐ฆ = 3๐ฅ + 5., the equation needs to be rearrangeTo rearrange an equation means to perform the same operation to the expressions on both sides of the equals sign. before finding the values of ๐ and ๐.
Follow the working out below
Check your understanding
GCSE exam-style questions

- The equation of a straight line is ๐ฆ = 7 โ 2๐ฅ.
What is the gradient and ๐ฆ-intercept of the line?
The gradient is โ2. The ๐ฆ-intercept is 7.
- The gradient of the line is the number before the ๐ฅ, known as the coefficient of ๐ฅ.
- The gradient is โ2.
- The ๐ฆ-intercept of the line is the number term on its own. The ๐ฆ-intercept is 7.
- What is the equation of the line?

๐ฆ = 3๐ฅ + 2.

- The equation of a straight line is ๐ฆ = ๐๐ฅ + ๐, where ๐ is the gradient and ๐ is the ๐ฆ-intercept.
- Draw a triangle to show the horizontal and vertical change.
- The change in ๐ฆ divided by รท the change in ๐ฅ always gives the gradient as 3.
- The line crosses the ๐ฆ-axis at 2, so the ๐ฆ-intercept is 2.
- What is the equation of the line?

๐ฆ =โ \(\frac{1}{2}\)๐ฅ + 3.

The equation of a straight line is ๐ฆ = ๐๐ฅ + ๐, where ๐ is the gradient and ๐ is the ๐ฆ-intercept.
Draw a triangle to show the horizontal and vertical change. The line slopes downwards, so the gradient is negative.
The change in ๐ฆ divided by รท the change in ๐ฅ always gives the gradient as \(\frac{-1}{2}\).
The line crosses the ๐ฆ-axis at 3, so the ๐ฆ-intercept is 3.
Equation of a line from a graph โ interactive activity
Working with the general equation of a straight line, ๐ฆ = ๐๐ฅ + ๐, use the interactive activity to see what a graph looks like when plotted.
Select values for ๐, the gradient, and ๐, the intercept, to create a straight line.
Equation of a line between two points
The equation of a line is ๐ฆ = ๐๐ฅ + ๐ where ๐ is the gradientA measure of the slope of a line. and ๐ is the ๐ฆ-interceptThe point at which the line crosses the ๐ฆ-axis..
To find the equation of a line from two points, follow these steps:
- Find the gradient by calculating change in ๐ฆ-coordinates รท change in ๐ฅ-coordinates.
- substituteIn algebra, to replace a letter with a number. the gradient for ๐ in the equation ๐ฆ = ๐๐ฅ + ๐.
- Substitute the ๐ฅ and ๐ฆ-coordinate of one of the points into the equation.
- solveTo solve an equation is to find the value of an unknown letter. the equation to find the value of ๐.
- Write the final equation using the found gradient and ๐ฆ-intercept.
GCSE exam-style questions

- Find the equation of the line that has a gradient of 3 and goes through the point (2, 5).
๐ฆ = 3๐ฅ + 1.
- Substitute the gradient of 3 in place of ๐ in the equation ๐ฆ = ๐๐ฅ + ๐ to give ๐ฆ = 3๐ฅ + ๐.
- Substitute the values of ๐ฅ and ๐ฆ from the coordinates of the point (2, 5) to give 5 = 3 ร 2 + ๐.
This means 5 = 6 + ๐. - Solve to find the value of ๐. Subtract 6 from each side. This gives the ๐ฆ-intercept as ๐ = โ1.
- Write the equation of the line in the form ๐ฆ = m๐ฅ + c.
- Find the equation of the line that goes through the points (0, 3) and (2, 6).
๐ฆ = 1โ5๐ฅ + 3.
- Find the change in ๐ฆ-coordinates by subtracting the first ๐ฆ-coordinate from the second ๐ฆ-coordinate.
6 โ 3 = 3. - Find the change in ๐ฅ-coordinates by subtracting the first ๐ฅ-coordinate from the second ๐ฅ-coordinate.
2 โ 0 = 2. - Calculate the change in ๐ฆ values รท the change in ๐ฅ values. 3 รท 2 = 1โ5, so the gradient is 1โ5, or \(\frac{3}{2}\).
- The ๐ฆ-intercept is given by the point (0, 3), as this is where the line crosses the ๐ฆ-axis. The ๐ฆ-intercept is 3.
- Write the equation of the line in the form ๐ฆ = m๐ฅ + ๐.
- Find the gradient of the line between the points (โ 6, 2) and (3, 5).
The gradient is \(\frac{1}{3}\).
- Find the change in ๐ฆ-coordinates by subtracting the first ๐ฆ-coordinate from the second ๐ฆ-coordinate.
5 โ 2 = 3. - Find the change in ๐ฅ-coordinates by subtracting the first ๐ฅ-coordinate from the second ๐ฅ-coordinate.
3 โ โ 6 = 3 + 6 = 9. - The gradient is the change in ๐ฆ values รท the change in ๐ฅ values. 3 รท 9 = \(\frac{3}{9}\), which simplifies to \(\frac{1}{3}\).
Quiz โ Equations of a line and calculating gradient
Practise what you have learned about equations of a line and calculating gradient with this quiz.
Now that you have revised how to work out equations of a line and calculate gradient, why not look at equations of parallel and perpendicular lines?
Play Sudoku with BBC Bitesize!
Every weekday we release brand new easy, medium and hard Sudoku puzzles. Perfect for testing your skill with numbers and logic.

More on Algebra
Find out more by working through a topic
- count14 of 17

- count15 of 17

- count16 of 17

- count17 of 17
