## Write the Equation of a Linear Function Part I

### Learning Outcomes

• Define the equation of a line given the slope and a point
• Define the equation of a line given two points
• Write a linear function in standard form
• Write the equation for linear functions whose graphs are horizontal and vertical lines

## Point-Slope Form

We have seen that we can define the slope of a line given two points on the line and use that information along with the y-intercept to graph the line.  If you do not know the y-intercept or the equation for the line, you can use two points to define the equation of the line using point-slope form.

$y-{y}_{1}=m\left(x-{x}_{1}\right)$

This is an important formula, as it will be used in other algebra courses and often in calculus to find the equation of a tangent line. We need only one point and the slope of the line to use the formula. After substituting the slope and the coordinates of one point into the formula, we simplify it and write it in slope-intercept form.

### Point-Slope Form

Given a point $\left({x}_{1},{y}_{1}\right)$ and slope m, point-slope form will give the following equation of a line:

$y-{y}_{1}=m\left(x-{x}_{1}\right)$

In our first example, we will start with the slope. Then, we will show how to find the equation of a line when the slope is not given.

### Example

Write the equation of the line with slope $m=-3$ that passes through the point $\left(4,8\right)$. Write the final equation in slope-intercept form.

In our next example, we will start with two points and find the equation of the line that passes through them.

### Example

Find the equation of the line that passes through the points $\left(3,4\right)$ and $\left(0,-3\right)$. Write the final equation in slope-intercept form.

The following video shows how to write the equation for a line given its slope and a point on the line.

## Standard Form of a Line

Another way that we can represent the equation of a line is in standard form. Standard form is given as

$Ax+By=C$

where $A$, $B$, and $C$ are integers. The and terms are on one side of the equal sign, and the constant term is on the other side.

### Example

Find the equation of the line with $m=-6$ that passes through the point $\left(\dfrac{1}{4},-2\right)$. Write the equation in standard form.

## Vertical and Horizontal Lines

The equations of vertical and horizontal lines do not require any of the preceding formulas although we can use the formulas to prove that the equations are correct. The equation of a vertical line is given as

$x=c$

where c is a constant. The slope of a vertical line is undefined, and regardless of the y-value of any point on the line, the x-coordinate of the point will be c.

Suppose that we want to find the equation of a line containing the following points: $\left(-3,-5\right),\left(-3,1\right),\left(-3,3\right)$, and $\left(-3,5\right)$. First, we will find the slope.

$m=\dfrac{5 - 3}{-3-\left(-3\right)}=\dfrac{2}{0}$

Zero in the denominator means that the slope is undefined which makes using point-slope form impossible. However, we can plot the points. Notice that all of the x-coordinates are the same and we find a vertical line through $x=-3$.

The equation of a horizontal line is given as

$y=c$

where c is a constant. The slope of a horizontal line is zero, and for any x-value of a point on the line, the corresponding y-coordinate will be c.

Suppose we want to find the equation of a line that contains the following set of points: $\left(-2,-2\right),\left(0,-2\right),\left(3,-2\right)$, and $\left(5,-2\right)$. We can use point-slope form. First, we find the slope using any two points on the line.

$\begin{array}{l}m & =\dfrac{-2-\left(-2\right)}{0-\left(-2\right)}\hfill \\ & =\dfrac{0}{2}\hfill \\ & =0\hfill \end{array}$

Use any point for $\left({x}_{1},{y}_{1}\right)$ in point-slope form.

$\begin{array}{l}y-\left(-2\right)=0\left(x - 3\right)\hfill \\ y+2=0\hfill \\ y=-2\hfill \end{array}$

The graph is a horizontal line through $y=-2$. Notice that all of the y-coordinates are the same.

The line $x=−3$ is a vertical line. The line $y=−2$ is a horizontal line.

### Example

Find the equation of the line passing through the given points: $\left(1,-3\right)$ and $\left(1,4\right)$.

Our last video shows another example of writing the equation of a line given two points on the line.

## Summary

• The slope of a line indicates the direction which it slants as well as its steepness. Slope is defined algebraically as:$m=\dfrac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$
• Given the slope and one point on a line, we can find the equation of the line using point-slope form. $y-{y}_{1}=m\left(x-{x}_{1}\right)$
• Standard form of a line is given as $Ax+By=C$
• The equation of a vertical line is given as $x=c$
• The equation of a horizontal line is given as $y=c$