Chapter 9 ยท Functions
Reading y = mx + b as a Linear Function
Learn why a rule that multiplies the input by one fixed number and adds another is a function, what each number means, and why its points lie on one straight line.
You already know that a function is a rule that gives each permitted input exactly one output. In this lesson you study one family of rules and see why every rule in it is a function whose points lie on a straight line.
Start with one rule: take a number , multiply it by , then add . Call the result . In symbols, the rule is .
Here is the input and is the output. The domain is the set of permitted inputs. For this rule, let the domain be all real numbers.
Why is this rule a function? Multiplying a number by gives exactly one product, and adding to that product gives exactly one sum. So each input leads to exactly one output . The table shows the work for five inputs.
| Input x | Multiply by 2, then add 1 | Output y |
|---|---|---|
Read the table in two ways.
Across a row: each input has exactly one output. The input gives the output , because . So the output for the input is the number added at the end of the rule.
Down the output column: each time the input goes up by , the output goes up by : . The reason is in the rule. Adding to adds one more group of : , which is more than . So the steady change of is the number that multiplies .
The table lists only five inputs, but the rule covers every real number. For example, the input gives . A table with no rule behind it would tell you about its listed inputs only.
In the figure above, the horizontal axis shows the input and the vertical axis shows the output . A point means the input gives the output . The table row with input and output becomes the point .
All five plotted points lie on Line A. You do not need to trust how the picture looks: each pair makes true. For example, fits because .
Because the domain is all real numbers, the graph of this function is all of Line A, not only the five plotted points.
Why is the graph straight? From each plotted point to the next, you move right and up . More generally, take any two points of the rule with different inputs and divide the change in output by the change in input. That quotient is called the slope. It tells you how much the output changes for each increase of in the input.
For this rule the slope is always , because the outputs differ by times as much as the inputs do. From to , the output changes by and the input changes by , and . Points with one constant slope between every pair lie on one straight line.
Key concept
y = mx + b defines a linear function
For fixed numbers and , the rule multiplies the input by and then adds . Each step gives exactly one result, so each permitted input has exactly one output: the rule is a function. It is called a linear function because its points lie on one straight line that is not vertical.
- is the slope: the change in for each increase of in . It may be positive, negative or .
- is the -intercept: the output when the input is , because . The line crosses the vertical axis at .
With all real numbers as the domain, the graph is the whole line. With a smaller domain, the graph is only the points of that line whose inputs are permitted.
Worked example
Reading m and b from a rule
A rule is , and its domain is all real numbers. Name and , say what each one tells you, and find the output for the input .
Match the rule to the form y = mx + b. Subtracting 2 gives the same result as adding negative 2, so rewrite the rule with a plus sign. Now you can read the two numbers: m is 3 and b is negative 2.
Interpret b. It is the output when the input is 0, because the 3x part is then 0. So the line crosses the vertical axis at the point (0, -2).
Interpret m. Because x is multiplied by 3, adding 1 to x adds 3 to y. Check with the inputs 0 and 1: the output goes from -2 to 1, which is a rise of 3. So the slope is 3.
Find the output for the input 4. Follow the rule in order: multiply 4 by 3, then subtract 2.
Check the function idea. The product of 3 and 4 can only be 12, and 12 minus 2 can only be 10, so the input 4 has one output and no other. The same reasoning works for every real input.
Answer
In , the slope is , so rises by for each increase of in . The -intercept is , the output for the input . The input gives exactly one output, , and the rule is a linear function.
Worked example
A rule with a restricted domain
At a fair you start with tokens, and each ride costs tokens. Let be the number of rides you have taken and be the number of tokens you have left. The rule is . State the domain, explain what and mean, and describe the graph.
State the domain. You cannot take part of a ride or a negative number of rides, and 12 tokens pay for at most 4 rides. So the permitted inputs are the whole numbers 0, 1, 2, 3 and 4.
Interpret b. Here b is 12, the output when the input is 0. Before any ride, you still have all 12 tokens.
Interpret m. Here m is -3, measured in tokens per ride. Each ride changes the number of tokens left by -3, so the count drops by 3. Check with 0 rides and 1 ride: the output goes from 12 to 9.
Find the outputs for the other permitted inputs: 2, 3 and 4. Each input gives exactly one output, so the rule is a function on this domain.
Describe the graph. The domain has five inputs, so the graph is five separate points: (0, 12), (1, 9), (2, 6), (3, 3) and (4, 0). From each point to the next you move right 1 and down 3, so all five lie on one straight line.
Compare with the figure below. Its horizontal axis shows rides x and its vertical axis shows tokens left y. The five plotted points are the whole graph. Line B is y = -3x + 12 for all real inputs, drawn only to show that the points line up. A point of Line B between them, such as (0.5, 10.5), is not part of this function, because 0.5 is not a permitted input.
Answer
The domain is the whole numbers from to . The -intercept is the number of tokens before any ride, and the slope means each ride lowers the count by tokens. The graph is five points on the line , so the rule is a linear function.
Two special lines test the idea of exactly one output for each input. In the figure below, the horizontal axis shows the input and the vertical axis shows the output .
Slope zero. With and , the rule becomes . Let its domain be all real numbers. Every input gives the output , so different inputs share an output. That is allowed, because each input still has exactly one output. So is a linear function, and its graph is the horizontal Line C. The points and on it have different inputs and the same output.
Vertical lines. Line D is the vertical line . The points and are both on it, so the one input would have two outputs, and . That breaks the definition of a function. The slope is also undefined: between those two points the change in is , but the change in is , and you cannot divide by . So a vertical line is straight, but it is not the graph of any rule .
The big idea: is a rule that multiplies the input by and then adds . Each permitted input gets exactly one output, so the rule is a function. Equal steps in give equal steps in , so its points lie on one straight line that is not vertical. The slope is the change in for each increase of in , and the -intercept is the output when . Always state the domain: it decides whether the graph is the whole line or only some of its points. A linear function is proportional only in the special case .
Next, you will sort functions into linear and nonlinear ones, see examples of functions that are not linear, and compare how the two kinds change.