Functions Lesson
Hello. Functions are the language of mathematics — they describe how one thing depends on another. I will teach you everything from scratch: what functions are, how to combine them, how to reverse them, and how to draw them. Let us begin.
What is a Function?
A function is a machine that takes an input, does something to it, and gives you exactly one output. Think of a juicer: you put in an orange (input), you get orange juice (output). You never put in one orange and get two different kinds of juice — that would not be a function!
Function Notation
We write functions like this: f(x) = x². This is read as "f of x equals x squared." The x is the input, and f(x) is the output.
If f(x) = x², then:
f(2) = 2² = 4
f(−3) = (−3)² = 9
f(a) = a²
The letter f is just the name of the function. We can call them g, h, or anything else: g(x) = 2x + 1, h(x) = 1/x, and so on.
Domain and Range
The domain is the set of all possible inputs. The range is the set of all possible outputs.
For f(x) = x² with domain all real numbers, the range is y ≥ 0 (because squaring any real number gives zero or a positive number).
We cannot take the square root of a negative number (in real numbers).
So we need x ≥ 0.
We cannot divide by zero.
So x cannot be 0.
Teacher's Tip: A function must give exactly one output for each input. If you can draw a vertical line anywhere on the graph and it touches more than once, it is NOT a function. This is called the vertical line test.
Composite Functions
A composite function is when you apply one function and then another. It is like a production line: one machine does its job, then passes the result to the next machine.
fg(x) means: apply g first, then apply f to the result. Read it from right to left: g gets the input first, then f.
fg(3): first apply g(3) = 3 + 1 = 4, then f(4) = 4² = 16.
So fg(3) = 16
gf(3): first apply f(3) = 3² = 9, then g(9) = 9 + 1 = 10.
So gf(3) = 10
fg(x) = f(g(x))
First, g(x) = x + 3
Now apply f to (x + 3): f(x + 3) = 2(x + 3)
= 2x + 6
Teacher's Tip: fg(x) and gf(x) are usually different. Order matters! Always work from right to left: the function closest to x is applied first.
Inverse Functions
An inverse function undoes what the original function did. If f(x) turns an input into an output, then f⁻¹(x) turns that output back into the original input. Think of it as the "rewind" button.
How to Find the Inverse
Step 1: Write y = f(x)
Step 2: Swap x and y
Step 3: Rearrange to make y the subject
Step 4: Write as f⁻¹(x) = ...
Step 1: Write y = 2x + 3
Step 2: Swap: x = 2y + 3
Step 3: Rearrange: x - 3 = 2y → y = (x - 3)/2
Step 4: f⁻¹(x) = (x - 3)/2
Domain Restriction for One-to-One
A function must be one-to-one (each output comes from exactly one input) to have an inverse. f(x) = x² is not one-to-one over all real numbers because f(2) = 4 and f(−2) = 4 — two inputs give the same output.
Solution: restrict the domain. If we take f(x) = x² with domain x ≥ 0, then it becomes one-to-one, and its inverse is f⁻¹(x) = √x.
y = x² with x ≥ 0 means y ≥ 0.
Swap: x = y², y ≥ 0.
Rearrange: y = √x (positive square root, since y ≥ 0).
Teacher's Tip: The graph of f⁻¹ is the reflection of the graph of f in the line y = x. If you fold the paper along y = x, the graphs match up perfectly.
Graphs of Functions
The graph of a function shows the relationship between input (x) and output (y = f(x)). Here are the common types you need to know:
Linear: f(x) = mx + c
A straight line. m is the gradient (slope), c is the y-intercept.
Example: f(x) = 2x + 1 — gradient 2, crosses y-axis at (0, 1).
Quadratic: f(x) = ax² + bx + c
A parabola — U-shaped if a > 0, inverted-U if a < 0. Has one turning point (vertex).
Cubic: f(x) = ax³ + bx² + cx + d
An S-shaped curve. Can have up to two turning points and up to three roots.
Reciprocal: f(x) = a/x
A hyperbola with two branches. Has asymptotes at x = 0 and y = 0 (the axes). Never touches them — gets infinitely close.
The graph has two separate curves: one in quadrant 1 (top-right) and one in quadrant 3 (bottom-left).
Vertical asymptote: x = 0 (the y-axis). The graph never crosses it.
Horizontal asymptote: y = 0 (the x-axis). The graph approaches but never reaches it.
Teacher's Tip: When sketching, always label: axes, intercepts, asymptotes (if any), and turning points. A sketch does not need to be perfect — it needs to show the key features.
Transformations of Functions
Transformations let us take a basic function and shift, stretch, or flip it. If you know the graph of f(x), you can draw the graph of the transformed version.
Translations (Shifting)
y = f(x) + 3 moves the graph up by 3. y = f(x + 2) moves the graph left by 2. This often confuses students: + inside the bracket moves left.
Stretches
y = 2f(x) makes the graph twice as tall. y = f(2x) squashes the graph to half its width.
Reflections
Starting from f(x) = x²:
Inside the bracket: (x − 3) means shift right by 3.
Outside: +2 means shift up by 2.
Teacher's Tip: For horizontal translations, remember: "inside the bracket, opposite direction." x − 3 means move right. x + 2 means move left. For stretches: y = f(2x) looks squashed horizontally.
Try different functions and transformations — drag the sliders to see the effect.
y = x²
Key Features of Functions
When studying any function, there are several key features you should always identify:
Roots (x-intercepts)
Where the graph crosses the x-axis. Found by solving f(x) = 0.
y-intercept
Where the graph crosses the y-axis. Found by calculating f(0).
Asymptotes
Lines the graph approaches but never touches. Vertical asymptotes occur where the function is undefined (e.g., x = 0 for f(x) = 1/x). Horizontal asymptotes describe what happens as x → ±∞.
Turning Points
Points where the graph changes direction. For quadratics, this is the vertex. A point can be a local minimum or maximum.
The function is undefined when the denominator is zero: x − 2 = 0 → x = 2.
So vertical asymptote at x = 2.
As x → ±∞, 1/(x − 2) → 0, so y → 3.
So horizontal asymptote at y = 3.
Roots: x² − 4x + 3 = 0 → (x − 1)(x − 3) = 0 → x = 1 or x = 3.
y-intercept: f(0) = 0 − 0 + 3 = 3 → (0, 3).
Turning point: Complete the square: (x − 2)² − 1, so vertex at (2, −1).
Teacher's Tip: Asymptotes are like "force fields" the graph cannot cross. For rational functions (fractions), vertical asymptotes come from the denominator being zero. Horizontal asymptotes come from comparing the degrees of numerator and denominator.
Domain and Range — In Depth
Natural Domain
The natural domain is the set of all real numbers for which the function is defined, unless otherwise stated. Watch out for:
• Division by zero — denominator cannot be zero
• Square roots — inside must be ≥ 0
• Logarithms — inside must be > 0
Range from Graph
The range is the set of all possible y-values the function can output. To find it: think about the minimum and maximum y-values on the graph, and check what happens at asymptotes.
Restricted Domain
Sometimes a domain is deliberately restricted (e.g., "for x ≥ 0") to make a function one-to-one so it has an inverse, or to match a real-world context.
Domain: Inside square root must be ≥ 0: x − 1 ≥ 0 → x ≥ 1.
Range: √(anything) ≥ 0. The smallest value is √0 = 0 (at x = 1). Gets larger without bound.
Domain: denominator ≠ 0 → x + 3 ≠ 0 → x ≠ −3.
Range: The horizontal asymptote is y = −1 (as x → ±∞, 2/(x+3) → 0). The function never reaches y = −1.
Teacher's Tip: For range, always check: what is the smallest y can be? What is the largest? Are there any gaps (asymptotes)? Sketching the graph is the easiest way to see the range.
Practice — Step by Step
Solve each problem one step at a time. Type your answer for each step and click Check Step. You must get each step correct before moving to the next.
↑ Back to menuMastery Kit
- Function notation tip: f(x) does NOT mean "f times x." It means "the value of f at x." Think of it as a label, not multiplication.
- Composite order: fg(x) = f(g(x)) — apply g first, then f. Read right-to-left. The function touching x goes first.
- Inverse shortcut: For f(x) = (ax + b)/(cx + d), the inverse is f⁻¹(x) = (−dx + b)/(cx − a). Learn this for speed.
- Domain tricks: Denominator ≠ 0, square root inside ≥ 0. Those two rules cover 90% of domain problems.
- Range via graph: Sketch the graph mentally. Where are the highest and lowest points? Are there asymptotes? That gives you the range.
- Function = one output per input: The vertical line test never lies. If a vertical line hits the graph twice, it is not a function.
- f⁻¹ means inverse, not reciprocal: f⁻¹(x) ≠ 1/f(x). The −1 is not an exponent; it is notation for the inverse function.
- Domain before range: You cannot find the range until you know the domain. Always find domain first.
- Transformations order matters: Horizontal shifts and stretches affect x. Vertical shifts and stretches affect y. Do stretches first, then translations.
- Asymptotes are lines: They can be horizontal (y = constant), vertical (x = constant), or oblique (slanted). Always label them on sketches.
- Confusing fg and gf: fg(x) means do g first, then f. gf(x) is the opposite. They are almost never equal.
- Forgetting to restrict domain for inverse: f(x) = x² does NOT have an inverse over all real numbers. You must restrict the domain (usually to x ≥ 0) first.
- Wrong direction for horizontal shifts: y = f(x + 2) shifts left, not right. The "opposite direction" rule inside the bracket.
- Thinking f⁻¹(x) = 1/f(x): This is a very common error. f⁻¹ is the inverse function, not the reciprocal. 1/f(x) would be written as [f(x)]⁻¹.
- Missing domain restrictions from context: If a function models a real situation, the domain may be restricted (e.g., time cannot be negative). Always consider context.
The Golden Rule of Functions
Always start with the domain. The domain determines everything — the range, whether an inverse exists, and what transformations do. Master the domain, and functions become simple.
You Have Completed the Functions Lesson
Here is what you have learned:
- ✅ What a function is — a machine that gives one output per input
- ✅ Composite functions: fg(x) = f(g(x)) — apply g first, then f
- ✅ Inverse functions: f⁻¹(x) — swap x and y, rearrange, restrict domain if needed
- ✅ Graphs of linear, quadratic, cubic, and reciprocal functions
- ✅ Transformations: translations, stretches, and reflections
- ✅ Key features: roots, intercepts, asymptotes, turning points
- ✅ Domain and range — natural domain, range from graph, restricted domain
Well done. You now understand functions — the foundation of all advanced mathematics.