TExcelTAD
Home › School Functions, Exponentials & Logarithms › Linear Functions f(x) = ax + b: Slope, Intercepts & Rate of Change

Linear Functions f(x)=ax+bf(x) = ax + b: Slope, Intercepts & Rate of Change

The straight line is the simplest, most predictable geometric shape in mathematics. Whenever two quantities change at a steady, unchanging rate—such as distance traveled at constant speed, water flowing from a tap, or simple interest accumulating—the relationship is governed by a linear function.

On paper, linear functions can be completely determined by just two numbers: the slope (aa) and the yy-intercept (bb).


The Standard Form of a Linear Function

A linear function has the algebraic form:

f(x)=ax+bory=ax+bf(x) = ax + b \quad \text{or} \quad y = ax + b

(In some textbooks, this is written as y=mx+cy = mx + c, where mm is the slope and cc is the yy-intercept.)

a⟷Slope (Rate of Change): How steeply the line tilts and in which direction.b⟷y-Intercept: The vertical coordinate where the line crosses x=0.\begin{aligned} a \quad &\longleftrightarrow \quad \textbf{Slope (Rate of Change):} \text{ How steeply the line tilts and in which direction.} \\ b \quad &\longleftrightarrow \quad \textbf{$y$-Intercept:} \text{ The vertical coordinate where the line crosses } x = 0. \end{aligned}

The Slope Formula: Δy\Delta y over Δx\Delta x

The slope of a non-vertical line passing through two distinct points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) measures the ratio of vertical change (rise) to horizontal change (run):

a=ΔyΔx=y2−y1x2−x1,where x1≠x2a = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}, \quad \text{where } x_1 \neq x_2
                        y
                        │                 (x₂, y₂)
                        │                   ●
                        │                  ╱│
                        │                 ╱ │ Δy = y₂ - y₁ (Rise)
                        │     (x₁, y₁)   ╱  │
                        │        ●───────┼──╯
                        │        │  Δx   │
                        │     x₂ - x₁ (Run)
                  ──────┼────────┼───────┼──────► x
                        │       x₁      x₂

The Four Slopes on Paper:

  1. a>0a > 0 (Positive Slope): The line rises from bottom-left to top-right. The function is strictly increasing.
  2. a<0a < 0 (Negative Slope): The line falls from top-left to bottom-right. The function is strictly decreasing.
  3. a=0a = 0 (Zero Slope): A flat horizontal line f(x)=bf(x) = b. The function is constant.
  4. Undefined Slope: A vertical line x=cx = c. It fails the Vertical Line Test and is not a function.

Intercepts on Paper

A linear function intersects the Cartesian axes at two key points:

y-Intercept:Set x=0  ⟹  y=a(0)+b=b  ⟹  (0,b)x-Intercept (Zero):Set y=0  ⟹  ax+b=0  ⟹  x=−ba  ⟹  (−ba,0)\begin{aligned} \textbf{$y$-Intercept:} \quad &\text{Set } x = 0 \implies y = a(0) + b = b \implies (0, b) \\ \textbf{$x$-Intercept (Zero):} \quad &\text{Set } y = 0 \implies ax + b = 0 \implies x = -\frac{b}{a} \implies \left(-\frac{b}{a}, 0\right) \end{aligned}

Parallel and Perpendicular Lines

When comparing two straight lines on paper with slopes a1a_1 and a2a_2:

Parallel Lines (L1∥L2):a1=a2andb1≠b2They have the identical slope and never intersect.Perpendicular Lines (L1⊥L2):a1⋅a2=−1  ⟺  a2=−1a1Their slopes are negative reciprocals (intersect at 90∘).\begin{aligned} \textbf{Parallel Lines } (L_1 \parallel L_2): \quad &a_1 = a_2 \quad \text{and} \quad b_1 \neq b_2 \\ &\text{They have the identical slope and never intersect.} \\ \textbf{Perpendicular Lines } (L_1 \perp L_2): \quad &a_1 \cdot a_2 = -1 \iff a_2 = -\frac{1}{a_1} \\ &\text{Their slopes are \textbf{negative reciprocals}} \text{ (intersect at } 90^\circ\text{).} \end{aligned}

Example of negative reciprocals:
If a1=34a_1 = \frac{3}{4}, then the perpendicular slope is a2=−43a_2 = -\frac{4}{3}.
If a1=−5a_1 = -5, then the perpendicular slope is a2=+15a_2 = +\frac{1}{5}.


Step-by-Step Paper Notebook Method

Method 1: Finding the Equation from Two Given Points

  1. Label the Points: Clearly write (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) in the left margin.
  2. Calculate Slope aa:
    a=y2−y1x2−x1a = \frac{y_2 - y_1}{x_2 - x_1}
    Watch negative signs carefully when subtracting!
  3. Find the yy-Intercept bb: Use the point-slope formula:
    y−y1=a(x−x1)y - y_1 = a(x - x_1)
    Or substitute (x1,y1)(x_1, y_1) and aa directly into y=ax+by = ax + b and solve for bb.
  4. State the Final Formula: Write f(x)=ax+bf(x) = ax + b.

Method 2: Graphing a Line on Grid Paper (Rise-over-Run)

  1. Mark the yy-intercept (0,b)(0, b) on the vertical axis.
  2. Express the slope as a fraction a=ΔyΔxa = \frac{\Delta y}{\Delta x}.
  3. Starting from (0,b)(0, b), count Δx\Delta x units to the right, and count Δy\Delta y units up (if positive) or down (if negative). Mark this second point.
  4. Align a ruler across both points and draw the straight line through the entire grid, adding arrowheads at both ends.

Worked Examples

Example 1: Finding the Linear Function Through Two Points

Problem: Find the equation of the linear function f(x)f(x) whose graph passes through the points A(−2,11)A(-2, 11) and B(4,−1)B(4, -1). Determine its slope, intercepts, and rate of change.

Step-by-Step Paper Solution:

  1. Calculate the slope aa: Let (x1,y1)=(−2,11)(x_1, y_1) = (-2, 11) and (x2,y2)=(4,−1)(x_2, y_2) = (4, -1).

    a=y2−y1x2−x1=−1−114−(−2)=−124+2=−126=−2\begin{aligned} a &= \frac{y_2 - y_1}{x_2 - x_1} \\ &= \frac{-1 - 11}{4 - (-2)} \\ &= \frac{-12}{4 + 2} \\ &= \frac{-12}{6} \\ &= -2 \end{aligned}
  2. Calculate the yy-intercept bb: Substitute a=−2a = -2 and the point (4,−1)(4, -1) into y=ax+by = ax + b:

    −1=−2(4)+b−1=−8+bb=−1+8b=7\begin{aligned} -1 &= -2(4) + b \\ -1 &= -8 + b \\ b &= -1 + 8 \\ b &= 7 \end{aligned}
  3. Write the function:

    f(x)=−2x+7f(x) = -2x + 7
  4. Calculate Intercepts:

    • yy-intercept: (0,7)(0, 7).
    • xx-intercept: Set −2x+7=0  ⟹  −2x=−7  ⟹  x=72=3.5  ⟹  (72,0)-2x + 7 = 0 \implies -2x = -7 \implies x = \frac{7}{2} = 3.5 \implies \left(\frac{7}{2}, 0\right).

Final Answer: The linear function is f(x)=−2x+7f(x) = -2x + 7. Its slope is −2-2 (a constant rate of decrease of 22 units per step of xx). The intercepts are (0,7)(0, 7) and (72,0)\left(\frac{7}{2}, 0\right).


Example 2: Finding a Perpendicular Line Equation

Problem: A line LL passes through the point P(6,−2)P(6, -2) and is perpendicular to the line given by the equation:

3x+9y=183x + 9y = 18

Find the equation of line LL in slope-intercept form on paper.

Step-by-Step Paper Solution:

  1. Find the slope of the given line: Isolate yy into y=ax+by = ax + b form:

    3x+9y=189y=−3x+18y=−39x+189y=−13x+2\begin{aligned} 3x + 9y &= 18 \\ 9y &= -3x + 18 \\ y &= \frac{-3}{9}x + \frac{18}{9} \\ y &= -\frac{1}{3}x + 2 \end{aligned}

    The slope of this line is a1=−13a_1 = -\frac{1}{3}.

  2. Determine the perpendicular slope a2a_2: Use the perpendicularity condition a1⋅a2=−1a_1 \cdot a_2 = -1:

    a2=−1a1=−1−13=+3a_2 = -\frac{1}{a_1} = -\frac{1}{-\frac{1}{3}} = +3
  3. Use the Point-Slope Formula with P(6,−2)P(6, -2) and a2=3a_2 = 3:

    y−y1=a(x−x1)y−(−2)=3(x−6)y+2=3x−18y=3x−18−2y=3x−20\begin{aligned} y - y_1 &= a(x - x_1) \\ y - (-2) &= 3(x - 6) \\ y + 2 &= 3x - 18 \\ y &= 3x - 18 - 2 \\ y &= 3x - 20 \end{aligned}

Final Answer: The equation of the perpendicular line is y=3x−20y = 3x - 20.


Example 3: Real-World Rate of Change Modeling

Problem: A mobile bicycle mechanic charges a fixed call-out fee plus an hourly labor rate. An invoice shows that a 2-hour2\text{-hour} repair cost $85\$85, while a 5-hour5\text{-hour} overhaul cost $175\$175.

  1. Write a linear cost function C(t)C(t) where tt is labor time in hours.
  2. Identify the hourly labor rate and the fixed call-out fee.
  3. What would an 8-hour8\text{-hour} job cost?

Step-by-Step Paper Solution:

  1. Represent data as coordinate pairs (t,C)(t, C):

    (t1,C1)=(2,85),(t2,C2)=(5,175)(t_1, C_1) = (2, 85), \qquad (t_2, C_2) = (5, 175)
  2. Compute the hourly rate (slope aa):

    a=C2−C1t2−t1=175−855−2=903=30 dollars/hour\begin{aligned} a &= \frac{C_2 - C_1}{t_2 - t_1} \\ &= \frac{175 - 85}{5 - 2} \\ &= \frac{90}{3} \\ &= 30\text{ dollars/hour} \end{aligned}
  3. Compute the fixed call-out fee (bb):

    C(t)=30t+b85=30(2)+b85=60+bb=85−60=25 dollars\begin{aligned} C(t) &= 30t + b \\ 85 &= 30(2) + b \\ 85 &= 60 + b \\ b &= 85 - 60 = 25\text{ dollars} \end{aligned}

    The linear function is C(t)=30t+25C(t) = 30t + 25.

  4. Calculate cost for t=8 hourst = 8\text{ hours}:

    C(8)=30(8)+25=240+25=265 dollars\begin{aligned} C(8) &= 30(8) + 25 \\ &= 240 + 25 \\ &= 265\text{ dollars} \end{aligned}

Final Answer:

  1. Formula: C(t)=30t+25C(t) = 30t + 25.
  2. Hourly rate: $30/hr\$30/\text{hr}, fixed call-out fee: $25\$25.
  3. Cost for 8 hours8\text{ hours}: $265\$265.

Common Mistakes & Paper Traps

Paper Trap What Goes Wrong Correct Paper Habit
Inverted Slope Formula Writing a=x2−x1y2−y1a = \frac{x_2 - x_1}{y_2 - y_1} (runrise\frac{\text{run}}{\text{rise}}). Always write ΔyΔx=y2−y1x2−x1\frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}. Remember: yy is high in the sky (numerator)!
Mismatched Index Order Calculating y2−y1x1−x2\frac{y_2 - y_1}{x_1 - x_2}. Whichever point comes first in the numerator must come first in the denominator: y2−y1x2−x1\frac{y_2 - y_1}{x_2 - x_1} or y1−y2x1−x2\frac{y_1 - y_2}{x_1 - x_2}.
Double Negative Slips When x1=−4x_1 = -4, writing 2−4=−22 - 4 = -2 instead of 2−(−4)=62 - (-4) = 6. Always insert parentheses around negative coordinates: x2−(x1)x_2 - (x_1).
Confusing Parallel and Perpendicular Using a2=−a1a_2 = -a_1 for perpendicular lines. Perpendicular lines require the negative reciprocal: a2=−1a1a_2 = -\frac{1}{a_1}.

Pencil & Paper Practice

Complete these problems in your notebook before reviewing the solutions.

Practice 1

Find the equation of the linear function f(x)f(x) passing through (−3,4)(-3, 4) with slope a=−2a = -2. Write the equation in standard slope-intercept form and find its xx-intercept.

Practice 2

Line L1L_1 has equation y=25x−3y = \frac{2}{5}x - 3. Line L2L_2 is parallel to L1L_1 and passes through (10,1)(10, 1). Find the equation of line L2L_2.

Practice 3

Line KK passes through (1,3)(1, 3) and (5,11)(5, 11). Is line KK perpendicular to the line y=−12x+8y = -\frac{1}{2}x + 8? Justify your answer with algebraic steps.


Worked Solutions

Solution 1

  1. Use point-slope form:
y−y1=a(x−x1)y−4=−2(x−(−3))y−4=−2(x+3)y−4=−2x−6y=−2x−2\begin{aligned} y - y_1 &= a(x - x_1) \\ y - 4 &= -2(x - (-3)) \\ y - 4 &= -2(x + 3) \\ y - 4 &= -2x - 6 \\ y &= -2x - 2 \end{aligned}
  1. Find xx-intercept: set y=0y = 0:
−2x−2=0  ⟹  −2x=2  ⟹  x=−1  ⟹  (−1,0)-2x - 2 = 0 \implies -2x = 2 \implies x = -1 \implies (-1, 0)

Result: f(x)=−2x−2f(x) = \mathbf{-2x - 2}, with xx-intercept at (−1,0)(-1, 0).

Solution 2

  1. Parallel lines have equal slopes: a2=a1=25a_2 = a_1 = \frac{2}{5}.
  2. Substitute point (10,1)(10, 1) into y=25x+by = \frac{2}{5}x + b:
1=25(10)+b1=4+bb=1−4=−3\begin{aligned} 1 &= \frac{2}{5}(10) + b \\ 1 &= 4 + b \\ b &= 1 - 4 = -3 \end{aligned}

Result: The equation is y=25x−3y = \mathbf{\frac{2}{5}x - 3} (Notice this is the identical line; if strictly distinct lines are requested, any non-identical parallel line has b≠−3b \neq -3).

Solution 3

  1. Calculate the slope of line KK:
aK=11−35−1=84=2a_K = \frac{11 - 3}{5 - 1} = \frac{8}{4} = 2
  1. The given line has slope a2=−12a_2 = -\frac{1}{2}.
  2. Multiply the two slopes:
aK⋅a2=2⋅(−12)=−1a_K \cdot a_2 = 2 \cdot \left(-\frac{1}{2}\right) = -1

Result: Because their product is −1-1, line KK is perpendicular to the line y=−12x+8y = -\frac{1}{2}x + 8.


Test yourself

What is the slope of the line passing through the points (−3,8)(-3, 8) and (1,−4)(1, -4)?

  1. −3-3
  2. 33
  3. −13-\frac{1}{3}
  4. −1-1

Which of the following equations represents a line perpendicular to y=−34x+5y = -\frac{3}{4}x + 5?

  1. y=−34x−2y = -\frac{3}{4}x - 2
  2. y=43x+1y = \frac{4}{3}x + 1
  3. y=−43x+5y = -\frac{4}{3}x + 5
  4. y=34x−1y = \frac{3}{4}x - 1

What are the coordinates of the xx-intercept of the linear function f(x)=4x−12f(x) = 4x - 12?

  1. (0,−12)(0, -12)
  2. (3,0)(3, 0)
  3. (−3,0)(-3, 0)
  4. (0,3)(0, 3)