Functions: notation, graphs and linear functions
What makes a relation a function, f(x) notation, domain and range, the vertical line test, and the graph of f(x) = mx + n read from slope and intercept.
First, the rules
One input, one output
Replace every x by the input, brackets and all.
Inside first. In general f ∘ g ≠ g ∘ f.
m = slope = rise / run; n = y-intercept. Parallel lines share m. Through (x₁, y₁) and (x₂, y₂): m = (y₂ − y₁) / (x₂ − x₁).
See it
Slope and intercept
Move m and n. The small step shows "one right, m up". Negative m tilts the line down; n slides it up and down without turning it.
Step by step
Worked examples
Evaluating and solving
notationf(x) = x² − 3x + 1. Find f(−2), f(a + 1), and the values of x with f(x) = 1.
Ask yourself: Every x gets replaced by the same thing — in brackets.
Show the solution
- f(−2) = (−2)² − 3(−2) + 1 = 4 + 6 + 1 = 11.
- f(a + 1) = (a + 1)² − 3(a + 1) + 1 = a² + 2a + 1 − 3a − 3 + 1 = a² − a − 1.
- x² − 3x + 1 = 1 ⇒ x(x − 3) = 0 ⇒ x = 0 or x = 3.
Answer 11; a² − a − 1; x ∈ {0, 3}
Composition and inverse
f ∘ g, f⁻¹f(x) = 2x − 5 and g(x) = x² + 1. Find (f ∘ g)(2), (g ∘ f)(2) and f⁻¹(x).
Ask yourself: Inside first: g(2) before f. For the inverse, swap the letters.
Show the solution
- g(2) = 5, f(5) = 5, so (f ∘ g)(2) = 5.
- f(2) = −1, g(−1) = 2, so (g ∘ f)(2) = 2 — different order, different answer.
- Inverse: y = 2x − 5 → swap → x = 2y − 5 → y = x + 52. Check: f⁻¹(f(4)) = f⁻¹(3) = 4 ✓.
Answer 5; 2; f⁻¹(x) = x + 52
The line through two points
linear functionA linear function has f(1) = 4 and f(3) = 10. Find f(x) and the point where its graph crosses the x-axis.
Ask yourself: Two points give the slope; one point then gives n.
Show the solution
- Slope: m = 10 − 43 − 1 = 3.
- Through (1, 4): 4 = 3 · 1 + n ⇒ n = 1, so f(x) = 3x + 1.
- x-intercept where f(x) = 0: 3x + 1 = 0 ⇒ x = −13.
Answer f(x) = 3x + 1; crosses at (−13, 0)
Practice: functions
0 / 0Evaluate, compose, invert, find a slope or a domain — numbers typed, forms chosen. Your best score is kept in this browser only.
About this lesson
Functions for high school: the definition (each input, one output), f(x) notation and evaluating f(2) or f(a + 1), domain and range, the vertical line test, even and odd functions, composition f(g(x)) and inverse functions, and linear functions f(x) = mx + n — slope as rise over run, the y-intercept, parallel lines, and the line through two points. Move the slope and intercept yourself, then practise.
Part of Learn mathematics · Grade 10 · Functions. Check a number with the scientific calculator or draw a function with the function plotter. Everything on this page runs in your browser; nothing you type is sent or stored, and your practice score stays in this browser only. Spotted an error? Tell us.