Equation of a Line
The explicit form of the line equation is $$ y = mx + q $$ where m is the slope and q is the y-intercept, indicating where the line intersects the y-axis.
This is called the explicit form because the variable y is expressed as a function of the variable x.
$$ y = mx + q $$
Here, y is the dependent variable while x is the independent variable.
As the slope m changes, the inclination of the line changes.
As the y-intercept q changes, the line's intersection with the y-axis changes.
Thus, the explicit form of the line equation can represent any line in the plane except those parallel to or coinciding with the y-axis.
The case of lines parallel to or coinciding with the y-axis
For the y-axis, a different equation is used:
$$ x = 0 $$
For lines parallel to the y-axis, the equation x=k is used:
$$ x = k $$
Note. The y-axis cannot be represented with the explicit form y=mx+q because the slope (m) is undefined for a perfectly vertical line.
There are no values for the slope (m) and the y-intercept (q) that can be substituted into the equation y=mx+q to represent a vertical line. For this reason, any line parallel to the y-axis is given by the equation $$ x = k $$. By varying k, you get all lines parallel to the y-axis for any value of y. For k=0, you get the y-axis.
The Implicit Form of the Equation
The implicit form of the line equation is another way to represent lines in the plane: $$ ax + by + c = 0 $$ where a, b, and c are real numbers called coefficients. It is also known as the general form of the line equation.
In the implicit form, neither x nor y is expressed as a function of the other.
By varying the coefficients a, b, and c, the implicit form can represent any line in the Cartesian plane.
Note. The coefficients a and b in the implicit equation ax + by + c = 0 cannot both be zero.
The implicit form can also represent lines parallel to or coinciding with the y-axis.
This is why it is also called the general form of the line equation.
Note. To represent a vertical line, set b=0 and solve for x:
$$ ax + by + c = 0 $$
$$ ax + 0 \cdot y + c = 0 $$
$$ ax + c = 0 $$
$$ x = - \frac{c}{a} $$
Proof
Consider two points P1(x1, y1) and P2(x2, y2) in the Cartesian plane through which a line r passes, and a point P(x, y) between P1 and P2 on the line.
Project the points onto the x and y axes using two sets of parallel lines.
The set of vertical lines, colored in blue, parallel to the y-axis, intersect two transversals: the line r and the x-axis.
Therefore, according to the Thales' theorem, the corresponding segments on the transversals are directly proportional to each other.
$$ \frac{ \overline{P_1P} }{ \overline{AB} } = \frac{ \overline{P_1P_2} }{ \overline{AC} } $$
$$ \frac{ \overline{P_1P} }{ \overline{P_1P_2} } = \frac{ \overline{AB} }{ \overline{AC} } $$
Similarly, the set of horizontal lines, colored in red, parallel to the x-axis, intersect two transversals: the line r and the y-axis.
Again, according to Thales' theorem, the corresponding segments on the transversals are directly proportional to each other.
$$ \frac{ \overline{P_1P} }{ \overline{DE} } = \frac{ \overline{P_1P_2} }{ \overline{DF} } $$
$$ \frac{ \overline{P_1P} }{ \overline{P_1P_2} } = \frac{ \overline{DE} }{ \overline{DF} } $$
From these two proportions, I deduce the equality between the ratios AB/AC=DE/EF
$$ \frac{ \overline{P_1P} }{ \overline{P_1P_2} } = \frac{ \overline{AB} }{ \overline{AC} } = \frac{ \overline{DE} }{ \overline{DF} } $$
That is
$$ \frac{ \overline{AB} }{ \overline{AC} } = \frac{ \overline{DE} }{ \overline{DF} } $$
Knowing that AB = x - x1 and AC = x2 - x1
$$ \frac{ x - x_1 }{ x_2 - x_1 } = \frac{ \overline{DE} }{ \overline{EF} } $$
Also, knowing that DE = y - y1 and DF = y2 - y1
$$ \frac{ x - x_1 }{ x_2 - x_1 } = \frac{ y - y_1 }{ y_2 - y_1 } $$
This last relation is called the collinearity condition of three points on a line.
With some algebraic manipulation, I modify the previous relation.
$$ ( x - x_1 ) \cdot ( y_2 - y_1 ) = ( y - y_1 ) \cdot ( x_2 - x_1 ) $$
$$ x \cdot ( y_2 - y_1 ) - x_1 \cdot ( y_2 - y_1 ) = y \cdot ( x_2 - x_1 ) - y_1 \cdot ( x_2 - x_1 ) $$
$$ x \cdot ( y_2 - y_1 ) - x_1 \cdot ( y_2 - y_1 ) - y \cdot ( x_2 - x_1 ) + y_1 \cdot ( x_2 - x_1 ) = 0 $$
$$ \require{cancel} x \cdot ( y_2 - y_1 ) - y \cdot ( x_2 - x_1 ) - x_1 y_2 + \cancel{ x_1 y_1 } + x_2 y_1 - \cancel{ x_1 y_1 } = 0 $$
$$ x \cdot ( y_2 - y_1 ) - y \cdot ( x_2 - x_1 ) - x_1 y_2 + x_2 y_1 = 0 $$
I transform -y( x2 - x1 ) into the equivalent form +y( x1 - x2 )
$$ x \cdot ( y_2 - y_1 ) + y \cdot ( x_1 - x_2 ) - x_1 y_2 + x_2 y_1 = 0 $$
At this point, I set a = ( y2 - y1 ), b = ( x1 - x2 ), c = - x1 y2 + x2 y1
$$ x \cdot a + y \cdot b + c = 0 $$
In this way, I obtain the implicit form of the line equation.
$$ ax + by + c = 0 $$
How to Convert from Implicit to Explicit Form
To convert the implicit form $ ax + by + c = 0 $ to the explicit form $ y = mx + q $, simply solve for y.
$$ y = - \frac{ax}{b} - \frac{c}{b} $$
$$ y = - \frac{a}{b} \cdot x - \frac{c}{b} $$
Where -a/b is the slope and -c/b is the y-intercept.
$$ m = - \frac{a}{b} $$
$$ q = - \frac{c}{b} $$
This is only possible if the coefficient b is not zero.
Note. Converting from implicit to explicit form is not possible if b=0, because it involves division by zero.
Example
Consider the implicit form of a line equation where a=3, b=6, and c=9
$$ 3y + 6x + 9 = 0 $$
To convert it to the explicit form, solve for y in terms of the other variables.
$$ 3y = - 6x - 9 $$
Then apply the invariant property by dividing both sides of the equation by 3
$$ \frac{3y}{3} = - \frac{6}{3}x - \frac{9}{3} $$
$$ y = - 2x - 3 $$
This final form is the line equation in explicit form.
$$ y = mx + q $$
Where the slope is m=-2 and the y-intercept is q=-3
What is the difference between the implicit and explicit forms? Both forms represent the same line in the plane. The difference lies in the algebraic representation.
The Polar Coordinates of a Line
- The equation of a line can also be written using polar coordinates.
- If the line passes through the origin, it is enough to know the angle α that determines the slope $$ m = \tan \alpha \ \ \ \ with \ \alpha \ne \frac{\pi}{2} + k \pi $$
- If the line does not pass through the origin, it is necessary to know the distance d between the line and the pole (origin) and the angle β of the segment d relative to the positive polar axis. $$ d = r \cdot \cos (\theta) $$
Where θ is the angle of the polar coordinates of any other point P on the line.
Notes
Here are some observations and remarks on the linear equation (the equation of a line).
- The equation of a line identifies all points on that specific line
This statement can be proven by contradiction. Assume there is a point P'(x;y') outside the line r that satisfies the linear equation ax+by+c=0 for line r. By this assumption, point P' has the same x-coordinate as point P but a different y-coordinate.
According to this assumption, both of the following equations are satisfied: $$ ax+by+c=0 $$ $$ ax+by'+c=0 $$ To solve this system, I use the reduction method and subtract one equation from the other: $$ \begin{matrix} ax & +by & + c & =0 & - \\ ax & +by' & + c & = 0 & \\ \hline 0 & +b(y-y') & 0 & = 0 \end{matrix} $$ This results in the equation $$ b(y-y')=0 $$ Since the coefficient b is not zero, the only way to satisfy this equation is if y=y'. In other words, the external point P' must have the same y-coordinate as the internal point P. However, this contradicts our initial assumption that P' is outside the line, while P is on the line. Therefore, it is false that points outside a line r satisfy the equation ax+by+c=0. Consequently, only the points on the line r satisfy the linear equation ax+by+c=0. - Every linear equation corresponds to a line, and vice versa
Every linear equation in two variables x and y corresponds to a line on the Cartesian plane, and every line corresponds to such an equation. $$ r \Leftrightarrow ax+by+c=0 $$Proof. Knowing that the coefficients "a" and "b" in the equation cannot both be zero, let's examine two extreme cases: a=0 and b≠0, and a≠0 and b=0. In the first case, we get an pencil of parallel lines to the x-axis, while in the second case, we get a bundle of lines parallel to the y-axis.
In the intermediate case where both coefficients are non-zero, i.e., a≠0 and b≠0, the linear equation remains in the form $ ax+by+c=0 $. I need to prove that this equation corresponds to a specific line on the Cartesian plane. Consider three points on the line given by the equation (x1;y1), (x2;y2), (x3;y3), and set them up in a system. $$ \begin{cases} ax_1+by_1+c=0 \\ ax_2+by_2+c=0 \\ ax_3+by_3+c=0 \end{cases} $$ Using the reduction method, I subtract the third equation from the first and second equations. $$ \begin{cases} a(x_1-x_3)+b(y_1-y_3)=0 \\ a(x_2-x_3)+b(y_2-y_3)=0 \end{cases} $$ $$ \begin{cases} a(x_1-x_3)=-b(y_1-y_3) \\ a(x_2-x_3)=-b(y_2-y_3) \end{cases} $$ $$ \begin{cases} \frac{x_1-x_3}{y_1-y_3}= - \frac{b}{a} \\ \frac{x_2-x_3}{y_2-y_3}= - \frac{b}{a} \end{cases} $$ Comparing the two equations, we see they are both equal to -b/a. Therefore, I can write the following equality: $$ \frac{x_1-x_3}{y_1-y_3}= \frac{x_2-x_3}{y_2-y_3} $$ which is equivalent to the alignment condition of three points on a line $$ \frac{x_1-x_3}{x_2-x_3}= \frac{y_1-y_3}{y_2-y_3} $$ This proves that the linear equation $ ax+by+c=0 $ corresponds to one and only one line on the plane, establishing a one-to-one correspondence between the solutions of the linear equation and the points on a line on the plane.
And so on.