# How to find the equation of a line with two points?

The general equation of a straight line can be written as y = mx + c where m is the slope and c is the y-intercept.

## Answer: First, write the general equation of a line in the point-slope form that is y - y1 = m (x - x1), then determine the slope of the line by using the given points. Substitute the value of slope obtained in the standard equation along with one point. Finally, arrange the terms.

Let us proceed step by step to find the equation of the line.

**Explanation:**

We can find the equation of a line with two points by following the few steps shown below.

1. Write the general equation of a line in the point-slope form that is y - y_{1} = m (x - x_{1}).

2. Determine the slope of the line by using the given points.

3. Substitute the value of slope obtained in the standard equation along with one point.

4. Arrange the simplified terms.

We can understand better by taking a suitable example.

Let us consider the given points (0, 1) and (−2, −5).

As we know that the equation of a line passing through the points (x_{1},_{ }y_{1}) and (x_{2}, y_{2}) is given by y - y_{1} = m (x - x_{1}).

Here, m is the slope given by the formula m = (y_{2} - y_{1}) / (x_{2} - x_{1})

Check out Cuemath's Slope Calculator that helps you to calculate the slope.

Hence on substituting the given points in the equation of a line, we get

y - 1 = m (x - 0)

m = (y_{2} - y_{1}) / (x_{2} - x_{1})

m = (-5 - 1) / (-2 - 0)

m = -6 / -2 = 3

Substituting the value of m in y - 1 = m (x - 0), we get

y - 1 = 3 (x - 0)

y - 1 = 3x

y = 3x + 1

y - 3x -1 = 0

You can use Cuemath's online Equation of Line calculator to find the equation of a line.

Thus, the equation of a line passing through the points (0, 1) and (−2, −5) is y - 3x -1 = 0.

### Therefore, to find the equation of a line with two points write the general equation of a line in the point-slope form that is y - y1 = m (x - x1), then determine the slope of the line by using the given points. Substitute the value of slope obtained in the standard equation along with one point. Finally, arrange the terms.

visual curriculum