✖

General equation of a line

We get the general equation of a line from the parametric equations of the line by eliminating the parameter t.

Motivation

Do you remember linear functions? Their graph is a line. The basic form of a linear function is y = mx + b. Let’s look at the line p that passes through the points A(0, 3), B(2, 7):

A line through the points A and B

Let’s find the linear function whose graph is exactly this line p. It has the form y = mx + b. The fact that the line passes through the point A(0, 3) tells us that at x1 = 0 the function has the value y1 = 3. So the equation m · 0 + b = 3 must hold. Because the line passes through the point B(2, 7), the function has the value y2 = 7 at x2 = 2, so the equation m · 2 + b = 7 must hold as well. We are looking for the coefficients m, b. This gives us a pair of simultaneous equations:

m⋅0+b=3m⋅2+b=7

From the first equation m · 0 + b = 3 we can easily get the coefficient b, which is b = 3. We substitute this into the second equation, that is, into m · 2 + b = 7 we put three for b:

m⋅2+b=7m⋅2+3=7m⋅2=4m=2

And we have both coefficients: m = 2, b = 3. The function that describes the line has the form y = 2x + 3. If we substitute x = 1, we get y = 2 + 3 = 5, which agrees with the graph of the line. We can also rewrite y = 2x + 3 so that the right-hand side is zero, that is, we add −(2x + 3) to both sides. This gives us the equation:

y−2x−3=0

This equation is called the general equation of a line.

Definition of the general equation of a line

The method above is a little complicated, and it does not work when the line is parallel to the y-axis, that is, when it is vertical, because such a line does not describe any function. So we introduce the general equation of a line in another way. We say that every linear equation of the form

ax+by+c=0,

where a,b,c ∈ ℝ and at least one of the numbers a,b is non-zero, is the equation of a line in the plane. Every line in the plane can be written in this form. We call this equation the general equation of a line (the general form). We can easily find it from the parametric form of the line. If a line is described by the parametric equations

x=a1+t⋅u1y=a2+t⋅u2,

we find the general equation by eliminating the parameter t from them. An example: let’s stay with the line through the points A(0, 3), B(2, 7). We find the direction vector u→ from the directed line segment AB→.

u→=(u1,u2)=B−A=(2,7)−(0,3)=(2,4)

We can look at the line p with its direction vector u→ again:

The line p with the direction vector \vec{\mathbf{u}}

We write the parametric equations using the point A and the vector u→:

x=0+t⋅2y=3+t⋅4

To get the general equation, we have to add these two equations in such a way that the parameter t cancels. First we multiply the first equation by −2 and leave the second unchanged:

−2x=0−t⋅4y=3+t⋅4

Now we add the two equations, which gives us a single equation:

y−2x=3+t⋅4−t⋅4y−2x=3y−2x−3=0

This is the general equation of the line p. We can see that we got exactly the same equation as with the previous method.

What the general equation of a line is for

The general equation tells us all the points that make up the line. If we substitute real numbers for the unknowns x,y in an equation of the form ax + by + c = 0 so that the equation holds, then (x, y) is a point on the line. Let’s return to the line described by the general equation y − 2x − 3 = 0. If we substitute x = 1, y = 5, we get the equation:

5−2⋅1−3=05−2−3=00=0

This means that the point (1, 5) lies on the line. If we try x = 2, y = 3, we get the equation:

3−2⋅2−3=?03−4−3=?0−4≠0

The equation does not hold, so the point (2, 3) does not lie on the line p. We can check this in the picture:

The points we tested, highlighted in blue

A vertical line

We have already mentioned that we could not get the general equation of a vertical line p using the method from the first section, because a vertical line does not describe any function. Nevertheless, such a line also has a general equation, which we get using the method from the previous section.

We will show it on the line that passes through the points A(4, 2), B(4, 8). The direction vector u→ is:

u→=(u1,u2)=B−A=(4,8)−(4,2)=(0,6)

The picture:

The line p and its direction vector

The parametric equations using the point A and the direction vector u→ would look like this:

x=4+t⋅0y=2+t⋅6

Now we should eliminate the parameter t. However, the first equation has already saved us the work: there is no parameter t in it (or rather, it is always multiplied by zero), so we can use the whole equation as the general equation of the line p. The line p therefore has the general equation

x−4=0

So the coefficients a,b,c in the equation ax + by + c = 0 are a = 1, b = 0, c = −4.

A horizontal line

Let’s look at one more example, a horizontal line that passes through the points A(2, 1), B(5, 1). The direction vector u→ is equal to:

u→=(u1,u2)=B−A=(5,1)−(2,1)=(3,0)

The picture:

The line p and its direction vector \vec{\mathbf{u}}

The parametric equations of the line using the point A would look like this:

x=2+t⋅3y=1+t⋅0

Again we can see that we do not need to eliminate the parameter t, because it is multiplied by zero in the second equation. So we can use the second equation directly as the general equation of the line p:

y−1=0

Chapters: Parametric equations of a line, General equation of a line, Normal vector of a line, Slope-intercept form of a line, Equation of a line in 3D