In Algebra 2, you worked with functions as rules that transform inputs into outputs. College Algebra demands more precision. Here we define functions formally using set theory, master the difference quotient that leads to calculus, and evaluate functions defined by tables, graphs, formulas, and piecewise rules.
Formal Definition of a Function
A function from set A to set B is a set of ordered pairs (x,y) where:
Every element x in A appears as the first coordinate of exactly one pair.
No two distinct pairs share the same first coordinate.
In set notation, a function f:AβB satisfies: for every xβA, there exists a uniqueyβB such that (x,y)βf.
Example: The set {(1,3),(2,5),(3,7),(4,9)} is a function because each first coordinate appears once. The set {(1,3),(1,5),(2,7)} is not a function because the input 1 maps to two different outputs.
Domain and Range
The domain is the set of all first coordinates: Dom(f)={xβ£(x,y)βf}
The range is the set of all second coordinates that are actually produced: Range(f)={yβ£(x,y)βf}
The domain is the set of all valid inputs; the range is the set of all actual outputs. A common mistake is to confuse the codomain (the target set B) with the range. The codomain is where outputs could land; the range is where they actually land.
Function Notation Review
When we write f(x)=3x+2, we are naming the function f and declaring the rule: take any input x, multiply by 3, and add 2. The expression f(x) is read βf of xβ and represents the output when x is the input.
Key evaluation patterns:
f(5)=3(5)+2=17
f(β2)=3(β2)+2=β4
f(a)=3a+2
f(a+1)=3(a+1)+2=3a+3+2=3a+5
f(x2)=3x2+2
The parentheses in f(x) do not mean multiplication. This is a notation convention β f(x) names the output of the function f at input x.
Evaluating More Complex Expressions
Given g(x)=x2β4x+1, find g(3), g(β1), and g(2t).
g(3)=(3)2β4(3)+1=9β12+1=β2
g(β1)=(β1)2β4(β1)+1=1+4+1=6
g(2t)=(2t)2β4(2t)+1=4t2β8t+1
Notice how the entire input expression replaces every instance of x in the formula, and parentheses protect the substitution from sign and order errors.
The Difference Quotient
The difference quotient is the expression:
hf(x+h)βf(x)β,hξ =0
This measures the average rate of change of f between x and x+h. It is the slope of the secant line through the points (x,f(x)) and (x+h,f(x+h)). In calculus, taking the limit as hβ0 produces the derivative β the instantaneous rate of change.
Worked Example 1: Difference Quotient for a Quadratic
Find and simplify the difference quotient for f(x)=x2+3x.
The simplified difference quotient is x(x+h)β1β.
Functions Defined Multiple Ways
By Formula
Most functions in algebra are defined by formulas like f(x)=2x2β5. The domain is all real numbers unless the formula involves division (denominator cannot be zero) or even roots (radicand must be non-negative).
By Table
x
f(x)
β2
7
0
3
1
1
4
β5
From this table: f(0)=3, f(4)=β5, and the domain is {β2,0,1,4}.
By Graph (Vertical Line Test)
A graph in the coordinate plane represents a function if and only if every vertical line intersects the graph at most once. This is the vertical line test. If any vertical line crosses the graph twice, there exists an input with two outputs, violating the function definition.
By Verbal Description
Engineering example: The stress Ο in a beam depends on the applied force F and the cross-sectional area A: Ο(F)=AFβ, where A is a constant for a given beam. This verbal relationship defines a function.
Piecewise Functions: First Look
A piecewise-defined function uses different formulas on different parts of the domain.
f(x)={x23xβ2βifΒ xβ€1ifΒ x>1β
To evaluate:
f(β3)=(β3)2=9 (since β3β€1, use the first piece)
f(1)=(1)2=1 (since 1β€1, use the first piece)
f(4)=3(4)β2=10 (since 4>1, use the second piece)
Retail application: A store offers a bulk discount. The cost function might be:
C(n)={5n4nβifΒ 1β€nβ€100ifΒ n>100β
where n is the number of items. At 80 items the cost is C(80)=5(80)=400. At 150 items the cost is C(150)=4(150)=600.
Real-World Application: Engineering Cost Analysis
An engineering firm models the total cost of a project as C(x)=0.02x2+500x+12000, where x is the number of labor hours. The difference quotient tells the firm how fast costs are changing: