I always joined the MMC (Metrobank Math Challenge) when I was in high school. MMC always requires that equations of lines be expressed in general ($ax+by+c=0$) form. One way to achieve this is to use classical methods (i.e. point-slope, two-slope or slope-intercept formulas) to get the equations of the lines, and then rewrite them in general form. This was sometimes slow for me, especially in timed questions, and sometimes caused me carelessness in solving. So, when I first learned of this technique in third year high school, I always used this ever since.

In this blog, I will discuss the technique will easily allow us to write the equations of lines **directly** to its general form, without going through the classical methods. All we need is its slope.

#### Given a slope and a point

Constructing an equation of a line from the slope is pretty straightforward. The numerator $A$ of the slope becomes the coefficient of $x$, and the denominator $B$ of the slope becomes the coefficient of $y$. If the slope $A/B$ is positive, the sign between $Ax$ and $By$ is negative (i.e. $Ax-By$). If the slope $A/B$ is negative, the sign between $Ax$ and $By$ is positive (i.e. $Ax+By$). Finally, substitute $(x_1,y_1)$ to $Ax-By$ or $Ax+By$ to get the constant term of the equation of the line.

Mathematically, this method is stated as follows:

Given a line in the *xy*-plane with slope $\displaystyle \frac{A}{B}$ and passing through the point $(x_1, y_1)$, the equation of the line is $$Ax-By=Ax_1-By_1$$

## Derivation

Using the point-slope formula, we have $$ y-y_1=m(x-x_1) \Longrightarrow y-y_1 = \frac{A}{B}(x-x_1)\Longrightarrow By-By_1=Ax-Ax_1$$giving $\color{red}{\boxed{Ax-By=Ax_1-By_1}}$

This method has the advantage that the equation of the line you will produce is already in standard ($ax+by=c$) or general form. Many contests such as MMC require that all equations of lines be expressed in general form. Also, some questions in engineering board exams have all equations of lines in the choices expressed in standard or general form. In both of these cases, this method is faster than using classical methods and then rewriting to standard or general form. You can actually do this method mentally with practice!

If the question requires that the line be expressed in slope-intercept form ($y=mx+b$), or if the choices are expressed in slope-intercept form, then the slope-intercept form and point-slope forms are definitely faster than this method. So, I suggest learning **both** this method and the classical methods to be able to apply them in the appropriate cases.

I hope the short examples below will give you an idea as to how to use this method. I color-highlighted the numbers for us to see where the coefficients go and what substitutions are made.

We can reverse engineer the above method to do the reverse case, i.e. given the equation of the line in general or standard form, find its slope. No need to express them in slope-intercept form!

The slope of the line $ax+by+c=0$ is given by $\displaystyle m=-\frac{a}{b}$

As with our above method, the numerator of the slope is the coefficient of $x$, while the denominator is the coefficient of $y$. The examples below will demonstrate how to apply this formula.

#### Parallel and perpendicular lines

Recall that if two lines in the $xy$-plane are parallel, then they have the same slope. It follows from the technique that we introduced that these two lines will have the same "form" in the general form, i.e. if one line has the form $ax+by$, then all lines parallel to it will also have the form $ax+by$. They will only differ in the constant term, which can be obtained by substituting the given point.

The equation of the line that is parallel to the line $Ax+By=C$ and passing through the point $(x_1,y_1)$ is given by $$Ax+By=Ax_1+By_1$$

Also, recall that if two lines in the $xy$-plane are perpendicular, then the slope of the perpendicular line is the negative reciprocal of the original line. For example, if the original line has slope $a/b$, then the perpendicular line has slope $-b/a$. Using the technique, the original line will have the form $\color{red}ax-\color{blue}by$, whereas the perpendicular line will have the form $\color{red}bx+\color{blue}ay$.

Take note of the difference between $\color{red}ax-\color{blue}by$ and $\color{red}bx+\color{blue}ay$. Notice that the coefficients of $x$ and $y$ switched. Also, notice that the sign between them changed. This gives us the technique for finding equations of perpendicular lines.

The equation of the line that is perpendicular to the line $Ax+By=C$ and passing through the point $(x_1,y_1)$ is given by $$Bx-Ay=Bx_1-Ay_1$$

Now, for some examples.

#### Other cases

The above method can also be used to solve other cases in the equations of lines. Always remember that for this method to work, you always need a slope and a point.

**given a slope and a $y$-intercept:** The method directly applies. After all, $y$-intercept is also a point.
**given two points:** Find the slope from two points. After that, the method directly applies, using either of the two points.
**given two intercepts:** The case of given two points applies. After all, intercepts are just points. Although the two-intercept formula $x/a+y/b=1$ works faster than this technique.