MathBored

Essential Math Primer
← Back to Primer Overview
M26 • Lesson 40 of 105

Introduction to Functions

Function concept, input-output, function notation

Middle School Bridge • 6-8

Prerequisites: M25

Key Concepts

  • functions
  • input-output
  • domain
  • range

Introduction to Functions

A vending machine takes your money (input) and gives you a snack (output). For each selection button, you get exactly one item -- never two different items from the same button. A mathematical function works the same way: each input produces exactly one output. Functions are the central concept in modern mathematics and appear everywhere from computer programming to economics.

What Is a Function?

A function is a rule that assigns exactly one output to each input. The set of all possible inputs is called the domain, and the set of all resulting outputs is called the range.

Input → [Function Rule] → Output

For example, the rule "multiply by 2 and add 1" is a function. If the input is 3, the output is 2(3) + 1 = 7. If the input is -1, the output is 2(-1) + 1 = -1.

Function Notation

We write functions using notation like f(x), read as "f of x." Here, f is the name of the function and x is the input variable.

f(x) = 2x + 1

This tells us: whatever value you put in for x, double it and add 1 to get the output. f(3) means "evaluate f when x = 3."

Example 1 -- Evaluating a Function

Given f(x) = 3x - 5, find f(4).

  1. Substitute x = 4: f(4) = 3(4) - 5.
  2. Compute: 12 - 5 = 7.
  3. f(4) = 7.

Input-Output Tables

A function can be represented as a table showing input-output pairs. Each row shows one input and the corresponding output.

Example 2 -- Building a Table

Create an input-output table for g(x) = x2 - 1 using x = -2, -1, 0, 1, 2.

x (Input)g(x) (Output)
-2(-2)2 - 1 = 3
-1(-1)2 - 1 = 0
002 - 1 = -1
112 - 1 = 0
222 - 1 = 3

Domain (inputs used): {-2, -1, 0, 1, 2}. Range (outputs produced): {-1, 0, 3}.

Example 3 -- Is It a Function?

Determine whether this set of ordered pairs is a function: {(1, 4), (2, 7), (3, 4), (1, 9)}.

The input 1 maps to two different outputs (4 and 9). Since a function must assign exactly one output to each input, this is not a function.

Common Mistake

The notation f(x) does NOT mean "f times x." It means "the function f evaluated at x." So f(3) is not f × 3 -- it is the output of the function when the input is 3.

The Vertical Line Test

When a function is graphed on a coordinate plane, every vertical line should cross the graph at most once. If any vertical line crosses it twice (or more), the graph does not represent a function -- because that x-value would have multiple outputs.

Practice Problems

1. Given f(x) = 4x + 2, find f(5).

Show Solution

f(5) = 4(5) + 2 = 20 + 2 = 22.

2. Given h(x) = x2 + 3, find h(-3).

Show Solution

h(-3) = (-3)2 + 3 = 9 + 3 = 12.

3. Is this set of ordered pairs a function? {(2, 5), (4, 8), (6, 5), (8, 3)}

Show Solution

Yes. Each input (2, 4, 6, 8) maps to exactly one output. It is okay for different inputs to share the same output (both 2 and 6 map to 5) -- what matters is that no single input has two different outputs.

4. For the function f(x) = 2x - 1, find the input when the output is 9.

Show Solution

Set f(x) = 9: 2x - 1 = 9. Add 1: 2x = 10. Divide by 2: x = 5.

5. Build an input-output table for f(x) = 5 - x using x = 0, 1, 2, 3, 4. What is the range?

Show Solution

f(0) = 5, f(1) = 4, f(2) = 3, f(3) = 2, f(4) = 1. Range: {1, 2, 3, 4, 5}.

Lesson Summary

A function is a rule that assigns exactly one output to every input. We use notation like f(x) to name functions and evaluate them by substituting values. Functions can be represented as equations, tables, or graphs. The domain is the set of inputs and the range is the set of outputs. Use the vertical line test to determine whether a graph represents a function.

Overview