ResourcesMathematicsFunctions and Graphs
MathematicsHigh School

Functions and Graphs

A function is a special relationship where every input has exactly one output. Functions are used to model patterns in science, economics, engineering, and everyday life — from projectile motion to population growth.

This guide covers function notation, evaluating functions, types of functions, transformations, domain and range, worked examples with full steps, and an interactive transformation explorer.

1Introduction

Imagine you're baking a cake. The number of eggs you use depends on how many cakes you want to bake. This "depends on" relationship is at the heart of what a function is in mathematics.

A function is like a machine: you put something in (the input), and it gives you one specific thing out (the output). It never gives you two different things for the same input.

Picture This

Imagine a vending machine. When you press "A1" (input), you get a specific snack (output). You never press "A1" and sometimes get a chocolate bar and sometimes a bag of chips. That's how a function works — one input, one unique output.

Key Idea

The domain is all possible inputs (x-values). The range is all possible outputs (y-values). Every function has a domain and range.

2Key Definitions

Function

A relation where each input has exactly one output.

Domain

The complete set of all possible input values (x-values).

Range

The complete set of all possible output values (y or f(x) values).

Vertical Line Test

If any vertical line crosses a graph more than once, it's NOT a function.

Independent Variable

The input variable (usually x) whose value you choose freely.

Dependent Variable

The output variable (usually y) whose value depends on the input.

Function Notation f(x)

Read "f of x." f is the function name, x is the input, and f(x) is the output.

Input & Output

Input is the value put into a function (x). Output is the result (y or f(x)).

Vertical line test: a circle and a curve both fail the test — NOT functions
The Vertical Line Test: both graphs fail because a vertical line crosses them at two points

3Function Notation & Evaluating

Function notation like f(x) clearly shows the input and output. Read it as "f of x" — the value of function f when the input is x.

Function Machine: f(x) = 2x + 3

INPUT

x = 4

FUNCTION

2x + 3

OUTPUT

11

f(4) = 2(4) + 3 = 8 + 3 = 11  •  The point (4, 11) is on the graph

Evaluating Functions

To evaluate a function, substitute the input value for the variable and simplify.

Given f(x) = 3x - 5, find f(2):

  Replace x with 2: f(2) = 3(2) - 5

  Multiply: f(2) = 6 - 5

  f(2) = 1

Find f(-1):

  f(-1) = 3(-1) - 5

  f(-1) = -3 - 5

  f(-1) = -8

4Types of Functions

/

Linear

f(x) = mx + b

Straight line. Constant rate of change (slope m). Example: f(x) = 2x - 3

Quadratic

f(x) = ax² + bx + c

Parabola (U-shape). Has a vertex and axis of symmetry. Example: f(x) = x² - 4x + 3

~

Polynomial

f(x) = aₙxⁿ + … + a₀

Smooth curves with turns. Degree n determines shape. Example: f(x) = x³ - 2x² + x - 5

Rational

f(x) = P(x) / Q(x)

Ratio of polynomials. Can have asymptotes. Domain excludes denominator zeros. Example: f(x) = (x+1)/(x-2)

↗

Exponential

f(x) = a · bˣ

Variable in the exponent. Models growth (b > 1) or decay (0 < b < 1). Example: f(x) = 2ˣ

Piecewise

Different rules for different intervals

Multiple sub-functions "stitched together." May have breaks or jumps.

5Graphing Functions: Transformations

Start with a parent function and apply shifts, stretches, and reflections to graph many functions quickly.

Vertical Shifts

y = f(x) + c shifts UP by c  •  y = f(x) - c shifts DOWN by c

Horizontal Shifts

y = f(x - c) shifts RIGHT by c  •  y = f(x + c) shifts LEFT by c

Counter-intuitive: minus → right, plus → left!

&updownarrow;

Vertical Stretches & Compressions

y = c·f(x) where c > 1 stretches, 0 < c < 1 compresses

Reflections

y = -f(x) reflects across x-axis  •  y = f(-x) reflects across y-axis

Order of Transformations

Apply transformations in this order: (1) Horizontal shifts, (2) Stretches/compressions & reflections, (3) Vertical shifts.

Function Transformation Explorer

Interactive

Choose a parent function and adjust the sliders to see how a, h, and k transform the graph. The dashed line shows the parent.

a (stretch/reflect)
1
-303
h (horizontal shift)
0
-505
k (vertical shift)
0
-505

Equation

y = x²

Transformations Applied

No transformation (parent function)

6Domain and Range

The domain is usually all real numbers unless there's a specific restriction.

Finding Domain

Denominators — cannot divide by zero

Example: f(x) = 1/(x - 3)

  Set x - 3 = 0 → x = 3

  Domain: all reals except x = 3, or (−∞, 3) ∪ (3, ∞)

Even roots — radicand must be ≥ 0

Example: f(x) = √(x + 2)

  Set x + 2 ≥ 0 → x ≥ -2

  Domain: [-2, ∞)

Finding Range

From graphs

Look at the lowest and highest y-values the graph reaches. For y = x², the graph starts at y = 0 and goes up forever. Range: [0, ∞).

Quadratic functions

If a > 0 (opens up): range = [y-vertex, ∞). If a < 0 (opens down): range = (−∞, y-vertex].

Linear functions

Unless it's a horizontal line, the range is all real numbers (−∞, ∞).

Graph of y = x squared showing domain (all real numbers along x-axis) and range (y >= 0)
Domain and range of y = x²: domain is all real numbers, range is y ≥ 0

7Worked Examples

Example 1: Evaluating a FunctionBasic

Problem: Given f(x) = 2x + 3, find f(4)

Step 1: Substitute x = 4 into the equation

Step 2: f(4) = 2(4) + 3

Step 3: f(4) = 8 + 3

Answer: f(4) = 11

Example 2: Finding DomainBasic

Problem: Find the domain of f(x) = 1/(x - 2)

Step 1: Identify restriction — denominator cannot be zero

Step 2: Set denominator = 0: x - 2 = 0

Step 3: Solve: x = 2

Step 4: Exclude x = 2 from domain

Answer: x ≠ 2, or (−∞, 2) ∪ (2, ∞)

Example 3: Finding a Function Rule from a TableBasic

Problem: Given x: 1, 2, 3 and f(x): 3, 5, 7 — find the function rule.

Step 1: Find pattern: f(x) increases by 2 each time x increases by 1

Step 2: Slope (rate of change) = 2/1 = 2

Step 3: Linear form: f(x) = 2x + b

Step 4: Use point (1, 3): 3 = 2(1) + b

Step 5: 3 = 2 + b → b = 1

Answer: f(x) = 2x + 1

Example 4: Graphing with TransformationsIntermediate

Problem: Graph f(x) = (x - 2)² + 1 using transformations

Step 1: Parent function: y = x² (parabola, vertex at origin)

Step 2: (x - 2)² → horizontal shift RIGHT by 2

Step 3: + 1 → vertical shift UP by 1

Step 4: New vertex at (2, 1), opens upward

Answer: Parabola with vertex (2, 1), opening upward

Example 5: Composite FunctionsAdvanced

Problem: Given f(x) = x + 2 and g(x) = x², find f(g(3))

Step 1: Start with innermost function: g(3)

Step 2: g(3) = 3² = 9

Step 3: Now evaluate f(9): f(9) = 9 + 2

Answer: f(g(3)) = 11

8Memory Aids

"Vending Machine" = Function

One button (input) always gives one snack (output). If a button could give different snacks, it wouldn't be a function.

"Opposite Inside" for Horizontal Shifts

f(x - 3) shifts RIGHT (opposite of minus). f(x + 3) shifts LEFT (opposite of plus). The direction is always the opposite of the sign inside.

"Domain = Doorway, Range = Rooftop"

Domain is what you walk through (inputs, x-axis, horizontal). Range is how high you can reach (outputs, y-axis, vertical).

"Inside Out" for Composite Functions

For f(g(x)), always evaluate the innermost function first (g), then plug the result into the outer function (f).

"VLT = Vertical Line Test"

Draw vertical lines (like prison bars) across the graph. If a bar ever touches two points, the graph is "not free" to be a function.

9Common Mistakes to Avoid

Confusing Domain and Range

Wrong: "The domain of f(x) = x² is y ≥ 0"

Right: Domain = inputs (x-values) = all real numbers. Range = outputs (y-values) = y ≥ 0.

Mixing Up Horizontal Shift Directions

Wrong: "f(x - 3) shifts the graph LEFT by 3"

Right: f(x - 3) shifts RIGHT by 3. The sign inside is the opposite of the shift direction.

Misusing the Vertical Line Test

Wrong: Using a horizontal line test, or thinking one intersection means "not a function"

Right: Only vertical lines. If any vertical line touches the graph at more than one point, it fails.

Forgetting Denominator Restrictions

Wrong: "The domain of f(x) = 1/(x-2) is all real numbers"

Right: x = 2 makes the denominator zero, so x ≠ 2. Domain: (−∞, 2) ∪ (2, ∞).

Forgetting Square Root Restrictions

Wrong: "The domain of f(x) = √(x - 5) is all real numbers"

Right: Need x - 5 ≥ 0, so x ≥ 5. Domain: [5, ∞).

Wrong Order of Operations When Evaluating

Wrong: f(x) = 2x + 3, f(4) = 2 · 4 + 3 = 2 · 7 = 14

Right: Follow PEMDAS: f(4) = 2(4) + 3 = 8 + 3 = 11. Multiply first, then add.

Assuming All Relations Are Functions

Wrong: "{(1,2), (2,3), (2,4)} is a function"

Right: Input 2 maps to both 3 and 4 — that violates the "one input, one output" rule. Not a function.

10Quick Revision Summary

  • A function maps each input to exactly one output.
  • Domain = all possible inputs (x). Range = all possible outputs (y).
  • The Vertical Line Test checks if a graph is a function.
  • f(x) is function notation — f is the name, x is the input, f(x) is the output.
  • Common types: linear, quadratic, polynomial, rational, exponential, piecewise.
  • f(x - c) shifts right, f(x + c) shifts left (opposite of sign!).
  • f(x) + c shifts up, f(x) - c shifts down.
  • -f(x) reflects across x-axis, f(-x) reflects across y-axis.
  • Domain restrictions: no zero denominators, no negative square roots.
  • Composite functions f(g(x)): evaluate inside-out.

Frequently Asked Questions

What is the easiest way to tell if a graph is a function?

Use the Vertical Line Test. Draw (or imagine) vertical lines across the graph. If every vertical line touches the graph at most once, it’s a function. If any vertical line crosses it more than once, it is NOT a function.

What’s the difference between domain and range?

The domain is the set of all possible input values (x-values), and the range is the set of all possible output values (y-values). Think of domain as "what can I put in?" and range as "what can come out?".

Why does f(x − 3) shift the graph to the RIGHT instead of left?

It’s counter-intuitive! In f(x − 3), the function "needs" x to be 3 units larger to produce the same output. So the original point at x = 0 now appears at x = 3, effectively shifting everything to the right.

Can a function have two different outputs for the same input?

No — that’s the defining rule of a function. Each input must map to exactly one output. If an input maps to two different outputs, the relation is not a function.

How do I find the domain of a function with a square root?

Set the expression under the square root greater than or equal to zero and solve. For example, for f(x) = √(x − 3), you need x − 3 ≥ 0, so x ≥ 3. The domain is [3, ∞).

Practice Quiz

Test your understanding — select the correct answer for each question.

1.What is the vertical line test used for?

2.In function notation f(x), what does x represent?

3.What is the range of f(x) = x²?

4.What transformation does f(x − 3) represent?

5.What is the domain of f(x) = √x?

6.If f(x) = 2x + 1, what is f(5)?

7.What type of function is f(x) = 3ˣ?

8.A function is linear when the rate of change is:

9.What is the y-intercept of f(x) = −2x + 4?

10.Which represents a function: {(1,2), (2,3), (2,4)}?

Study Tips

  1. Practice evaluating — substitute different values into functions until it becomes second nature.
  2. Use the interactive explorer — experiment with sliders above to build intuition for how transformations work.
  3. Draw graphs by hand — start with the parent function and apply transformations step by step.
  4. Always check domain restrictions — before evaluating, ask: "Is this input allowed?"
  5. Cover and solve — hide the worked example solutions and try each problem yourself first.

Related Topics