## General equation

We can establish the general equation of a line from the three-point alignment condition.

Given a straight **r**, being **THE**(x_{THE}, y_{THE}) and **B**(x_{B}, y_{B}) known and distinct points of **r** and **P**(x, y) a generic point, also of **r**being **THE**, **B** and **P** aligned, we can write:

Doing y_{THE} - y_{B} = a, x_{B} - x_{THE} = b and x_{THE}y_{B} - x_{B}y_{THE}= c, as a and b are not simultaneously null we have:

ax + by + c = 0 |

*(general equation of line r)*

This equation relates **x** and **y** to any point **P** generic straight line. So given the point **P**(m, n):

if m + bn + c = 0,

**P**is the point of the line;if m + bn + c 0,

**P**It is not the point of the line.

Follow the examples:

Let's consider the general equation of the line

**r**that goes through**THE**(1, 3) and**B**(2, 4).

Considering one point **P**(x, y) of the line, we have:

Let's check if the points

**P**(-3, -1) and**Q**(1, 2) belong to line r of the previous example. Overriding the coordinates of**P**at x - y + 2 = 0, we have:

-3 - (-1) + 2 = 0 -3 + 1 + 2 = 0

Since equality is true, so P r.

Overriding the coordinates of **Q** at x - y + 2 = 0, we get:

1 - 2 + 2 0

Since equality is not true, so Q r.

Next: Segmental Equation