Unit: Functions
Chapter: Introduction to Functions
Reference: – What is a Function, Input and Output, Function Notation (f(x)), Domain and Range, Vertical Line Test, Representing Functions (Equations, Tables, Graphs, Mapping Diagrams), Linear and Nonlinear Functions, Examples and Non-Examples, Solved Problems, Odd-One-Out, Common Mistakes
After studying this chapter, you should be able to understand:
- What is a Function and How It Works
- Function Notation and How to Use f(x)
- Domain and Range of a Function
- How to Identify a Function from a Graph (Vertical Line Test)
- Different Ways to Represent Functions
Introduction to Functions
Definition
A function is a special relationship between two sets of numbers: the input (usually x) and the output (usually y). In a function, every input has exactly one output.
Think of a function as a machine: you put a number in, the machine follows a rule, and it gives you exactly one number out.
When we study functions, we essentially ask:
"Does each input value produce one and only one output value?"
If yes, it is a function. If one input gives two or more different outputs, it is NOT a function.
Importance of Functions
- Functions are the building blocks of algebra and calculus
- Used to model real-world relationships (cost, distance, temperature)
- Helps predict outcomes based on input values
- Essential for computer programming and data analysis
- Found in everyday situations like vending machines, calculators, and formulas
Example
Suppose a vending machine has buttons (inputs) and snacks (outputs). If you press button A, you always get chips. If button A sometimes gives chips and sometimes gives candy, that machine is NOT a function. A function always gives the same output for the same input.
Mathematical Example:
The equation y = 2x + 3 is a function.
If x = 1, then y = 5. If x = 1 again, y is always 5. Each x gives exactly one y.
Subtopics
1. Input and Output
In a function, the input is called the independent variable (usually x). The output is called the dependent variable (usually y) because its value depends on the input.
Example: In the function y = x²
If input x = 3, output y = 9
If input x = -3, output y = 9
If input x = 0, output y = 0
Notice that different inputs (3 and -3) can give the same output (9). That is allowed in a function. What is NOT allowed is one input giving two different outputs.
Function Rule: A function must pass the "one input, one output" test.
2. Function Notation f(x)
Instead of writing y = 2x + 3, we can write f(x) = 2x + 3. The symbol f(x) is read as "f of x" and means "the output of function f when the input is x."
Examples of Function Notation:
If f(x) = 2x + 3, then:
- f(1) = 2(1) + 3 = 5
- f(4) = 2(4) + 3 = 11
- f(0) = 2(0) + 3 = 3
If g(x) = x² – 1, then:
- g(2) = 4 – 1 = 3
- g(5) = 25 – 1 = 24
- g(-3) = 9 – 1 = 8
Other letters can be used: h(x), p(x), d(x) – any letter works.
3. Domain and Range
Domain: The set of all possible input values (x-values) that the function can accept.
Range: The set of all possible output values (y-values) that the function can produce.
Example – Domain and Range from an Equation:
For f(x) = x + 2, we can put any real number in, so the domain is "all real numbers." The output can be any real number too, so the range is also "all real numbers."
Example – Domain and Range from a List of Ordered Pairs:
Consider the set of ordered pairs: {(1, 3), (2, 5), (3, 7), (4, 9)}
Domain = {1, 2, 3, 4} (all the x-values)
Range = {3, 5, 7, 9} (all the y-values)
Example – Domain Restriction (Important Rule):
For f(x) = 1/x, we cannot put x = 0 because division by zero is undefined. So, the domain is "all real numbers except 0."
4. Representing Functions
Functions can be shown in four main ways:
Way 1 – Equation: f(x) = 3x – 4
Way 2 – Table of Values:
A table shows inputs and their matching outputs.
Way 3 – Graph:
A graph plots points (x, y) where y = f(x). If any vertical line crosses the graph more than once, it is NOT a function.
Way 4 – Mapping Diagram:
Arrows connect each input to its output. Each input must have exactly one arrow coming out.
Example – Mapping Diagram:
Inputs: {1, 2, 3}
Outputs: {4, 5, 6}
Arrows: 1 → 4, 2 → 5, 3 → 6
This is a function because each input has one arrow.
NOT a function mapping diagram:
Inputs: {1, 2, 3}
Outputs: {4, 5, 6}
Arrows: 1 → 4, 1 → 5, 2 → 5, 3 → 6
This is NOT a function because input 1 has two outputs (4 and 5).
5. Vertical Line Test
The vertical line test is a quick way to check if a graph represents a function.
How it works: Imagine drawing vertical lines (up and down) across the entire graph. If any vertical line touches the graph at more than one point, it is NOT a function.
Examples:
A straight line (not vertical) – passes the test → function
A parabola (U-shaped) – passes the test → function
A circle – fails the test (a vertical line cuts a circle twice) → NOT a function
A vertical line – fails the test (every point on the line is a vertical line) → NOT a function
Why it works: A vertical line represents a single x-value. If it crosses the graph at two points, that x-value has two different y-values, which violates the definition of a function.
6. Linear vs Nonlinear Functions
Linear Function: A function whose graph is a straight line. It can be written in the form f(x) = mx + b, where m and b are constants.
Examples of Linear Functions:
f(x) = 2x + 3
f(x) = -5x + 1
f(x) = x (here m = 1, b = 0)
f(x) = 7 (here m = 0, b = 7 – a horizontal line)
Nonlinear Function: A function whose graph is NOT a straight line. It curves or changes direction.
Examples of Nonlinear Functions:
f(x) = x² (parabola – U-shaped)
f(x) = |x| (V-shaped)
f(x) = 2ˣ (exponential – curves upward)
f(x) = √x (square root – curves slowly)
Examples of Functions and Non-Functions
Example – Function (from ordered pairs):
{(0, 1), (1, 2), (2, 3), (3, 4)}
Each x has exactly one y → Function
Example – NOT a Function (from ordered pairs):
{(1, 2), (1, 3), (2, 4), (3, 5)}
The x-value 1 has two y-values (2 and 3) → NOT a function
Example – Function (from mapping diagram):
Inputs: A, B, C, D
Outputs: 10, 20, 30, 40
Arrows: A→10, B→20, C→30, D→40 → Function
Example – NOT a Function (from mapping diagram):
Inputs: A, B, C
Outputs: 10, 20, 30
Arrows: A→10, A→20, B→20, C→30 → NOT a function (A has two outputs)
Example – Function (from graph):
A straight line with slope 2 – passes vertical line test → Function
Example – NOT a Function (from graph):
A circle – fails vertical line test → NOT a function
Solved Examples
Example 1: Determine if the equation y = 2x + 1 represents a function.
Solution: For every x we choose, we get exactly one y. There is no x that gives two different y values. So this is a function.
Answer: Yes, it is a function.
Example 2: If f(x) = 3x – 2, find f(4).
Solution: f(4) = 3(4) – 2 = 12 – 2 = 10
Answer: 10
Example 3: Find the domain of f(x) = x² + 1.
Solution: We can put any real number into this function. There are no restrictions (no square roots of negatives, no division by zero). So domain is all real numbers.
Answer: All real numbers
Example 4: Does the set {(2, 4), (3, 6), (2, 8), (5, 10)} represent a function?
Solution: Look at the x-values. The x-value 2 appears twice with different y-values (4 and 8). This violates the definition of a function.
Answer: No, it is not a function.
Example 5: Does the graph of a vertical line represent a function?
Solution: A vertical line has the same x-value for every point. That x-value has infinitely many y-values. The vertical line test fails because a vertical line intersects itself at every point.
Answer: No, a vertical line is not a function.
Example 6 – Odd One Out (Function or Not):
Examine the five equations below. Exactly one does NOT represent y as a function of x. Identify it.
|
Item |
Equation |
||
|
P |
y = 3x – 7 |
||
|
Q |
y = x² + 2x – 1 |
||
|
R |
x = 4 |
||
|
S |
y =x |
||
|
T |
y = 1/x |
Solution:
Item P: y = 3x – 7 → for each x, one y → function
Item Q: y = x² + 2x – 1 → for each x, one y → function
Item R: x = 4 → this means x is always 4, but y can be any number. For x=4, there are infinitely many y values. So this is NOT a function.
Item S: y = |x| → for each x, one y (absolute value gives a single output) → function
Item T: y = 1/x → for each x (except 0), one y → function
Three reasons why R (x = 4) is the odd one out:
(A) In R, the same input (x=4) produces infinitely many outputs (any y-value). This violates the function rule.
(B) All other equations can be written in the form y = (something in terms of x). R cannot be written that way.
(C) The graph of x = 4 is a vertical line, which fails the vertical line test. All other equation graphs pass the vertical line test.
Conclusion: R (x = 4) is the odd one out.
Common Mistakes to Avoid
Mistake 1 – Confusing input with output
The input (x) is the independent variable; the output (y) depends on x.
Correct understanding: f(x) means "output when input is x."
Mistake 2 – Thinking different inputs cannot have the same output
Different inputs can definitely give the same output. Example: f(x) = x² gives f(2)=4 and f(-2)=4. That is fine.
Correct understanding: Only one input giving two outputs is forbidden.
Mistake 3 – Forgetting domain restrictions
Some functions cannot take all real numbers. Examples: 1/x cannot take x=0; √x cannot take negative numbers.
Correct understanding: Always check for division by zero and square roots of negatives.
Mistake 4 – Misapplying the vertical line test
The vertical line test is for graphs, not for tables or equations.
Correct understanding: Draw imaginary vertical lines across the entire graph.
Mistake 5 – Believing all equations are functions
An equation like x = y² is NOT a function of x because x=4 gives y=2 and y=-2 (two outputs).
Correct understanding: Solve for y; if after solving, one x gives two y's, it is not a function.
Mistake 6 – Thinking linear means straight line (true) but forgetting horizontal lines are also functions
y = 5 is a horizontal line. It passes the vertical line test and is a function.
Correct understanding: Horizontal lines are functions; vertical lines are not.
Quick Reference Summary
Definition of Function: Every input has exactly one output.
Function Notation: f(x) read as "f of x" means output of f when input is x.
Domain: All possible input values (x-values).
Range: All possible output values (y-values).
Vertical Line Test: If a vertical line crosses a graph more than once, it is NOT a function.
Ways to Show a Function: Equations, tables, graphs, mapping diagrams.
Linear Function: f(x) = mx + b (graph is a straight line).
Nonlinear Function: Graph is not a straight line (curves, V-shapes, etc.).
NOT a Function Examples: Vertical line, circle, x = y², mapping where one input has multiple outputs.