Mobile Notice
It seems that you are on your mobile phone, which means that the screen's width is narrow for some equations. For the best viewing experience, you can view this website in landscape mode.

The Straight Line

Author | Engr. Nico O. Aspra, M.Eng., RMP, LPT

$$ $$

A straight line is one of the simplest and most fundamental geometric objects. On a plane, it represents a path that extends indefinitely in two opposite directions and has a constant direction throughout. Any straight line drawn on the Cartesian plane can be described using an equation that is satisfied by all points lying on the line.

General Form of Equation of a Line

One way to determine whether an equation represents a straight line is by examining its algebraic form. The equation shown in Equation \ref{eq:gen form line} is called the general form of the equation of a line, where $A$, $B$, and $C$ are constants. At least one of the coefficients $A$ or $B$ must be nonzero, since both cannot be zero at the same time.

$$\begin{align} Ax+By+C=0 \label{eq:gen form line} \end{align}$$


$\example{1}$ Express the equation of the line $5-2y=7x$ in the general form.

$\solution$

Rearrange the equation to match the general form,

\[\begin{align*} 5-2y &= 7x \\ 7x+2y-5 &= 0 \tagans \end{align*}\]

Standard Forms of a Line

There are several algebraic forms used to describe the equation of a straight line, each depending on the information given about the line. These standard forms include the point-slope form, two-point form, slope-intercept form, and intercept form.

Point-Slope Form

The point-slope form is used when a point on the line and the slope of the line are given. Since a straight line has a constant slope, knowing one point on the line together with its slope is sufficient to determine its equation. Consider Figure 1.

my alt text

Figure 1: Given a point $P_1(x_1,y_1)$ and the slope $m$, the equation of the line can be written in the point-slope form.

Let $P_1(x_1,y_1)$ be the given point on the line, and let $P(x,y)$ be any other point on the same line. The slope of the line is given by \(m = \frac{y - y_1}{x - x_1}.\)

Rearranging the equation gives

$$\begin{align} y - y_1 = m(x - x_1) \label{eq:pt-slope} \end{align}$$

The equation above is called the point-slope form of the equation of a line, where $m$ is the slope and $P_1(x_1,y_1)$ is a known point on the line.


$\example{2}$ Determine the equation of the line that passes through $(-1,3)$ and has a slope of $2$.

$\solution$

To determine the equation of the line given a point and a slope, use Equation \ref{eq:pt-slope},

\[\begin{align*} y-y_1 &= m(x-x_1) \\ y-3 &= 2[x-(-1)] \\ y-3 &= 2x+2 \\ 2x-y+5 &= 0 \tagans \end{align*}\]

Two-Point Form

The two-point form is used when two distinct points on a line are given. Consider Figure 2.

my alt text

Figure 2: Given two points $P_1(x_1,y_1)$ and $P_2(x_2,y_2)$, the equation of the line can be written in the two-point form.

Let $P_1(x_1,y_1)$ and $P_2(x_2,y_2)$ be the two given points on the line.
Starting from the point-slope form (Equation \ref{eq:pt-slope}),

\[\begin{align*} y - y_1 &= m(x - x_1) \end{align*}\]

the slope $m$ can be expressed using the two given points as

\[\begin{align*} m &= \frac{y_2 - y_1}{x_2 - x_1}. \end{align*}\]

Substituting this expression for the slope into the point-slope form gives

$$\begin{align} y - y_1 = \frac{y_2 - y_1}{x_2 - x_1}(x - x_1) \label{eq:2-pt} \end{align}$$

The resulting equation is called the two-point form of the equation of a line, where $P_1(x_1,y_1)$ and $P_2(x_2,y_2)$ are the given points on the line.


$\example{3}$ Determine the equation of the line that passes through $(-6,2)$ and $(3,9)$.

$\solution$

To determine the equation of the line given two points, use Equation \ref{eq:2-pt},

\[\begin{align*} y-y_1 &= \frac{y_2-y_1}{x_2-x_1}(x-x_1) \\ y-2 &= \frac{9-2}{3-(-6)}[x-(-6)] \\ y-2 &= \frac{7}{9}(x+6) \\ 9y-18 &= 7x+42 \\ 7x-9y+60 &= 0 \tagans \end{align*}\]

Intercept

An intercept is a point where the line intersects an axis. The point of intersection on the $x$-axis is called the $x$-intercept, and $y$-intercept on the $y$-axis. The coordinates of $x$ and $y$ intercepts are $(a,0)$ and $(0,b)$ respectively (Figure 3).

my alt text

Figure 3: The points where the line intersects the coordinate axes at $(a,0)$ and $(0,b)$ are called the $x$- and $y$-intercepts, respectively.

Slope-Intercept Form

The Slope-Intercept Form is used when the $y$-intercept of the line and its slope are given. It is similar to the Point-Slope Form, but instead of any point that lies on the line, this form requires that the given point is its $y$-intercept. Consider Figure 4,

my alt text

Figure 4: Given the slope $m$ and the $y$-intercept $b$, the equation of the line can be written in the slope-intercept form.

From the Point-Slope Form (Equation \ref{eq:pt-slope}),

\[\begin{align*} y-y_1 &= m(x-x_1) \\ y-b &= m(x-0) \end{align*}\]

Hence,

$$\begin{align} y=mx+b \label{eq:slope-int} \end{align}$$

The derived equation is called the Slope-Intercept Form of Equation of a Line. Where, $m$ is the slope and $b$ is the $y$-intercept.


$\example{4}$ Determine the equation of the line that has a $y$-intercept of $-4$ and a slope of $3/2$

$\solution$

To solve for the equation of the line with a given $y$-intercept and a slope, use Equation \ref{eq:slope-int}, \(\begin{align*} y &= mx+b \\ y &= \frac{3}{2}x+(-4) \\ 2(y+4) &= 3x \\ 2y+8 &= 3x \\ 3x-2y-8 &= 0 \tagans \end{align*}\)

Intercept Form

The Slope-Intercept Form is used when the $x$ and $y$ intercepts of the line are given. This form is also similar to the Two Point Form, but the two given points both lies on the $x$ and $y$ axis.

my alt text

Figure 5: Given the $x$-intercept $a$ and the $y$-intercept $b$, the equation of the line can be written in the intercept form.

From the Two Point Form (Equation \ref{eq:2-pt}),

\[\begin{align*} y-y_1 &= \frac{y_2-y_1}{x_2-x_1}(x-x_1) \\ y-b &= \frac{0-b}{a-0}(x-0) \\ y-b &= -\frac{b}{a} x \\ \frac{b}{a} x + y &= b \\ \frac{1}{b} \br{ \frac{b}{a} x+y } &= (\cancel{b}) \frac{1}{\cancel{b}} \end{align*}\]

Hence,

$$\begin{align} \frac{x}{a}+\frac{y}{b}=1 \label{eq:int} \end{align}$$

The derived equation is called the Slope-Intercept Form of Equation of a Line. Where, $a$ and $b$ are the $x$ and $y$ intercepts of the line.


$\example{5}$ Determine the equation of the line that has an $x$ and $y$ intercepts of $-6$ and 4 respectively.

$\solution$

To solve for the equation of the line with two given intercepts, use Equation \ref{eq:int},

\[\begin{align*} \frac{x}{a}+\frac{y}{b} &=1 \\ \frac{x}{-6}+\frac{y}{4} &=1 \\ 12\br{ \frac{x}{-6}+\frac{y}{4} } &= 12(1) \\ -2x+3y &= 12 \\ 2x-3y+12 &= 0 \tagans \end{align*}\]