Use our calculator and we will give you the **equation of the line through two points** as well as the value of its pending.

You only have to enter the coordinates (x_{1}, y_{1}) (x_{2}, y_{2}) of each of the known points and press the calculate button to obtain the result. If you want to know **how to find the equation of the line** and see solved exercises for each case, continue reading below.

Article sections

## Equation point-slope of the straight line

**The point-slope equation is one of the most commonly used equations.** in math problems and is of the type:

y - y

_{1}= m (x - x_{1})

With it, we can **calculate the equation of the line knowing the slope (m) and a point P** of coordinates (x_{1}, y_{1}).

For example, let's calculate the equation of the line if we know that it has slope m=3 and passes through the point P = (4,3). We simply substitute in the general equation of the line and we obtain:

y - 3 = 3 (x - 4)

Now we simplify:

y = 3x -12 + 3

y = 3x - 9

We have already calculated the equation of the line that meets the conditions of the problem.

## Equation of the line through two points

Yes **we are given two points and asked to calculate the line** passing through those coordinates, we have to use this formula:

In this case solving the problem is quite simple since we only have to substitute in the equation and simplify it as much as possible. To see how it is done, we will do an exercise in which we are asked to calculate the equation of the line that passes through the points (4, 5) and (2, 1):

Now we simply equalize and simplify and we are left with the equation in this form:

2 (x - 4) = y - 5

We simplify:

2x - 8 = y - 5

2x - y + 3 = 0

**We already have the general equation of the line passing through the two points** of the exercise statement. From here we could also calculate the slope as we have seen in the previous section:

m = - A / B = - (2 / -1) = 2

## Continuous equation of the line

We will use the continuous equation of the straight line when **give us a point P of coordinates (x _{1}, y_{1}) and its director vector** of coordinates (v

_{1}, v

_{2}).

For example, in the case of the graph above these lines, in which we have the **point (3, 3) with director vector (2, 1)**the equation of the line would be:

Simplifying we are left with:

x - 3 = 2 (y - 3)

x - 3 = 2y - 6

x - 2y +3 = 0

## General equation of the line

The general equation of the line **is of the type**:

Ax + By + C = 0

A, B and C being Real numbers and B ≠ 0.

From this equation also **we can draw**:

- The slope of the line (m = - A/B).
- The ordinate at the origin (- C/B).

With these data we already have enough information to represent the line on the XY plane.

## Parametric equations of the line

These equations are obtained from the vector equation and are of this type:

x = x

_{0}+ v_{1}ty = y

_{0}+ v_{2}t

Being:

- (x
_{0}, y_{0}) the coordinates of a point on the line - (v
_{1}, v_{2}) are the coordinates of a vector in the direction of the line

**How to know if a point belongs to a line**

To find out if a point belongs to a given line we simply have to **take the equation of that line and substitute in 'x' and 'y' the values of the point** they give us. If the equality is fulfilled, the point will belong to the line and if they are not fulfilled, then it does not.

For example, does the point (1, 3) with equation y = 2 +3x lie on the line? Let's see:

3 ≠ 2 + 3 → the equality is not satisfied so the point (1,3) is not on the line.

What about point (1, 5)?

5 = 2 + 3 → the equality is satisfied, therefore, the point (1, 5) is on the line.

## Formula for calculating the distance between two points on a straight line

The **distance between two points** of a line in the Cartesian plane can be calculated in a very simple way. To understand it better, let's see it with an example.

Imagine that you have two points in the plane whose coordinates are:

- P1 (X1, Y1)
- P2 (X2, Y2)

The **The distance separating the two points is obtained by applying the following formula** mathematics:

For example, we will **calculate the distance between two points with an example** practical in which:

- P1 (7, 5)
- P2 (4, 1)

Applying the above formula, we have that the **distance between these two points on the Cartesian plane** es:

As you can see,** to know the distance between two points **is very easy.