## What you need to know

The **equation of a straight line** takes the form

y=mx+c

Where m is the **gradient **(the slope) of the line and c is the \mathbf{y}**-intercept** (the point where the line touches the y axis), and x and y are the coordinates the line passes through. Using the equation of a straight line to plot that straight line is covered here (drawing straight line graphs revision), which you should make sure you’re comfortable with before proceeding.

Similarly, you should be able to understand the concept of a gradient and how to find it in different situations, which is all covered here (gradients straight line graphs revision) if you’re unsure.

The focus of this topic is on the equation itself and how to find it.

**Example: **Find the equation of the straight line shown below.

So, we are looking for an equation of the form

y=mx+c,

which means we need to find the gradient, m, and the y-intercept, c.

Finding the y-intercept is easy – looking at the graph, we can see it touches the axis at -1, therefore we have c=-1.

Then, to work out the gradient, we draw a triangle underneath the line and divide the change in y by the change in x. The triangle we have drawn has height 4 and width 2, so we get

m=\text{gradient}=\dfrac{4}{2}=2

Therefore, we have that the equation of the straight line is

y=2x-1

The next example explains how to find the equation of a line when you’re given two coordinates it passes through.

**Example: **Find the equation of the line that passes through (-3, 1) and (2, -14).

Like in the last example, we want an equation of the form

y=mx+c,

so, we need to find the gradient m, and the y-intercept, c.

Firstly, we are going to find the gradient by dividing the difference between the y coordinates by the difference between the x coordinates. Doing so, we get

m=\text{gradient}=\dfrac{(-14)-1}{2-(-3)}=\dfrac{-15}{5}=-3

Now we know that m=-3, we know that our equation must take the form

y=-3x+c.

To find c, consider that any pair of coordinates (x,y) that the line passes through must satisfy the equation above (since that is the equation of the line). Furthermore, we know 2 pairs of coordinates that the line passes through since we’re given them in the question. So, if we then pick one of the pairs of coordinates, here we’ll go for (-3, 1), and substitute those x and y values into the equation, we get

1=(-3)\times(-3)+c=9+c

This is now an equation that we can solve to find c. So, if we subtract 9 from both sides, we get

c=1-9=-8

Now we have all the components of a line equation, we can write the resulting equation as

y=-3x-8.

**Note: **sometimes you are just given the gradient and a pair of coordinates that the line passes through, at which point you just skip straight to the substituting them into the equation part to find c.

Some straight-line equations are not written in the form y=mx+c, but they can always be rearranged to that if you need to know the gradient or y-intercept.

**Example: **Find the gradient and y-intercept of the line x+2y=14.

We want to rearrange this equation to make y the subject. So, subtracting x from both sides, we get

2y=-x+14

Then, dividing both sides by 2, we get

y=-\dfrac{1}{2}x+7

Therefore, the gradient -\dfrac{1}{2} and the y-intercept is 7.

## GCSE Maths Revision Cards

- All major GCSE maths topics covered
- Higher and foundation
- All exam boards - AQA, OCR, Edexcel, WJEC.

### Example Questions

1) Determine the equation of the line shown below.

We want an equation of the form

y=mx+c

So, we need to find the gradient, m, and y-intercept, c.

Firstly, looking at the graph we can see that the y-intercept is 2, so c=2.

Now, we will find the gradient by drawing a triangle underneath the line in question.

The triangle we have drawn has height 1 and width 3, so we get

m=\text{gradient}=\dfrac{1}{3}

Therefore, the equation of the line is

y=\dfrac{1}{3}x+2

#### Is this a topic you struggle with? Get help now.

2) Determine the equation of the line that passes through (-3, -6) and (2, 34).

We want an equation of the form

y=mx+c

So, we need to find the gradient, m, and y-intercept, c.

Firstly, we will find the gradient by the dividing the difference in the y coordinates by the difference in the x coordinates:

m=\text{gradient}=\dfrac{-6-34}{-3-2}=\dfrac{-40}{-5}=8

Therefore, the equation of the line is

y=8x+c

Then, to find c we will substitute one pair of coordinates that the line passes through into the equation and rearrange. Here, we’ll pick (2, 34). Subbing this in, we get

34=8\times2+c=16+c

Subtracting 16 from both sides, we get

c=34-16=18

Therefore, the equation of the line is

y=8x+18.

#### Is this a topic you struggle with? Get help now.

### Worksheets and Exam Questions

### Other worksheets

## y=mx+c Worksheets and Revision

## y=mx+c Teaching Resources

### Learning resources you may be interested in

We have a range of learning resources to compliment our website content perfectly. Check them out below.