Introduction to Functions
A relation between two sets A and B is a collection of ordered pairs, where the first coordinate comes from A and the second comes from B . For example, if A = {1, 2, 3, 4} and B = {a, b, c} , one relation is the three pairs {(1, c ), (1, a ), (3, a )}. A function on sets A and B is a special kind of relation where every element of A is paired with exactly one element from B . The relation above fails to be a function in two ways. Not every element of A is paired with an element from B , 1 and 3 are used but not 2 and 4. Also, the element 1 is used twice , not once . There are no such restrictions on B ; that is, elements from B can be paired with elements from A many times or not at all. For example, {(1, a ), (2, a ), (3, b ), (4, b )} is a function from A to B.
Functions exist all around us. If a worker is paid by the hour, his weekly pay is a function of how many hours he worked. For any number of hours worked, there is exactly one pay amount that corresponds to that time. If A is the set of all triangles and B is the set of real numbers, then we have a function that pairs each triangle with exactly one real number that is its area. We will be concerned with functions from real numbers to real numbers. A will either be all of the real numbers or will be some part of the real numbers, and B will be the real numbers.
A linear function is one of the most basic kinds of functions. These functions have the form f ( x ) = mx + b . The only difference between f ( x ) = mx + b and y = mx + b is that y is replaced by f ( x ). Very often f ( x ) and y will be the same. The letter f is the name of the function. Other common names of functions are g and h . The notation f (x) is pronounced “ f of x ” or “ f at x .”
Evaluating a function at a quantity means to substitute the quantity for x (or whatever the variable is). For example, evaluating the function f (x) = 2 x − 5 at 6 means to substitute 6 for x.
f (6) = 2(6) − 5 = 7
We might also say f (6) = 7. The quantity inside the parentheses is x and the quantity on the right of the equal sign is y . One advantage to this notation is that we have both the x and y values without having to say anything about x and y . Functions that have no variables in them are called constant functions . All y values for these functions are the same.
Examples

Find f (−2), f (0), and f (6) for .
We need to substitute −2, 0, and 6 for x in the function.
 Find f (−8), f (π), and f (10) for f (x) = 16.
f (x) = 16 is a constant function, so the y value is 16 no matter what quantity is in the parentheses.
f (−8) = 16 f ( π ) = 16 f (10) = 16
Piecewise Functions
A piecewise function is a function with two or more formulas for computing y . The formula to use depends on where x is. There will be an interval for x written next to each formula for y .
In this example, there are three formulas for y: y = x − 1, y = 2 x , and y = x ^{2} , and three intervals for x: x ≤ −2, −2 < x < 2, and x ≥ 2. When evaluating this function, we need to decide to which interval x belongs. Then we will use the corresponding formula for y.

1
 2
Ask a Question
Have questions about this article or topic? AskRelated Questions
See More QuestionsPopular Articles
 Kindergarten Sight Words List
 First Grade Sight Words List
 10 Fun Activities for Children with Autism
 Definitions of Social Studies
 Grammar Lesson: Complete and Simple Predicates
 Child Development Theories
 Signs Your Child Might Have Asperger's Syndrome
 How to Practice Preschool Letter and Name Writing
 Social Cognitive Theory
 Theories of Learning