The General Linear Model $f(x) = mx + c$
A linear function represents a relationship where a dependent variable changes at a constant rate relative to the independent variable:
Interpreting Parameters in IB Contexts:
- Gradient ($m$): The rate of change of $y$ per unit increase in $x$. Must always be stated with combined units (e.g., dollars per hour, meters per second).
- Vertical Intercept ($c$): The initial value of $y$ when $x = 0$ (e.g., call-out fee, deposit, base temperature).
- Horizontal Intercept (Root): The value of $x$ when $f(x) = 0$ (e.g., time when a tank is completely empty).
Realistic Domain and Range Constraints
While the mathematical domain of $f(x) = mx + c$ is all real numbers ($\mathbb{R}$), practical applied models have natural physical boundaries:
- Non-negativity: Real variables such as time ($t \ge 0$), distance ($d \ge 0$), mass, or population cannot be negative.
- Upper bounds: Physical systems have limits (e.g., max tank capacity, maximum vehicle speed, finite lifespan).
Piecewise Linear Functions
Many real-world pricing structures, electricity tariffs, and tax brackets are modeled using piecewise linear functions, where different gradients apply across different intervals:
Data Fitting, Residuals & Piecewise Tariffs
- For bivariate observations, fit a least-squares regression line using paired lists. A residual is defined as $e = y - \hat{y}$: a positive residual indicates the model underpredicts the true observed value. Always inspect residual plots for curved patterns or influential outliers.
- Worked Data Example: Points $(1, 3)$, $(2, 5)$, and $(3, 8)$ give mean point $(\bar{x}, \bar{y}) = (2, \frac{16}{3})$, slope $m = 2.5$, and $y$-intercept $c = \frac{1}{3}$. Residuals at $x = 1, 2, 3$ are $\frac{1}{6}$, $-\frac{1}{3}$, and $\frac{1}{6}$, which sum to exactly $0$.
- For piecewise pricing models, calculate cost using the excess quantity in subsequent tiers ($x - x_0$) to ensure baseline allowances are not charged redundantly. Always verify continuity at boundary transition points and state realistic domains ($x \ge 0$).
A plumber charges a callout fee plus an hourly labour rate. A 2-hour job costs $140, and a 5-hour job costs $275. Find the linear model $C(t) = mt + c$ for the total cost $C$ after $t$ hours.
Solution:
$m = \frac{275 - 140}{5 - 2} = \frac{135}{3} = 45$ [M1][A1]
$140 = 45(2) + c \implies 140 = 90 + c \implies c = 50$ [M1]
$C(t) = 45t + 50$ [A1]
For the plumber in Exercise 1, state the physical meaning of the gradient $45$ and the vertical intercept $50$ in the context of the problem.
Solution:
Gradient 45: The hourly labour rate is $45 per hour. [A1][R1]
Intercept 50: The initial fixed callout fee is $50 (charged regardless of hours worked). [A1]
A water tank containing 1200 litres of water begins draining at a constant rate of 25 litres per minute.
- Write down a linear function $V(t)$ for the volume remaining after $t$ minutes.
- Find the time taken for the tank to empty completely, and state the practical domain of the model.
Solution:
(a) $V(t) = 1200 - 25t$ [A1]
(b) Set $V(t) = 0 \implies 1200 - 25t = 0 \implies t = \frac{1200}{25} = 48\text{ minutes}$. [M1][A1]
Practical domain: $0 \le t \le 48$ minutes. [A1]
The temperature $T$ ($^\circ\text{C}$) at altitude $h$ (meters above sea level) is modeled by $T(h) = 28 - 0.0065h$.
- Find the temperature at sea level ($h = 0$).
- Calculate the altitude at which the temperature reaches the freezing point ($0^\circ\text{C}$).
Solution:
(a) $T(0) = 28 - 0.0065(0) = 28^\circ\text{C}$. [A1]
(b) Set $T(h) = 0 \implies 28 - 0.0065h = 0$ [M1]
$h = \frac{28}{0.0065} = 4307.69... \approx 4310\text{ meters}$. [A2]
Explain why a linear model for temperature $T(h) = 28 - 0.0065h$ is no longer valid for very large altitudes such as $h = 50,000\text{ meters}$.
Solution:
At $h = 50,000\text{ m}$, $T = 28 - 0.0065(50000) = 28 - 325 = -297^\circ\text{C}$, which is below absolute zero ($-273.15^\circ\text{C}$), a physical impossibility. [R2]
The tropospheric lapse rate only holds up to roughly 11,000 meters before entering the stratosphere. [A1]
A car rental company offers two options for a single day: Option A costs $40 plus $0.20 per km. Option B costs $65 with unlimited free kilometers. Determine the distance after which Option B becomes cheaper.
Solution:
Cost A: $C_A(x) = 40 + 0.20x$. Cost B: $C_B(x) = 65$. [M1]
Set $C_A(x) > C_B(x) \implies 40 + 0.20x > 65$ [M1]
$0.20x > 25 \implies x > \frac{25}{0.20} = 125\text{ km}$. [A1]
Option B is cheaper when driving more than $125\text{ km}$. [A1]
A shipping company defines delivery cost $C(w)$ as: $C(w) = 15$ for $0 < w \le 2\text{ kg}$, and $C(w) = 15 + 4(w - 2)$ for $w > 2\text{ kg}$. Find the cost of shipping a $6.5\text{ kg}$ package.
Solution:
Since $w = 6.5 > 2$, use the second piece of the piecewise function. [M1]
$C(6.5) = 15 + 4(6.5 - 2)$ [M1]
$= 15 + 4(4.5) = 15 + 18 = 33$ dollars. [A2]
If $f(x) = -2.5x + 180$, find the inverse function $f^{-1}(x)$ and state its gradient.
Solution:
Let $y = -2.5x + 180 \implies 2.5x = 180 - y \implies x = \frac{180 - y}{2.5}$ [M1]
$f^{-1}(x) = -\frac{1}{2.5}x + \frac{180}{2.5} = -0.4x + 72$ [A1]
The gradient is $-0.4$ (or $-\frac{1}{m}$). [A1]
A manufacturing plant has fixed overhead costs of $8,000 per month and a production cost of $14 per gadget. If each gadget sells for $22, find the break-even quantity $x$.
Solution:
Cost function: $C(x) = 8000 + 14x$. Revenue function: $R(x) = 22x$. [M1]
Break-even: $R(x) = C(x) \implies 22x = 8000 + 14x \implies 8x = 8000$ [M1]
$x = 1000$ gadgets. [A1]
Two variables $u$ and $v$ are related such that $3u - 4v = 24$. Express $v$ as a linear function of $u$, and find the coordinates of the intercepts on both axes.
Solution:
$4v = 3u - 24 \implies v = \frac{3}{4}u - 6$ (or $v = 0.75u - 6$) [A1]
$v$-intercept: when $u = 0$, $v = -6 \implies (0, -6)$ [A1]
$u$-intercept: when $v = 0$, $\frac{3}{4}u = 6 \implies u = 8 \implies (8, 0)$ [M1][A1]
Using the fitted regression model $y = 2.5x + \frac{1}{3}$, predict the $y$-value at $x = 2.5$. If an actual observed observation at $x = 2.5$ is $y = 7$, compute the residual and interpret its sign in context.
Solution:
Predicted value: $\hat{y} = 2.5(2.5) + \frac{1}{3} = 6.25 + 0.3333 = \frac{79}{12} \approx 6.583$. [M1][A1]
Residual: $e = y - \hat{y} = 7 - \frac{79}{12} = \frac{5}{12} \approx +0.417$. [A1]
Interpretation: Because the residual is positive ($e > 0$), the actual observation exceeds the prediction; the linear model slightly underpredicts this data point. Although $x = 2.5$ lies within the domain (interpolation), accuracy depends on overall scatter. [R1]
A city taxi charges a base fare of $\$30$ for the first $2\text{ km}$, plus $\$8$ for each additional kilometer or fraction thereof. Write a piecewise linear cost function $C(d)$ for distance $d$ in kilometers, and calculate the total fare for a $7\text{ km}$ journey.
Solution:
Piecewise cost function: $$C(d) = \begin{cases} 30 & 0 < d \le 2 \\ 30 + 8(d - 2) & d > 2 \end{cases}$$ [M1][A1]
For $d = 7\text{ km}$, since $d > 2$: $C(7) = 30 + 8(7 - 2) = 30 + 8(5) = 30 + 40 = \$70$. [M1][A1]
Check continuity: As $d \to 2^+$, $30 + 8(0) = \$30$, so the piecewise branches meet continuously at the $2\text{ km}$ boundary. [R1]
Core Formulas (Topic 2.1 & 2.2)
| Gradient Formula | $$m = \frac{y_2 - y_1}{x_2 - x_1}$$ |
| Slope-Intercept Form | $$y = mx + c$$ |
| Point-Slope Form | $$y - y_1 = m(x - x_1)$$ |
| Break-Even Condition | $$\text{Profit} = R(x) - C(x) = 0 \iff R(x) = C(x)$$ |
Top 5 IB Exam Traps to Avoid
- Trap 1: Omitting units in rate of change: An answer stating "$m = 3$" loses the communication mark. You must write "$3\text{ kg per week}$".
- Trap 2: Ignoring domain bounds: Always check if time or distance is restricted ($t \ge 0$).
- Trap 3: Inverting the gradient: Calculating $\frac{\Delta x}{\Delta y}$ instead of $\frac{\Delta y}{\Delta x}$.
- Trap 4: Confusing $y$-intercept with root: The vertical intercept is $(0, c)$, while the root is the $x$-value where $y = 0$.
- Trap 5: Misinterpreting negative gradients: A negative gradient means decay or depletion (e.g. rate of cooling, fuel consumption).
5-Question Concept Check
Score: - / 51. In the model $C(t) = 35t + 80$, what does the value $80$ represent?
2. What is the gradient of a line passing through $(3, 15)$ and $(7, 31)$?
3. For a fuel tank volume $V(t) = 60 - 0.75t$ litres, when is the tank completely empty?
4. What is the $x$-intercept of the line $2x - 5y = 20$?
5. If revenue is $R(x) = 50x$ and cost is $C(x) = 20x + 600$, what is the break-even volume?