Put a coin in a vending machine, press a button, and exactly one thing comes out. A function behaves the same way: it is a relation in which every element of the domain has exactly one image. Functions are the backbone of calculus, so this lesson matters. We will test relations to see whether they are functions, get to know the standard real functions (identity, constant, polynomial, rational, modulus, signum and greatest integer) through their graphs, domains and ranges, and then add, subtract, multiply and divide functions.
A relation f from A to B is a function if every a∈A appears as a first element exactly once: not zero times, not twice. We write f:A→B and y=f(x).
Example 1. Work on A={1,2,3}. The relation {(1,2),(2,2),(3,1)} is a function; two elements are allowed to share an image. The relation {(1,2),(1,3),(2,1),(3,1)} is not, because 1 has two images. And {(1,1),(2,3)} is not a function on A either, because 3 has no image at all.
Vertical line test. With a graph in front of you there is a quick check. A curve in the plane is the graph of a function exactly when no vertical line meets it twice. A circle fails this test.
The vertical line test: a circle fails, a parabola passes
Graphs of the standard real functions in the table
The greatest integer function needs a word of care. [x] is the greatest integer not exceeding x, so [2.7]=2 and [5]=5. With negatives students often slip: [−2.7]=−3, because you must step down to the integer just below, not up towards zero. Its graph looks like a staircase.
The greatest integer function is a staircase
A polynomial function has the form f(x)=a0+a1x+⋯+anxn, where n is a whole number. That rules out x and x1, which are not polynomials. A rational function is a quotient q(x)p(x) of polynomials, defined wherever q(x)=0.
For the domain, ask what would break the formula: a zero denominator, or a negative number under a square root. For the range, ask what values the output can actually reach.
Functions can be combined point by point, just like numbers. For f,g:X→R we define (f+g)(x)=f(x)+g(x), (f−g)(x)=f(x)−g(x), (fg)(x)=f(x)g(x) and (αf)(x)=αf(x). For the quotient, (gf)(x)=g(x)f(x), but only where g(x)=0.
Example 6. Let f(x)=x2−1 and g(x)=3x+2. Then (f+g)(x)=x2+3x+1, (f−g)(x)=x2−3x−3 and (fg)(x)=3x3+2x2−3x−2. Finally (gf)(x)=3x+2x2−1, which needs x=−32.