πŸ”’ Private Site

This site is password-protected.

Chapter 4 β€” Linear Functions

Linear functions are the simplest and most widely used type of function. They model any situation where there is a constant rate of change β€” from the speed of a car, to the cost of a subscription, to the depreciation of an asset. A deep understanding of linear functions is a gateway to all higher mathematics.


Table of Contents


Glossary

Term Definition
Linear function A function of the form $f(x) = mx + b$ whose graph is a straight line
Slope The ratio $m = \dfrac{\Delta y}{\Delta x}$ measuring steepness and direction
$y$-intercept The point $(0, b)$ where the line crosses the $y$-axis
$x$-intercept The point where $y = 0$; found by solving $0 = mx + b$
Slope-intercept form $y = mx + b$
Point-slope form $y - y_1 = m(x - x_1)$
Standard form $Ax + By = C$ where $A, B, C$ are integers and $A \ge 0$
Parallel lines Lines with the same slope ($m_1 = m_2$) that never intersect
Perpendicular lines Lines whose slopes are negative reciprocals ($m_1 \cdot m_2 = -1$)
Scatter plot A graph displaying paired data points on a coordinate plane
Line of best fit The line that minimizes the sum of squared vertical distances from data points
Correlation coefficient ($r$) A value in $[-1, 1]$ measuring the strength and direction of a linear relationship
Interpolation Predicting values within the range of observed data
Extrapolation Predicting values outside the range of observed data
Horizontal line $y = c$ β€” slope is $0$
Vertical line $x = c$ β€” slope is undefined

1 β€” Linear Functions

1.1 What Is a Linear Function?

Definition β€” Linear Function: A function $f$ is linear if it can be written as

\[f(x) = mx + b\]

where $m$ and $b$ are real constants. Its graph is always a straight line.

The constant $m$ is the slope (rate of change), and $b$ is the $y$-intercept (the value of $f$ when $x = 0$).

Any equation that can be rearranged into $y = mx + b$ represents a linear function. Equations like $2x + 3y = 6$ are linear because solving for $y$ gives $y = -\tfrac{2}{3}x + 2$.

Not linear: $y = x^2$, $y = \sqrt{x}$, $y = \dfrac{1}{x}$, $y = 2^x$. These involve powers, roots, reciprocals, or exponentials β€” none produce straight-line graphs.

1.2 Slope as a Rate of Change

Definition β€” Slope: Given two points $(x_1, y_1)$ and $(x_2, y_2)$ on a line,

\(m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x} = \frac{\text{rise}}{\text{run}}\)

Slope tells you how much $y$ changes for every 1-unit increase in $x$.

Example: Find the slope of the line through $(2, 3)$ and $(5, 9)$.

\[m = \frac{9 - 3}{5 - 2} = \frac{6}{3} = 2\]

Interpretation: For every 1-unit increase in $x$, the $y$-value increases by 2.

Special slopes:

Slope Type Graph behavior
$m > 0$ Positive Line rises left to right
$m < 0$ Negative Line falls left to right
$m = 0$ Zero Horizontal line ($y = b$)
$m$ undefined Undefined Vertical line ($x = a$, not a function)

Common mistake: Swapping the order of subtraction. If you compute $\dfrac{y_2 - y_1}{x_2 - x_1}$, you must subtract in the same order in both numerator and denominator. Using $\dfrac{y_2 - y_1}{x_1 - x_2}$ gives the negative of the correct slope.

1.3 Increasing, Decreasing, and Constant Functions

For a linear function $f(x) = mx + b$:

  • Increasing on $(-\infty, \infty)$ when $m > 0$
  • Decreasing on $(-\infty, \infty)$ when $m < 0$
  • Constant on $(-\infty, \infty)$ when $m = 0$

Unlike nonlinear functions (which can increase on some intervals and decrease on others), a linear function is globally increasing, decreasing, or constant β€” never a mix.

1.4 Interpreting Slope and y-Intercept

In real-world contexts, slope and intercept carry meaning:

Example: A gym charges a $50 enrollment fee plus $30 per month. The cost function is

\[C(m) = 30m + 50\]
  • Slope ($30$): Each additional month costs $30.
  • $y$-intercept ($50$): The initial cost at month 0 (enrollment fee).
  • $C(6) = 30(6) + 50 = 230$: After 6 months you’ve paid $230 total.

Units of slope: Always β€œoutput units per input unit.” If $y$ is in dollars and $x$ is in months, then slope is β€œdollars per month.”

1.5 Graphing a Linear Function

Method 1 β€” Intercepts:

  1. Find the $y$-intercept: set $x = 0$, compute $y = b$. Plot $(0, b)$.
  2. Find the $x$-intercept: set $y = 0$, solve $0 = mx + b \Rightarrow x = -\tfrac{b}{m}$. Plot $\left(-\tfrac{b}{m}, 0\right)$.
  3. Draw the line through both points.

Method 2 β€” Slope + Point:

  1. Plot the $y$-intercept $(0, b)$.
  2. From that point, use slope $m = \dfrac{\text{rise}}{\text{run}}$: move rise units vertically and run units horizontally to get a second point.
  3. Draw the line.

Example: Graph $f(x) = -\dfrac{2}{3}x + 4$.

  1. $y$-intercept: $(0, 4)$.
  2. Slope $= -\dfrac{2}{3}$: from $(0, 4)$, go down 2, right 3 β†’ $(3, 2)$.
  3. Draw a line through $(0, 4)$ and $(3, 2)$.

$x$-intercept: $0 = -\dfrac{2}{3}x + 4 \Rightarrow x = 6$. The line crosses the $x$-axis at $(6, 0)$. βœ“


2 β€” Writing Linear Equations

2.1 Slope-Intercept Form

Slope-Intercept Form:

\[y = mx + b\]

where $m$ is the slope and $b$ is the $y$-intercept.

This is the most common form. You can read $m$ and $b$ directly.

Equation Slope $m$ $y$-intercept $b$
$y = 3x - 7$ $3$ $-7$
$y = -\tfrac{1}{2}x + 4$ $-\tfrac{1}{2}$ $4$
$y = 5$ $0$ $5$

2.2 Point-Slope Form

Point-Slope Form: Given slope $m$ and a point $(x_1, y_1)$ on the line,

\(y - y_1 = m(x - x_1)\)

This is the most efficient form when you know one point and the slope (or two points, since you can compute slope first).

Example: Write the equation of the line through $(3, -2)$ with slope $4$.

\(y - (-2) = 4(x - 3)\) \(y + 2 = 4x - 12\) \(y = 4x - 14\)

2.3 Standard Form

Standard Form:

\[Ax + By = C\]

where $A$, $B$, $C$ are integers and $A \ge 0$ (by convention).

Advantages of standard form:

  • Easy to find both intercepts: set $y = 0$ gives $x = C/A$; set $x = 0$ gives $y = C/B$.
  • Naturally handles vertical lines ($x = c$), which slope-intercept cannot express.

Example: Convert $y = \dfrac{3}{4}x - 2$ to standard form.

Multiply through by 4: $4y = 3x - 8$

Rearrange: $-3x + 4y = -8$

Multiply by $-1$ (to make $A > 0$): $3x - 4y = 8$

Standard form: $3x - 4y = 8$.

2.4 Writing Equations from Two Points

Steps:

  1. Compute the slope: $m = \dfrac{y_2 - y_1}{x_2 - x_1}$
  2. Use point-slope form with either point: $y - y_1 = m(x - x_1)$
  3. Simplify to desired form.

Example: Find the equation of the line through $(1, 5)$ and $(4, -1)$.

Step 1: $m = \dfrac{-1 - 5}{4 - 1} = \dfrac{-6}{3} = -2$

Step 2: $y - 5 = -2(x - 1)$

Step 3: $y = -2x + 2 + 5 = -2x + 7$

Answer: $y = -2x + 7$ βœ“

2.5 Writing Equations from a Graph

  1. Identify two lattice points (points with integer coordinates) on the line.
  2. Calculate slope from those two points.
  3. Read the $y$-intercept from the graph (or use point-slope form).
  4. Write the equation.

If the graph clearly shows the $y$-intercept, just read $b$ from the graph and compute $m$ from any two points β€” then write $y = mx + b$ directly.


3 β€” Parallel and Perpendicular Lines

3.1 Parallel Lines

Parallel Lines: Two distinct lines are parallel if and only if they have the same slope.

\(\ell_1 \parallel \ell_2 \iff m_1 = m_2 \text{ (and } b_1 \ne b_2\text{)}\)

Parallel lines never intersect. They always maintain the same distance apart.

Example: Are the lines $y = 3x + 1$ and $6x - 2y = 10$ parallel?

Rewrite the second: $-2y = -6x + 10 \Rightarrow y = 3x - 5$.

Both slopes are $3$, and intercepts differ ($1 \ne -5$) β†’ Yes, they are parallel. βœ“

3.2 Perpendicular Lines

Perpendicular Lines: Two lines are perpendicular if and only if their slopes are negative reciprocals:

\(m_1 \cdot m_2 = -1 \qquad \text{or equivalently} \qquad m_2 = -\frac{1}{m_1}\)

Perpendicular lines intersect at a 90Β° angle.

$m_1$ $m_2$ (perpendicular)
$2$ $-\tfrac{1}{2}$
$-\tfrac{3}{4}$ $\tfrac{4}{3}$
$1$ $-1$
$\tfrac{1}{5}$ $-5$

Special case: A horizontal line ($m = 0$) is perpendicular to a vertical line ($m$ undefined). The negative reciprocal rule doesn’t apply in the usual algebraic sense for this case β€” just remember horizontal βŠ₯ vertical.

3.3 Writing Equations of Parallel and Perpendicular Lines

Example 1 β€” Parallel: Write the equation of the line through $(2, -3)$ parallel to $y = \tfrac{1}{2}x + 7$.

Parallel β†’ same slope: $m = \tfrac{1}{2}$.

$y - (-3) = \tfrac{1}{2}(x - 2)$

$y + 3 = \tfrac{1}{2}x - 1$

$y = \tfrac{1}{2}x - 4$ βœ“

Example 2 β€” Perpendicular: Write the equation of the line through $(6, 1)$ perpendicular to $y = -3x + 4$.

Perpendicular β†’ negative reciprocal: $m = -\dfrac{1}{-3} = \dfrac{1}{3}$.

$y - 1 = \dfrac{1}{3}(x - 6)$

$y = \dfrac{1}{3}x - 2 + 1 = \dfrac{1}{3}x - 1$ βœ“


4 β€” Modeling with Linear Functions

4.1 Building Linear Models from Words

Many real-world situations involve a constant rate of change. To build a model:

  1. Identify the variables: What is the input ($x$)? What is the output ($y$ or $f(x)$)?
  2. Find the rate of change (slope $m$) from the problem.
  3. Find the initial value ($y$-intercept $b$) β€” the value when $x = 0$.
  4. Write $f(x) = mx + b$.

Example: A plumber charges $45 for a service call plus $70 per hour of labor. Write a function for total cost $C(h)$ in terms of hours $h$.

  • Slope $= 70$ (dollars per hour)
  • $y$-intercept $= 45$ (initial call fee)
\[C(h) = 70h + 45\]

How much for 3 hours? $C(3) = 70(3) + 45 = 255$ dollars.

What does $C(0) = 45$ mean? Even with zero hours of labor, you pay the $45 service call fee.

4.2 Using a Diagram to Build a Model

Sometimes the relationship is embedded in a geometric or physical situation.

Example: A 300-gallon tank is being drained at 20 gallons per minute. Write a function for the volume $V(t)$ after $t$ minutes. When will the tank be empty?

  • Initial value: $V(0) = 300$ β†’ $b = 300$
  • Rate of change: losing water β†’ $m = -20$
\[V(t) = -20t + 300\]

When empty? Set $V(t) = 0$: $-20t + 300 = 0 \Rightarrow t = 15$ minutes.

Domain restriction: $0 \le t \le 15$ (volume can’t be negative).

4.3 Cost, Revenue, and Profit Models

These are classic business applications.

  • Cost function: $C(x) = (\text{variable cost per unit}) \cdot x + (\text{fixed costs})$
  • Revenue function: $R(x) = (\text{price per unit}) \cdot x$
  • Profit function: $P(x) = R(x) - C(x)$
  • Break-even point: where $P(x) = 0$, i.e., $R(x) = C(x)$

Example: A company produces widgets. Fixed costs are $2000/month. Each widget costs $5 to make and sells for $12.

\[C(x) = 5x + 2000, \quad R(x) = 12x\] \[P(x) = 12x - (5x + 2000) = 7x - 2000\]

Break-even: $7x - 2000 = 0 \Rightarrow x \approx 286$ widgets.

The company must sell at least 286 widgets per month to avoid a loss.

Key insight: In linear cost/revenue models, profit is also linear. The slope of the profit function equals (price per unit) βˆ’ (variable cost per unit), often called the contribution margin.


5 β€” Fitting Linear Models to Data

5.1 Scatter Plots

Scatter Plot: A graph with data points plotted as ordered pairs $(x, y)$ on a coordinate plane. Used to visualize relationships between two quantitative variables.

Patterns to look for:

  • Linear (positive): Points cluster around a line sloping upward.
  • Linear (negative): Points cluster around a line sloping downward.
  • No linear pattern: Points are scattered with no discernible direction.
  • Nonlinear: Points follow a curve (quadratic, exponential, etc.).

5.2 Line of Best Fit (Least-Squares Regression)

Least-Squares Regression Line: The line $\hat{y} = mx + b$ that minimizes the sum of the squared residuals:

\[\text{SSE} = \sum_{i=1}^{n} (y_i - \hat{y}_i)^2\]

The formulas for slope and intercept are:

\[m = \frac{n \sum x_i y_i - \sum x_i \sum y_i}{n \sum x_i^2 - \left(\sum x_i\right)^2}\] \[b = \bar{y} - m\bar{x}\]

where $\bar{x}$ and $\bar{y}$ are the means of the $x$- and $y$-values.

In practice, you use a calculator or software (Excel, Python, etc.) to compute this.

Example: Five students’ study hours and exam scores:

Hours ($x$) Score ($y$)
1 55
2 60
3 70
4 75
5 85

$\bar{x} = 3$, $\bar{y} = 69$

$\sum x_i y_i = 1(55) + 2(60) + 3(70) + 4(75) + 5(85) = 55 + 120 + 210 + 300 + 425 = 1110$

$\sum x_i = 15$, $\sum y_i = 345$, $\sum x_i^2 = 55$

\[m = \frac{5(1110) - (15)(345)}{5(55) - 15^2} = \frac{5550 - 5175}{275 - 225} = \frac{375}{50} = 7.5\] \[b = 69 - 7.5(3) = 69 - 22.5 = 46.5\]

Regression line: $\hat{y} = 7.5x + 46.5$

Interpretation: Each additional hour of study is associated with a 7.5-point increase in exam score. A student who studies 0 hours would be predicted to score 46.5 (the model’s baseline).

5.3 Interpolation vs. Extrapolation

  • Interpolation: Using the model to predict within the range of observed $x$-values. Generally reliable.
  • Extrapolation: Using the model to predict outside the range of observed data. Can be highly unreliable.

Extrapolation danger: In the study-hours example ($x$ ranged 1–5), predicting the score for $x = 20$ hours gives $\hat{y} = 7.5(20) + 46.5 = 196.5$, which is impossible for a 100-point exam. Linear models break down outside their valid range.

5.4 Correlation Coefficient

Correlation Coefficient ($r$): A number in $[-1, 1]$ that measures the strength and direction of the linear relationship between $x$ and $y$.

\(r = \frac{n\sum x_i y_i - \sum x_i \sum y_i}{\sqrt{\left[n\sum x_i^2 - (\sum x_i)^2\right]\left[n\sum y_i^2 - (\sum y_i)^2\right]}}\)

Interpreting $r$:

$r$ value Meaning
$r = 1$ Perfect positive linear relationship
$0.7 \le r < 1$ Strong positive correlation
$0.3 \le r < 0.7$ Moderate positive correlation
$0 < r < 0.3$ Weak positive correlation
$r = 0$ No linear correlation
$-1 < r < 0$ Negative correlation (same strength scale)
$r = -1$ Perfect negative linear relationship

Coefficient of Determination ($r^2$): The fraction of the variation in $y$ that is explained by the linear model.

If $r = 0.9$, then $r^2 = 0.81$, meaning 81% of the variation in $y$ is explained by the linear relationship with $x$.

Correlation β‰  Causation: A high $|r|$ does not imply that $x$ causes $y$. There may be confounding variables or coincidental patterns. Correlation measures association, not causation.


Key Takeaways

  1. Linear functions have the form $f(x) = mx + b$ β€” constant rate of change, straight-line graph.
  2. Slope $= \dfrac{\text{rise}}{\text{run}} = \dfrac{\Delta y}{\Delta x}$ tells you how much $y$ changes per unit increase in $x$.
  3. Three forms of linear equations serve different purposes:
    • Slope-intercept ($y = mx + b$): easiest for graphing and reading slope/$y$-intercept.
    • Point-slope ($y - y_1 = m(x - x_1)$): best when you know a point and slope.
    • Standard form ($Ax + By = C$): useful for finding intercepts and handling vertical lines.
  4. Parallel lines have equal slopes; perpendicular lines have slopes that are negative reciprocals.
  5. Modeling: Look for constant rates of change in real-world problems β€” those are linear models.
  6. Line of best fit minimizes squared residuals; the correlation coefficient $r$ measures fit strength.
  7. Interpolation (within data range) is trustworthy; extrapolation (outside data range) is risky.

Practice Questions

Q1. Find the slope of the line passing through $(-3, 7)$ and $(5, -1)$.

Answer:
\(m = \frac{-1 - 7}{5 - (-3)} = \frac{-8}{8} = -1\)

Q2. Write the equation of the line with slope $-\dfrac{2}{5}$ passing through $(10, 3)$ in slope-intercept form.

Answer:
$y - 3 = -\dfrac{2}{5}(x - 10)$

$y - 3 = -\dfrac{2}{5}x + 4$

$y = -\dfrac{2}{5}x + 7$

Q3. Are the lines $4x - 6y = 12$ and $2x - 3y = 9$ parallel, perpendicular, or neither?

Answer:
Line 1: $-6y = -4x + 12 \Rightarrow y = \dfrac{2}{3}x - 2$, so $m_1 = \dfrac{2}{3}$.

Line 2: $-3y = -2x + 9 \Rightarrow y = \dfrac{2}{3}x - 3$, so $m_2 = \dfrac{2}{3}$.

$m_1 = m_2$ and intercepts differ β†’ Parallel.

Q4. Write the equation of the line perpendicular to $y = 4x - 1$ that passes through $(8, 2)$.

Answer:
Perpendicular slope: $m = -\dfrac{1}{4}$

$y - 2 = -\dfrac{1}{4}(x - 8)$

$y = -\dfrac{1}{4}x + 2 + 2 = -\dfrac{1}{4}x + 4$

Q5. A car rental company charges $35 per day plus $0.15 per mile. Write a linear model for total cost $C(m)$ in terms of miles driven $m$ for a one-day rental. What is the cost for 200 miles?

Answer:
\(C(m) = 0.15m + 35\)

$C(200) = 0.15(200) + 35 = 30 + 35 = 65$ dollars.

Q6. Given the regression line $\hat{y} = -2.5x + 80$ fitted to data where $x$ ranges from 0 to 10, predict $y$ when $x = 7$. Is this interpolation or extrapolation?

Answer:
$\hat{y} = -2.5(7) + 80 = -17.5 + 80 = 62.5$

Since $x = 7$ is within the data range $[0, 10]$, this is interpolation.

Q7. If the correlation coefficient between two variables is $r = -0.85$, describe the relationship and find $r^2$.

Answer:
$r = -0.85$ indicates a strong negative linear relationship β€” as $x$ increases, $y$ tends to decrease.

$r^2 = (-0.85)^2 = 0.7225$

About 72.25% of the variation in $y$ is explained by the linear relationship with $x$.


← Back to Algebra & Trigonometry Index