Linear Functions


We recognize a linear function by looking for the highest power to be 1, and no variables in the denominator. For example, f(x) = 3x + 4 is a linear function.

The graph of a linear function is a line. We may graph a line if we know either two points on it or a point and the slope of the line. Let us begin this lesson by learning
 

How to graph a line.


 

So, given any line which is not vertical, we should be able to define a function for it. Remember that to define a line, we need either two points, or a point and the slope. Similarly, in order to define a linear function, we need either two points, or a point and the slope.

In order to come up with a linear function, we will need the following 3 formulas for lines.

The Slope Formula

The Point-Slope Equation of a Line

We use the following equation when we are given a point and the slope:

Note, in the above, we plug in for x1 and y1, not x and y.

The Slope-Intercept Equation of a Line

We want to put all of our equations in this form, so that y is a function of x. Recall that we can interchange f(x) and y. We also use this equation when we are given the y-intercept, b, and the slope, m, of a line.
 

y = mx + b


 


Let us try a few examples:

Example 1) Find the function defined by the line that goes through the points (-3, 2) and (4, 16)

We begin by finding the slope between the two points. It does not matter which point you let be (x1,y1) and which one you let be (x2 , y2), as long as you are consistent when you plug into the formulas. Let us let (x1,y1) = (-3, 2) and (x2 , y2) = (4, 16), and plug into the formula for slope.

Now, we will use m= 2 and the point (-3, 2) and plug into the point-slope equation

y - y1 = m(x - x1)

y - 2 = 2(x - -3)

We want to put all our lines in slope-intercept form, which means that we must solve for y.

y - 2 = 2x + 6

y = 2x + 8

Now we have y written as a function of x and we can replace y with f(x).

f(x) = 2x + 8

Example 2) Find the function defined by the line with x-intercept 3 and y-intercept -5

Remember that an intercept is a point. So we may find the slope using the x-intercept, which is the point (3,0), and the y-intercept which is the point (0,-5).

Since we now have the slope and the y-intercept, we may plug directly into the slope-intercept equation of a line. m = 5/3, and b = -5

Example 3) Find the function defined by the line through the two points (-7, 4) and (3, 4)

Again we begin by finding the slope. Let us let (x1,y1) = (-7, 4) and (x2 , y2) = (3, 4), and plug into the formula for slope.

So, m=0. Now plug into the point-slope equation of a line.

y - y1 = m(x - x1)

y - 4 = 0(x - -7)

y - 4 = 0

y = 4

This is the equation of a horizontal line. Every horizontal line has slope 0.

Example 4) The boiling point of water is 100o Celcius or 212o Fahrenheit. The freezing point of water is 0o Celcius or 32o Fahrenheit. Find a formula for converting degrees of celcius to degrees of Fahrenheit.

We start by writing our temperatures in point format and since we want our function to convert degrees of Celcius to Fahrenhit, degrees of Celcius will be our x's and degrees of Fahrenheit will be our y's.
We have the following two points: (100,212) and (0,32)

And we know that the y-intercept is 32, so the equation is:
.


Parallel Lines

Parallel lines have the same slope
 


 

Consider the following equation of a line: y = -2/3 x + 7. The line has slope -2/3, so any line parallel to it also has slope -2/3. We can use this fact to find the equations of line which are parallel.

Example 5) Find the equation of the line through (-2, 11) and parallel to the line 3x - 2y = 8.

We have a point but we need a slope. If we put the equation of the given line in slope-intercept form, we can find its slope, and since we want the equation of a line parallel, it will have the same slope.

So now we can see the slope is 3/2. Now we plug into the point-slope equation using m= 3/2 and the point (-2,11) and solve for y.


Perpendicular Lines

Perpendicular lines meet at a right angle. Their slopes are negative reciprocals of one another.
 


 

We can use the relationship of the slopes of perpendicular lines, to find the equations of perpendicular lines. Given the line y = 5x - 3, its slope is 5, so every line perpendicular to it has slope -1/5.

Example 6) Find the equation of a line through the point (1, -5) and perpendicular to the line -4x + 2y = -7.

First we put the line in slope-intercept form.

The above line has slope, m = 2. So a line perpendicular has slope m = -1/2. Now we plug into the point-slope equation using m = -1/2 and the point (1,-5)


Now you try a few:

Find the linear function associated defined by each of the following lines.

1. going through points (-3,2) and (9, 26)

Solution

2. going through (5, -6) and with slope 2

Solution

3. y-intercept 4, and slope 1/3

Solution

4. A horizontal line through the point (-5, 3)

Solution

5. A line parallel to y = -3x + 2 and through the point (-8, 13)

Solution

6. A line perpendicular to y = -3x + 2 and through the point (-8, 13)

Solution

7. A store manager figures that she can sell 135 items at $50 each. If the store has a sale, for each $2 decrease in the price they can sell an additional 5 items. Find an equation for the number of itmes sold based on the sale price.

Solution


1. passing through points (-3,2) and (9, 26)

y - y1 = m(x - x1)

y - 2 = 2(x - -3)

y - 2 = 2x + 6

y = 2x + 8

or f(x) = 2x + 8
 

Back to the Problem


 


2. going through (5, -6) and with slope 2

y - y1 = m(x - x1)

y - -6 = 2(x - 5)

y + 6 = 2x - 10

y = 2x -16

or f(x) = 2x -16

Back to the Problem


 


3. y-intercept 4, and slope 1/3


 

Back to the Problem


 


4. A horizontal line through the point (-5, 3)

Recall that every horizontal line has slope 0. So using m = 0, we get

y - y1 = m(x - x1)

y - 3 = 0(x --5)

y - 3 = 0

y = 3

or f(x) = 3

Back to the Problem


 


5. A line parallel to y = -3x + 2 and through the point (-8, 13)

Since the lines are parallel, they will have the same slope. So we use m = -3.

y - y1 = m(x - x1)

y - 13 = -3(x --8)

y - 13 = -3x - 24

y = -3x - 11

or f(x) = -3x - 11

Back to the Problem


 


6. A line perpendicular to y = -3x + 2 and through the point (-8, 13)

Since the lines are perpendicular, the slope will be the negative reciprocal. So we use m = 1/3.


 
 

Back to the Problem


 

7. A store manager figures that she can sell 135 items at $50 each. If the store has a sale, for each $2 decrease in the price they can sell an additional 5 items. Find an equation for the number of itmes sold based on the sale price.

Since the amount of the increase in sales is the same for each increment of price decrease the equation is going to be linear. First we'll need to translate the information into points. We want an equation for the number of items sold based on the price, so the number of items sold are our y values and the price is our x value.
The store can sell 135 items at $50 each:   (50,135).
If we decrease the price by $2 (to $48) the number goes up by 5 (to 140):   (48,140)

Back to the Problem