y-b=m(x-a) (SQA National 5 Maths): Revision Note
Exam code: X847 75
Determining the equation of a straight line
What is the equation of a straight line?
The general equation of a straight line is y = mx + c where
m is the gradient
c is the y-intercept
The value where the line cuts the y-axis
y = 5x + 2 is a straight line with
gradient 5
y-intercept 2
y = 3 - 4x is a straight line with
gradient -4
y-intercept 3
How do I find the equation of a straight line using y-b=m(x-a)?
To find the equation of a line you need to know
The coordinates of a point on the line
The gradient of the line
If you know two points on the line,
and
You can find the gradient using the formula
If the line has gradient m and goes through the point (a, b)
then an equation of the line is y - b = m(x - a)
E.g. the line with gradient 3 through point (2, 5)
,
,
An equation of the line is
An equation in this form can be rearranged into y = mx + c form if required:
How do I find the equation of a straight line using y=mx+c?
You can also use y = mx + c to find the equation of a line, if you know the gradient m and a point on the line (a, b)
Substitute the values of m and (x, y) = (a, b) into the equation
Then solve to find the value of c
E.g. the line with gradient 3 through point (2, 5)
,
Substituting into
gives
So
The equation of the line is
How do I find the equation of a straight line from a graph?
Find the gradient m by drawing a triangle and using
Positive for uphill lines, negative for downhill
Read off the y-intercept c from the graph
Where it cuts the y-axis
Substitute these values into y = mx + c
What if no y-intercept is shown on the graph?
If you can't read off the y-intercept
Find any point on the line
Use one of the methods above to find the equation
What are the equations of horizontal and vertical lines?
A horizontal line has the equation y = c
c is the y-intercept
A vertical line has the equation x = k
k is the x-intercept
For example
y = 4
x = -2
Worked Example
The diagram shows the straight line passing through points A and B.

Find the equation of the line AB.
Give the equation in its simplest form.
Answer:
Find m, the gradient of the line, using
The slope of the line is downward from left to right
So the negative gradient is as expected
Method 1
Use with
would also work, and would lead to the same answer
Simplify the equation into form
That is the equation in simplest form
Method 2
Use with
would also work, and would lead to the same answer
Solve to find the value of
Substitute that back into with
Unlock more, it's free!
Was this revision note helpful?