School › Grade 8

Functions

Grade 8 · Unit 5

📖 Short lecture

A function assigns exactly one output to each input. It can be shown as a mapping, a table, a graph or an equation such as $y=3x-1$. The input $x$ is the independent variable and the output $y$ is the dependent variable.

A linear function has a constant rate of change and a straight-line graph, $y=mx+b$. A nonlinear function, such as $y=x^2$ or $y=2^x$, does not have a constant rate of change. Graphs can also be described qualitatively: increasing, decreasing or constant over an interval.

⚠️ Common mistakes

  • Two inputs may share an output ($f(1)=f(-1)=1$ for $f(x)=x^2$); that is still a function. Not allowed: one input with two outputs.
  • $f(3)$ does not mean $f\times3$: it means “replace $x$ by $3$”.
  • A table is linear only if $\Delta y$ is constant for equal steps in $x$.

🔑 Key formulas

$$y=mx+b$$
Linear function
$$\text{rate of change}=\frac{\Delta y}{\Delta x}$$
Rate of change
$$y=x^2,\quad y=2^x$$
Nonlinear functions
$$\text{each input }x\;\longmapsto\;\text{exactly one output }y$$
Definition of a function
$$\text{vertical line meets the graph at most once}$$
Vertical line test

✏️ Worked example

Is the function with $x=0,1,2,3$ and $y=5,8,11,14$ linear? If so, write its equation.

  1. $\displaystyle \Delta y=3\text{ for each }\Delta x=1$
  2. $\displaystyle m=3,\quad b=5$
  3. $\displaystyle y=3x+5$

✔ Yes: $y=3x+5$.

🧮 More worked examples

Each step says what we do and why.

Example 2For $f(x)=3x-2$ find $f(4)$, $f(-1)$, and the $x$ with $f(x)=13$.

  1. Substitute the inputs.$$f(4)=3(4)-2=10,\qquad f(-1)=3(-1)-2=-5$$
  2. Work backwards from the output: solve an equation.$$3x-2=13\;\Rightarrow\;x=5$$
✔ $f(4)=10$, $f(-1)=-5$, $x=5$.

Example 3Is the table $x=1,2,3,4$; $y=2,4,8,16$ linear?

  1. The $x$-steps are equal ($+1$). Compute the differences in $y$.$$\Delta y=2,\;4,\;8$$
  2. The differences are not constant; each $y$ is doubled.$$y=2^x$$
✔ Nonlinear (exponential): $y=2^x$.

Example 4Compare $f(x)=2x+3$ with the function $g$ given by $x=0,2,4$; $g=1,7,13$.

  1. Rate of change of $g$:$$\frac{7-1}{2-0}=3$$
  2. Rate of $f$ is $2$; initial values $f(0)=3$, $g(0)=1$.$$3\gt2,\qquad1\lt3$$
✔ $g$ grows faster, but $f$ starts higher.

🖐️ Interactive demo & illustration

Move the sliders or press the buttons: the figure and the numbers update immediately. Try to predict the result before you look.

🎬 Function machine: input → output → graph

Pick a rule and feed the inputs one by one. Each input gives exactly one output, which is written in the table and plotted. Look at the differences $\Delta y$: equal differences mean a linear function.

🌍 Modelling problems

Real-life situations: translate the words into mathematics, solve, then interpret the answer.

🔋 Phone battery

A phone starts at $100\%$ and loses $8\%$ per hour. Write $B(t)$. What is the charge after $4.5$ h? When is it empty?

Show the solution
  1. Constant loss per hour → linear function.$$B(t)=100-8t$$
  2. After $4.5$ h:$$B(4.5)=100-36=64$$
  3. Empty when $B=0$:$$8t=100\;\Rightarrow\;t=12.5$$

✔ $64\%$; empty after $12.5$ hours.

🦠 Doubling bacteria

A culture starts with $50$ bacteria and doubles every hour. Write $N(t)$ and find $N(5)$. Is it linear?

Show the solution
  1. Doubling means multiplying by $2$ each hour.$$N(t)=50\cdot2^t$$
  2. After $5$ hours:$$N(5)=50\cdot32=1600$$
  3. Differences $50,100,200,\ldots$ are not constant.

✔ $N(5)=1600$; nonlinear.

🅿️ Parking fees

Parking costs $10$ AED for the first hour and $5$ AED for each extra hour. Write $C(h)$ for $h\ge1$ hours and find $C(6)$.

Show the solution
  1. Extra hours: $h-1$.$$C(h)=10+5(h-1)=5h+5$$
  2. For $6$ hours:$$C(6)=35$$

✔ $C(h)=5h+5$; $35$ AED.

✅ Multiple-choice quiz

📝 Short essay

A taxi costs 5 AED plus 2 AED per km. Explain why the cost is a linear function of the distance and describe its graph.