Chapter 9 ยท Functions

Recover a Linear Function from a Table or Graph

Find the rate of change and initial value of a linear function from a table or a graph, then use them to write the function's rule.

15 min read

You can already complete a table for a linear function. Now you will work backward: you start with a table or a graph and recover the function's rule.

Three terms first. A function pairs each permitted input with exactly one output. Different inputs may share an output, but one input never has two outputs. The domain is the set of permitted inputs, the inputs you are allowed to use. A linear function is a function with a rule you can write as f(x)=mx+bf(x) = mx + b, where mm and bb are fixed numbers. Here xx is the input, and f(x)f(x), also written yy, is the output.

To recover a linear function, you need to find those two numbers, mm and bb, and to say which inputs are permitted.

Begin with a rule you can already use. Let f(x)=2x+1f(x) = 2x + 1 for every real number xx. Completing a table gives f(0)=1f(0) = 1, f(1)=3f(1) = 3, f(2)=5f(2) = 5 and f(3)=7f(3) = 7.

Notice two things in those values.

  • Each time the input goes up by 11, the output goes up by 22. This is the rate of change: how much the output changes for each increase of 11 in the input. It is the 22 in 2x2x, because adding 11 to xx adds 22 to 2x2x and does not change the 11.
  • When the input is 00, the output is 11. This is the initial value: the output at input 00. It is the 11 added at the end of the rule, because f(0)=2โ‹…0+1=1f(0) = 2 \cdot 0 + 1 = 1.
Coordinate grid from x -2 to 5 and y -2 to 9, with a grid step of 1, showing 5 plotted elements. Details: line 2 x plus -1 y equals -1, named Line A; point at (0, 1), named (0, 1); point at (1, 3), named (1, 3); point at (2, 5), named (2, 5); point at (3, 7), named (3, 7).
Line A is the graph of f(x)=2x+1f(x) = 2x + 1. It crosses the vertical axis at (0,1)(0, 1) and rises 22 for each step of 11 to the right.

The figure shows part of the graph of the same function. The horizontal axis shows the input xx, and the vertical axis shows the output yy. Each grid step is 11, and neither quantity has a unit. Line A is the graph of ff. Its four labelled points are the four pairs you just found: (0,1)(0, 1), (1,3)(1, 3), (2,5)(2, 5) and (3,7)(3, 7).

  • The point (0,1)(0, 1) is on the vertical axis, where x=0x = 0. Its yy-coordinate, 11, is the initial value.
  • From each labelled point to the next, you move 11 right and 22 up. Take any two points on a line that have different xx-coordinates. The vertical change divided by the horizontal change between them is the line's slope. Here the slope is 21=2\frac{2}{1} = 2, which is the rate of change.

So a table and a graph hold the same two numbers. You only read them in different ways.

Key concept

Rate of change and initial value recover the rule

A table or graph shows only some input-output pairs. When you also know the function is linear on its domain, two numbers give its rule f(x)=mx+bf(x) = mx + b for every permitted input.

  • Rate of change mm: pick two data points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) with different inputs, x1โ‰ x2x_1 \neq x_2. Divide the change in output by the change in input, subtracting in the same order on top and bottom.
  • Initial value bb: the output at input 00. It is an actual output only when 00 is in the domain.

Why different inputs? If x1=x2x_1 = x_2, the change in input is 00, and you cannot divide by 00. Two such points with different outputs lie on a vertical line, which has undefined slope and is not the graph of a function: one input would have more than one output.

m=y2โˆ’y1x2โˆ’x1(x1โ‰ x2),b=f(0)(0ย inย theย domain)m = \frac{y_2 - y_1}{x_2 - x_1} \quad (x_1 \neq x_2), \qquad b = f(0) \quad (0 \text{ in the domain})
Four values of the function g
Input xOutput g(x)
00
44
22
1010
44
1616
66
2222

Worked example

A table that includes input 0

The table above shows four values of a function gg. You are told that gg is linear and that its domain is all real numbers. Find the rate of change and the initial value, then write the rule for gg.

  1. Decide what the data can support. A table by itself tells you only about the inputs it shows. Here you are also told that g is linear on all real numbers, so one rule of this form fits every input. Your job is to find m and b.

    g(x)=mx+bg(x) = mx + b
  2. Find the rate of change. Take the rows (0, 4) and (2, 10), which have different inputs. The output rises by 6 while the input rises by 2. A linear function changes by the same amount on each input step of 1, so divide 6 by 2.

    m=10โˆ’42โˆ’0=62=3m = \frac{10 - 4}{2 - 0} = \frac{6}{2} = 3
  3. Confirm with another pair of rows, (4, 16) and (6, 22). A linear function has the same rate between any two different inputs, so this pair must agree with the first.

    22โˆ’166โˆ’4=62=3\frac{22 - 16}{6 - 4} = \frac{6}{2} = 3
  4. Find the initial value. It is the output at input 0. The domain includes 0 and the table has that row, so you can read it directly.

    b=g(0)=4b = g(0) = 4
  5. Write the rule with m = 3 and b = 4. Then test it on the row (6, 22), which you did not use to build it. The rule gives the table's output, so it fits.

    g(x)=3x+4,g(6)=3โ‹…6+4=18+4=22g(x) = 3x + 4, \qquad g(6) = 3 \cdot 6 + 4 = 18 + 4 = 22

Answer

The rate of change is 33, the initial value is 44, and the function is g(x)=3x+4g(x) = 3x + 4 for all real numbers xx.

Coordinate grid from x -4 to 5 and y -3 to 11, with a grid step of 1, showing 4 plotted elements. Details: line 2 x plus 1 y equals 5, named Line B; point at (-2, 9), named (-2, 9); point at (0, 5), named (0, 5); point at (3, -1), named (3, -1).
Line B passes through the labelled points (โˆ’2,9)(-2, 9), (0,5)(0, 5) and (3,โˆ’1)(3, -1). Each grid step is 11.

Worked example

A graph with a labelled point at input 0

The figure above shows part of Line B, the graph of a linear function hh whose domain is all real numbers. The horizontal axis shows the input xx, and the vertical axis shows the output yy. Each grid step is 11, and neither quantity has a unit. Line B passes through the labelled points (โˆ’2,9)(-2, 9), (0,5)(0, 5) and (3,โˆ’1)(3, -1). Find the rate of change and the initial value, then write the rule for hh.

  1. Find the initial value. The point (0, 5) is on the vertical axis, where the input is 0, so its y-coordinate is the output at input 0. Use the labelled coordinates, which are exact, and not a guess from how the line looks.

    b=h(0)=5b = h(0) = 5
  2. Find the rate of change from (0, 5) and (3, -1), which have different inputs. Subtract in the same order on top and bottom: second point minus first point. The rate is negative because the output falls as the input rises. Line B drops 2 for each step of 1 to the right.

    m=โˆ’1โˆ’53โˆ’0=โˆ’63=โˆ’2m = \frac{-1 - 5}{3 - 0} = \frac{-6}{3} = -2
  3. Confirm with the other pair, (-2, 9) and (0, 5). Subtracting a negative number is the same as adding its opposite, so the change in input, 0 minus -2, equals 2.

    5โˆ’90โˆ’(โˆ’2)=โˆ’42=โˆ’2\frac{5 - 9}{0 - (-2)} = \frac{-4}{2} = -2
  4. Write the rule with m = -2 and b = 5. Then test it on (-2, 9), which you did not use to build it. A negative number times a negative number is positive, so -2 times -2 is 4.

    h(x)=โˆ’2x+5,h(โˆ’2)=โˆ’2โ‹…(โˆ’2)+5=4+5=9h(x) = -2x + 5, \qquad h(-2) = -2 \cdot (-2) + 5 = 4 + 5 = 9

Answer

The rate of change is โˆ’2-2, the initial value is 55, and the function is h(x)=โˆ’2x+5h(x) = -2x + 5 for all real numbers xx.

Three values of the function p
Input xOutput p(x)
33
1010
55
1818
99
3434

Worked example

A table that skips input 0

The table above shows three values of a function pp. You are told that pp is linear and that its domain is all real numbers. Find the rate of change and the initial value, then write the rule for pp.

  1. Find the rate of change from the rows (3, 10) and (5, 18). The inputs in this table are not evenly spaced, so you cannot just compare one output with the next. Divide the change in output by the change in input.

    m=18โˆ’105โˆ’3=82=4m = \frac{18 - 10}{5 - 3} = \frac{8}{2} = 4
  2. Confirm with the rows (5, 18) and (9, 34). The output changes differ this time, 8 and then 16, but the rate is the same, as it must be for a linear function.

    34โˆ’189โˆ’5=164=4\frac{34 - 18}{9 - 5} = \frac{16}{4} = 4
  3. Set up an equation for the initial value. The table has no row for input 0, so you cannot read b. You do know that the rule has the form p(x) = 4x + b and that it must give 10 when x is 3. Substitute that row.

    10=4โ‹…3+b=12+b10 = 4 \cdot 3 + b = 12 + b
  4. Solve for b by subtracting 12 from both sides. Subtracting the same number from both sides keeps them equal, and it leaves b by itself.

    10โˆ’12=12+bโˆ’12,soย b=โˆ’210 - 12 = 12 + b - 12, \quad \text{so } b = -2
  5. Check that b = -2 makes sense. Going from input 3 back to input 0 lowers the input by 3, so the output falls by 3 times 4, which is 12. Because 0 is in the domain, -2 is the initial value, even though the table never shows it.

    p(0)=10โˆ’3โ‹…4=10โˆ’12=โˆ’2p(0) = 10 - 3 \cdot 4 = 10 - 12 = -2
  6. Write the rule. Adding -2 is the same as subtracting 2. Then test the rule on the row (9, 34), which you did not use to find b.

    p(x)=4xโˆ’2,p(9)=4โ‹…9โˆ’2=36โˆ’2=34p(x) = 4x - 2, \qquad p(9) = 4 \cdot 9 - 2 = 36 - 2 = 34

Answer

The rate of change is 44, the initial value is โˆ’2-2, and the function is p(x)=4xโˆ’2p(x) = 4x - 2 for all real numbers xx.

Takeaway. When you know a function is linear on its stated domain, two numbers recover its rule f(x)=mx+bf(x) = mx + b.

  • The rate of change mm is a change in output divided by the matching change in input, taken between two different inputs.
  • The initial value bb is the output at input 00, when 00 is in the domain. Read it if the table or graph shows it. Solve for it if not.

Then write the rule, state the domain, and test the rule on a data point you did not use.

Next, you will write linear functions from word problems and explain what the rate of change and the initial value mean in each situation.