**Start revising A-level & GCSE with 7 million other students**

# Straight lines

## You are here

***Please note: you may not see animations, interactions or images that are potentially on this page because you have not allowed Flash to run on S-cool. To do this, click here.***

## Straight lines

**Perpendicular lines** are lines that cross at right angles to each other.

**To find if two lines are perpendicular you simply have to follow these simple steps:**

- Calculate the gradient of the first line.
- Calculate the gradient of the second line.
- Multiply your answers together.

**If the answer is -1**, then you know that the lines are perpendicular. (If the answer is anything else, then the lines are not perpendicular.)

The mathematical way of describing these steps is to say that the product of the gradients of lines equals minus 1.

**The equation for a straight line can always be described by an equation of the form:**

y = mx + c

where **m** is the gradient of the line, and **c** is where the line intercepts the y-axis. (This is because the graph crosses the y-axis when x = 0, and if x = 0, y = c.)

**See the diagram below:**

So if we know the values for m and c, we can instantly write the equation of the line!

**For example:**

A line with gradient 3 that crosses the y-axis at (0, 4) has equation, y = 3x + 4.

If we know the gradient and the position of one point on the line, we can easily find the equation of the line by inserting the values we know into the equation y = mx + c.

**For example:**

**If we know a point on the line is (4, 2) and that the gradient is 3, then:**

2 = 3 x 4 + c.

Therefore, c = 2 - 12 = -10.

Now, we know c and m, so the equation of the line is y = 3x - 10.

**An alternative method is to use the formula:**

(y - y_{1}) = m(x - x_{1})

where m = gradient, and (x_{1}, y_{1}) is the known point.

**Explanation:**

This works because the gradient between any two points on the line is always the same. Therefore the gradient between a general point (x, y) and a known point (x_{1}, y_{1}) is constant.

**This gives:**

or more usefully,

(y - y_{1}) = m(x - x_{1})

where m = gradient, and (x_{1}, y_{1}) is the known point.

Using our earlier example:

If we know the position of two points on the line, we can easily find the gradient (m), using:

Once you have calculated the gradient, you can use either of the known points to then find the equation of the line.

**For example:**

Find the equation of the line joining (2, 7) to (5, -2).

**Therefore, using the point (2, 7) we get that the equation of the line is: **

**The point at which two lines cross is the point of intersection for the two lines.**

**This is shown by the point I in the following graph:**

If the point of intersection is at (x,y), then x and y are the only points on the line where the same value of x will give the same value of y in the equations for both lines. So we must solve the simultaneous equations.

At the point of intersection the equations of the two lines are equal. Hence,

m_{1}x + c_{1} = m_{2}x + c_{2}.

**For example: **

Find where the following two lines meet:

Line 1: y = 2x + 5

Line 2: y = -0.5x + 10

Using m_{1}x + c_{1} = m_{2}x +c_{2} (the equation described above) we know that:

**2x + 5 (equation of line 1) = -0.5x + 10 (equation of line 2)**

This solves to give:

x = 2.

So we know the lines intersect where x = 2. Now all we need is the y value.

To do this insert x = 2 into the equation for either line. If we use line 1 we get,

y = 2 x 2 + 5

= 9

We now know that at the point of intersection, x = 2 and y = 9, or (2,9).