Math · Algebra

Linear functions

Explanation

Linear functions represent relationships with a constant rate of change, creating straight lines when graphed. They can be modeled as f(x)=mx+bf(x) = mx + b or y=mx+by = mx + b, where f(x)f(x) represents the output value for any input xx.

Function form: f(x)=mx+bf(x) = mx + b

The term f(x)f(x) replaces yy to emphasize that the output value depends on the input xx.

  • Evaluating f(a)f(a) means substituting x=ax = a into the function rule to find the corresponding output value.
  • The notation f(x)=kf(x) = k means finding the input value xx that yields an output of kk.
  • On a graph, (x,f(x))(x, f(x)) represents an ordered pair (x,y)(x, y) on the line.
  • In modeling, f(x)f(x) represents the total amount or final state after xx units of change.

Transformations of Linear Functions

Transformations alter the position, steepness, or orientation of a base linear function, such as f(x)=3x+7f(x) = 3x + 7.

  • Vertical Stretch/Compression: g(x)=a⋅f(x)g(x) = a \cdot f(x) multiplies all output values by aa.

    Example: Stretch f(x)=3x+7f(x) = 3x + 7 vertically by a factor of 22:

    g(x)=2⋅f(x)=2(3x+7)=6x+14g(x) = 2 \cdot f(x) = 2(3x + 7) = 6x + 14
  • Reflection Across the xx-Axis: g(x)=−f(x)g(x) = -f(x) flips the entire graph vertically.

    Example: Reflect f(x)=3x+7f(x) = 3x + 7 across the xx-axis:

    g(x)=−f(x)=−(3x+7)=−3x−7g(x) = -f(x) = -(3x + 7) = -3x - 7
  • Horizontal Shift: g(x)=f(x−h)g(x) = f(x - h) shifts the graph right by hh units (h>0h > 0) or left (h<0h < 0).

    Example: Shift f(x)=3x+7f(x) = 3x + 7 right by 44 units:

    g(x)=f(x−4)=3(x−4)+7=3x−12+7=3x−5g(x) = f(x - 4) = 3(x - 4) + 7 = 3x - 12 + 7 = 3x - 5
  • Vertical Shift: g(x)=f(x)+kg(x) = f(x) + k shifts the graph up by kk units (k>0k > 0) or down (k<0k < 0).

    Example: Shift f(x)=3x+7f(x) = 3x + 7 down by 55 units:

    g(x)=f(x)−5=(3x+7)−5=3x+2g(x) = f(x) - 5 = (3x + 7) - 5 = 3x + 2

Comparing Linear Functions

Linear functions can be compared across different representations, such as equations, tables, graphs, or verbal descriptions.

  • Comparing Rates of Change: Determine which function grows or decays faster by comparing the absolute values of their slopes (∣m∣\vert{}m\vert{}).

  • Comparing Initial Values: Identify which function starts higher or lower by comparing their yy-intercepts (b=f(0)b = f(0)).

  • Finding Intersections: Setting f(x)=g(x)f(x) = g(x) finds the input value xx where both functions produce identical outputs.

Example 1

If f(x)=−6x+1f(x) = -6x + 1, what is the value of f(−2)f(-2)?
A
1313
B
−11-11
C
−13-13
D
11
Choice A is the best answer. Substituting x=−2x = -2: f(−2)=−6(−2)+1=12+1=13f(-2) = -6(-2) + 1 = 12 + 1 = 13. Choice B is incorrect; it results from adding 11 before multiplying by −6-6, i.e. computing −6(−2+1)-6(-2+1). Choice C is incorrect; it applies the wrong sign to the constant term. Choice D is incorrect; it drops the −6x-6x term entirely and reports only the constant.

Example 2

If ff is a linear function and f(3)=10f(3) = 10 and f(7)=22f(7) = 22, what is the value of f(10)f(10)?
31
Correct
First find the slope: m=22−107−3=124=3m = \frac{22 - 10}{7 - 3} = \frac{12}{4} = 3. Using the rate of change from x=7x = 7 to x=10x = 10 (a change of 33 in xx): f(10)=f(7)+3(3)=22+9=31f(10) = f(7) + 3(3) = 22 + 9 = 31. A common error is using a slope of 44 (mistaking the change in xx for the slope) or adding only 33 instead of 3×3=93 \times 3 = 9 to f(7)f(7).

Tips for solving

  1. Evaluate f(x)f(x) carefully when nested or given algebraic inputs.

    Example: If f(x)=3x−4f(x) = 3x - 4, what is f(2a+1)f(2a + 1)? Substitute (2a+1)(2a + 1) for xx: f(2a+1)=3(2a+1)−4=6a+3−4=6a−1f(2a + 1) = 3(2a + 1) - 4 = 6a + 3 - 4 = 6a - 1.

  2. Identify vertical shifts directly by comparing yy-intercepts.

    Example: The graph of g(x)g(x) is formed by shifting f(x)=2x+5f(x) = 2x + 5 down by 33 units. What is g(x)g(x)? Subtract 33 from the constant term: g(x)=f(x)−3=(2x+5)−3=2x+2g(x) = f(x) - 3 = (2x + 5) - 3 = 2x + 2.

  3. Distinguish between input shifts f(x−h)f(x - h) and output shifts f(x)+kf(x) + k. 

    Example: If f(x)=4xf(x) = 4x, what equation represents g(x)=f(x−2)g(x) = f(x - 2)? Replace xx with (x−2)(x - 2): g(x)=4(x−2)=4x−8g(x) = 4(x - 2) = 4x - 8.

  4. Compare slopes from tables by finding Δf(x)Δx\frac{\Delta f(x)}{\Delta x}. 

    Example: Function AA has f(x)=5x+1f(x) = 5x + 1. Function BB is given by points (0,2)(0, 2) and (4,18)(4, 18). Which has a greater rate of change? Slope of BB: m=18−24−0=164=4m = \frac{18 - 2}{4 - 0} = \frac{16}{4} = 4. Comparison: Function AA has a greater rate of change (5>45 > 4).

  5. Find the break-even or equivalence point by setting f(x)=g(x)f(x) = g(x). 

    Example: Plan AA costs f(x)=20x+50f(x) = 20x + 50 and Plan BB costs g(x)=30x+10g(x) = 30x + 10. At how many hours xx do both plans cost the same? Set equal: 20x+50=30x+10  ⟹  10x=40  ⟹  x=4 hours20x + 50 = 30x + 10 \implies 10x = 40 \implies x = 4\text{ hours}.

  6.  Interpret domain and range restrictions in real-world contexts. 

    Example: A car's gas tank function is g(m)=15−0.05mg(m) = 15 - 0.05m, where mm is miles driven. What is the practical domain? Tank empty condition: 15−0.05m=0  ⟹  0.05m=15  ⟹  m=30015 - 0.05m = 0 \implies 0.05m = 15 \implies m = 300. Practical domain: 0≤m≤300 miles0 \le m \le 300\text{ miles}.

Practice questions

00:00
Question 1 · easy
If f(x)=3x−5f(x) = 3x - 5, what is the value of f(4)f(4)?
Question 2 · easy
If f(x)=−6x+1f(x) = -6x + 1, what is the value of f(−2)f(-2)?
Question 3 · easy
If f(x)=2x+9f(x) = 2x + 9, what is the value of f(0)f(0)?
Question 4 · easy
A candle's height, in centimeters, after burning for tt hours is modeled by h(t)=20−2th(t) = 20 - 2t. What is the value of h(3)h(3)?
Question 5 · easy
xf(x)-6-4-2246-6-4-2246(-2, 0)(2, 8)
The graph shows the linear function ff. What is the value of f(1)f(1)?
Question 6 · easy
If f(x)=−4x+10f(x) = -4x + 10, what is the value of f(3)f(3)?
Question 7 · easy
If f(x)=7x−3f(x) = 7x - 3, what is the value of f(0)f(0)?
Question 8 · easy
A parking garage charges according to C(h)=5h+3C(h) = 5h + 3, where C(h)C(h) is the cost, in dollars, for hh hours of parking. What is the value of C(2)C(2)?
Question 9 · easy
xf(x)
04
17
210
The table shows values of the linear function ff. What is the value of f(2)f(2)?
Question 10 · easy
If f(x)=9−xf(x) = 9 - x, what is the value of f(9)f(9)?