大象传媒

Straight line graphs - AQAThe equation of a line through two points

Graphs show the relationship between two variables and are often seen in newspapers and the media. People who work in professions involving maths and science commonly use graphs.

Part of MathsAlgebra

The equation of a line through two points

The straight line through two points will have an equation in the form \(y = mx + c\).

We can find the value of \(m\), the gradient of the line, by forming a right-angled triangle using the coordinates of the two points.

Then, we can find the value of \(c\), the \(y\)-intercept, by substituting the coordinates of one point into the equation.

The final answer can be checked by substituting the coordinates of the other point into the equation.

Example

Find the equation of the line that goes through the points (鈭1, 3) and (3, 11).

Sketch the two points and join them with a straight line. Draw a right-angled triangle to show the difference in the \(x\)-coordinates and the difference in the \(y\)-coordinates.

First, find the gradient of the line, \(m\). In the \(x\)-direction, the difference between 3 and 鈭1 is equal to 3 鈥 (鈭1) = 4. In the \(y\)-direction, the difference between 11 and 3 is equal to 11 鈥 3 = 8.

Diagram of a triangle to find the equation of the line that goes through the points (-1, 3) and (3, 11).

The gradient of the line through the points (鈭1, 3) and (3, 11) is given by \(\frac{\text{change in y}}{\text{change in x}} = \frac{8}{4} = 2\).

This is the value of \(m\) in the equation of the line, so the equation will be \(y = 2x + c\).

Next, find the value of \(c\). Using the \(x\) and \(y\) values from the point (3, 11), substitute into the equation.

\(y=2x+c\)

\(11 = 2 \times 3+c\)

\(11=6+c\)

\(c=5\)

So the equation of the line through the points (-1, 3) and (3, 11) is \(y = 2x + 5\).

Finally, check by substituting the \(x\)-coordinate of the other point into this equation:

\(y=2x+5\)

\(x=-1\)

\(y=2 \times(-1)+5= -2+5=3\)

This gives the correct \(y\)-coordinate for the point (鈭1, 3), so the equation is correct.

Question

Find the equation of the line that goes through the points (3, 4) and (12, 鈭2).