# Home > Algebra > Coordinate Geometry > Two Point Formula

# Two Point Formula

The two point formula for the equation of a straight line involves calculating the equation of the line passing through two given points.

We know the gradient of any line is given by the formula –

m  = where (x1, y1) and (x2, y2) are the two given points.

We also know that the point gradient formula is –

y – y1  =  m(x – x1).

Substituting the formula for m in the above equation, we get

y – y1  = (x – x1)

So the equation of a straight line passing through two points (x1, y1) and (x2, y2) is – = Note: There are two alternate methods to find the equation of the straight line. Both involve first finding the gradient or slope of the line separately using the two points, and then

1. use the point gradient formula to obtain the equation of the straight line.
2. Alternatively, you can also use the gradient intercept form (by substituting one of the points) to get the equation of the straight line.

Example 1: Find the equation of the straight line passing through (-1, 2) and (3, 8).

The equation of a line passing through two points is given by –

y – y1  = (x – x1)

y – 2  = (x – (-1))

y – 2  = (x + 1)

4(y – 2)  =  6(x + 1)

6x + 6 – 4y + 8  =  0

6x – 4y + 14  =  0 is the equation of the straight line.

Example 2: Find the equation of the straight line passing through A (-1, 3) and B (2, 6); and hence show that lies on the straight line.

The equation of a line passing through two points is given by –

y – y1  = (x – x1)

A (-1, 3), so x1 = -1 and y1 = 3

B (2, 6), so x2 = 2 and y2 = 6

So the equation of the line is –

y – 3  = (x – (-1))

y – 3  = (x + 1)

y – 3  = 1(x + 1)

y – 3  =  x + 1

y  =  x + 4

Now to check lies on y = x + 4, we substitute the value of x in the equation –

y  = + 4  = This is the y coordinate of Hence the point lies on the line y  =  x  +  4.

Here are some more examples of two point formula for the equation of a straight line.