# How to work out the equation of a straight line graph from 2 coordinate points.

In these 2 worked questions shown below you will be finding the equation of a line that passes through two coordinate points. Click here to read through the theory before you start.

**Question 1**

Find the equation of the straight line that passes through (1,5) and (5,21).

First work out the gradient of the line using y = mx +c.

m = (y2 – y1) ÷ (x2 - x1)

m = (21 - 5) ÷ (5 – 1)

m = 16 ÷ 4

m = 4

Now since the gradient is found you can substitute this value and one of the coordinate points into y = mx + c to find intercept (c)

The point which I shall use is (1,5) but you will get the same answer if you use (5,21)

y = mx + c

5 = 4 × 1 + c

5 = 4 + c

1 = c

So the intercept of the line is 1.

Now put these values back into y = mx +c.

Therefore the equation of the line is y = 4x + 1.

**Question 2**

Find the equation of the straight line that passes through (-3, -12) and (1,-4).

First work out the gradient of the line using y = mx +c.

m = (y2 – y1) ÷ (x2 - x1)

m = (-4 - -12) ÷ (1 - -3) (Be careful with the negative signs)

m = 8 ÷ 4

m = 2

Now since the gradient is found you can substitute this value and one of the coordinate points into y = mx + c to find intercept (c)

The point which I shall use is (-3,-12) but you will get the same answer if you use (1,-4)

y = mx + c

-12 = 2 × -3 + c

-12 = -6 + c

-6 = c

So the intercept of the line is -6.

Now put these values back into y = mx +c.

Therefore the equation of the line is y = 2x - 6.

For some harder worked examples on finding the equation of a straight line click here.

## More by this Author

- 0
The density, mass and volume triangle is as follows: So if you wanted to work out the density, you would cover up density in the magic triangle to give: Density = Mass/Volume (since mass is above volume) So if...

- 12
Find the nth term of a quadratic number sequence.

- 0
The surface area of a triangular prism can be found in the same way as any other type of prism. All you need to do is calculate the total area of all of the faces. A triangular prism has 5 faces, 3 being rectangular and...

## Comments

No comments yet.