6.2 - Linear functions and straight lines

Linear functions

Click here to review functions. Linear functions are the simplest of all the types of functions. A linear function takes a number x as input and returns the number m x + b as output:
m and b are constants. In words, x gets multiplied by m (this is called a scaling by factor m) and then gets b added on (this is called a shift by an amount b). Using function notation the linear function looks like this:
f (x) = m x + b.
If we let y = f (x) then it looks like this:
y = m x + b.
This is called the equation of a straight line because if we plot the points that satisfy this equation on a graph of y versus x then, as we will see below, the points all lie on a straight line.

A typical use of a linear function is to convert from one set of units to another. A simple example is if i is a distance measured in inches and c is the same distance measured in centimeters; then c = 2.54 i. This is just a scaling. A more complicated example is if c is a temperature measured in celsius degrees and f is the same temperature measured in fahrenheit degrees; then f = 1.8 c + 32. This is a scaling and a shift.



The equation of a straight line

In section 6.1 we introduced the cartesian plane with an x axis drawn horizontally and a y axis drawn vertically. Suppose that m and b are constants. We wish to graph the linear function:
y = m x + b,
on this plane and show that the graph is a straight line. To do this we make the following table of values of y (that is, of the expression m x + b ) versus x:

Notice the following:

Conclusion: The equation
y = m x + b,
where m and b are constants, is the equation of a straight line. m is called the slope and b is called the y intercept. This form of the equation is called the slope-intercept form. There are other possible forms; click here to see them.



Finding the equation of a straight line


Given the graph of a straight line, there are several ways to find its equation.

Method 1: This method works only if the y intercept is visible.

Method 2: This method works even if the y intercept is not visible.

Method 3: This method has the advantage that it uses only algebra, not geometry, and can be applied to any type of function, not just the straight line:





Example: Use method 1 to find the equation of the straight line in the graph to the right.

Solution: Two points on this line are (x1, y1) = (0, 15) and (x2, y2) = (3, 0). Substituting these coordinates into the slope formula gives
= −5.
By inspection the y intercept is
b = 15.
Substituting these two values for m and b into the straight line equation, y = m x + b, gives
y = −5 x + 15.




Example: Use method 3 to find the equation of the straight line in the graph to the right.

Solution: Two points on this line are (7, 15) and (1, 3). Substitute the coordinates of the point (7, 15) into the equation of the straight line, y = m x + b, and then do the same thing for the point (1, 3). This gives a system of two equations in the two unknowns, m and b. Unknown b can be eliminated by subtracting the equations:
Solving for m gives m = 2. Backsubstituting m = 2 into, say, the first equation, gives 15 = 7 · 2 + b, which is easily solved to give b = 1. Substituting these two values for m and b into the straight line equation, y = m x + b, gives
y = 2 x + 1.



  Algebra Coach Exercises