Forming an Equation of a Line

In this section, we are going to learn three different forms of linear functions: point-slope form, slope-intercept form, and general form.

Point-Slope Form

In the previous section, we learned that the slope of a line is calculated as follows:

m = y 2 y 1 x 2 x 1

Now, suppose you found the slope m of a line. Remember from the last section that any two distinct points on a line can be used to compute the slope using the formula above. Let P 1 ( x 1 , y 1 ) be a distinct point and ( x , y ) be an arbitrary point on the line. The slope is calculated as follows:

m = y y 1 x x 1

We can rewrite this as shown below:

y y 1 = m ( x x 1 )

This equation is called the point-slope form or the point-slope equation. If you are given two distinct points, you can first find the slope of the line and then use one of the distinct points to find the equation of the line by plugging it into the point-slope equation. Of course, you can also use this form if the slope and a point on the line are given.

Consider a line that has a slope of 2 and passes through the point (3, 4). We can find the equation of the line by plugging the known information into point-slope form:

y 4 = 2 ( x 3 )

The graph of this equation is shown below.

Figure 1.3: Line and Points Passed Through

As we can see, the line passes through the points (-3, 8), (-2, -6), (-1, -4), (0, -2), (1, 0), (2, 2), (3, 4), (4, 6), (5, 8), and more. We can use any of these points to find the equation of the line, and all of them will produce the same equation.

Also, notice that the line crosses the y-axis at the point (0, -2) and crosses the x-axis at the point (1, 0). The point where a line crosses the y-axis is called the y-intercept, and the point where a line crosses the x-axis is called the x-intercept.

We can find the x-intercept of a line by plugging x = 0 into the equation of the line:

y 4 = 2 ( 0 3 ) y = 2

We can find the y-intercept by plugging y = 0 into the equation of a line:

0 4 = 2 ( x 3 ) x = 1

As stated earlier, the x-intercept of this line is (0, -2), and the y-intercept is (1, 0).

Figure 1.4: Intercepts

Examples

Here are some examples to practice using the point-slope equation.

Example 1

Suppose you have two points, (3, 2) and (5, 0). What is the equation of the line that goes through these points?

First, we need to find the slope of the line, which is calculated as follows:

m = 0 2 5 3 = 2 2 = 1

Therefore, using the point-slope form with the point (3, 2), the equation of the line is as follows:

( y 2 ) = 1 ( x 3 )

Note that it is also correct to use the other point, (5, 0), as well:

( y 0 ) = 1 ( x 5 )

Example 2

Imagine you are a production manager at a manufacturing company, and you are trying to create an equation to calculate the total cost of production. Suppose the variable cost is $5 per unit produced. Last month, the company produced 300 units and incurred the total production cost of $1,900. Assume that the relationship between the variable cost and the production cost is linear. Write an equation that can be used to calculate the total cost of production.

First, let’s define the variables given in the problem. The $5 per unit cost is the rate of change per unit produced, so this is the slope of the line. Last month, the production was x 1 = 300 , and the total cost was y 1 = 1,900. The resulting equation is as follows:

( y 1 , 900 ) = 5 ( x 400 )

Example 3

Suppose there is a line that goes through the two points (-1, -5) and (4, 0). You are looking for two other points (a, -5) and (5, b) that are also points on the same line. Find the values of a and b.

To find the values of a and b, we first need to find the equation that goes through the two points (-1, -5) and (4, 0). Given these two points, we can find the slope m of the line:

m = 1 4 5 0 = 5 5 = 1

Now, plug one of the points and the slope we calculated into the point-slope formula:

y 0 = 1 ( x 4 ) , which is  y = x 4

Then we can plug the points (a, -5) and (5, b) separately into the above equation to find the values of a and b. The value of a is found as follows:

5 = a 4 a = 1

The value of b is found as follows:

b = 5 4 b = 1

Slope-Intercept Form

Consider the nonvertical line whose slope is m and y-intercept is (0, b). We can form the equation of this line in slope-intercept form:

y = m x + b

This type of equation has many applications in different fields. For example, let’s assume that you are calculating the total cost of production. The cost is the composition of m, the variable cost per unit produced, and b, the fixed cost of production. If the company produces x units, then it incurs the total cost of y for production.

If you can find the equation of a line in any form, you can convert it to slope-intercept form. In the first example from the previous section, we found the equation of a line that passes through points (3, 2) and (5, 0), which is

y 2 = 1 ( x 3 )

We can rewrite the above equation by keeping y on the left-hand side of the equation and the rest on the right-hand side:

y = x + 5

This equation tells us that the slope of the line is -1, and the y-intercept is (0, 5).

While it is easy to identify the slope and y-intercept of a line, how can we find the x-intercept? Since we know that the value of y is 0 at the x-intercept, assuming that the slope is not 0,

0 = m x + b m x = b x = b m

Therefore, in general form, the x-intercept is ( b m , 0) where m is the slope and b is the y-coordinate of the y-intercept.

Figure 1.5: Intercepts with Slope-Intercept Form

What if the slope of the line is 0? If the slope is 0, then the equation of the line is y = b that goes through the y-intercept (0, b). If the line is vertical, then the equation of the line is x = a that goes through the x-intercept (a, 0).

Figure 1.6: Horizontal and Vertical Lines

Examples

Let’s run a few examples to become more familiar with slope-intercept form.

Example 1

Suppose that a line with the slope of -4 crosses the y-intercept (0, 10). Find the equation of this line.

Since the slope m is -4, and the y-coordinate of the y-intercept b is 10, the equation of the line using the slope-intercept formula is

y = 4 x + 10

Example 2

Suppose a line passes through the two points (-4, 5) and (-1, -1). Find the equation of this line in slope-intercept form, the x-intercept, and the y-intercept.

In order to find the equation given two points on the line, we first need to find the slope m:

m = 4 ( 1 ) 5 ( 1 ) = 3 6 = 1 2

Using point-slope form, we can express the equation as

y 5 = 1 2 ( x ( 4 ) ) y = 1 2 x 2 + 5 y = 1 2 x + 3

Further, the x-coordinate of the x-intercept is

a = 3 1 2 = 6

Therefore, we know that the x-intercept is (6, 0) and the y-intercept is (0, 3).

Example 3

Suppose that a company is producing cell phones. The material cost of each cell phone is $30, and the company incurs a cost of $200,000 each year to keep up the production facilities no matter how many cell phones are produced. If the company is planning to produce x number of cell phones, and the total annual costs are y, find the cost function of the company’s production in slope-intercept form.

Based on the scenario, we know that the rate of change per unit of cell phone production is $30. Even if the company does not produce any phones, it has to pay $200,000 a year (at x = 0 production). Therefore, the equation to find the total production cost is

y = $ 30 x + $ 200 , 000

General Form

The point-slope form and the slope-intercept form are special cases of a more general linear equation. If A, B, and C are real numbers, the graph of the equation

A x + B y = C

is a straight line, provided both A and B are not zero. An equation of this form is called a linear equation in two variables. The following equations are all linear equations in the general form:

3 x + 5 y = 15

x = 4

y = 8

The slope-intercept equation and the point-slope equation are also called linear equations, and we can rewrite them in the general form.

For example, suppose we have the following point-slope equation:

y 3 = 3 ( x + 2 )

We can rewrite this as a general linear equation:

y 3 = 3 x + 6 y 3 x = 6 + 3 3 x + y = 9

This is equivalent to the following slope-intercept equation:

y = 3 x + 9

Examples

Here are a couple of examples to sum up all the forms of a linear equation.

Example 1

Suppose there is a line that passes through the two points (1, 2) and (-3, 6). Given this information, find the x-intercept, the y-intercept, and the general form of the linear equation.

Since two points are given, we will first find the slope of the line.

m = 2 6 1 ( 3 ) = 4 4 = 1

Using the point-slope formula, we can write the linear equation as follows:

y 2 = 1 ( x 1 )

We can either set x = 0 to find the x-intercept and y = 0 to find the y-intercept, or rewrite the equation in slope-intercept form. The slope-intercept equation is found as follows:

y 2 = 1 ( x 1 ) y 2 = x + 1 y = x + 1 + 2 y = x + 3

So the x-coordinate of the x-intercept, a, is:

a = 3 1 = 3

The x-intercept is (3, 0), and the y-intercept is (0, 3). Finally, we can rewrite the equation in the general form:

x + y = 3

Example 2

Suppose the slope of a line that passes through the point (-4, 3) is m = 2 . Find the x-intercept, the y-intercept, and the general form of the linear equation.

Since a point and the slope are given, we can find the point-slope form of the linear equation:

y 3 = 2 ( x ( 4 ) ) y 3 = 2 ( x + 4 )

When x = 0 , y = 11 . When y = 0 , x = 11 2 . So the x-intercept is ( 11 2 , 0), and y-intercept is (0, 11). Now we can reorganize the above equation into the general form.

y 3 = 2 ( x + 4 ) y 3 = 2 x + 8 2 x + y = 11

Want to try our built-in assessments?


Use the Request Full Access button to gain access to this assessment.