We intuitively say that a variable is a function of a second variable when its value depends on the value of the second variable and the value of the first variable can be uniquely calculated by some rule when the value of the second variable is assumed. The first variable is called the dependent variable and the second the independent variable.
Read Some Examples
Hide Examples
For example, the temperature at which pure water boils is a function of the altitude above sea level. The area of a circle is a function of its radius , because if the radius of a circle is given, we can calculate its area . Thus the area is a function of the radius. Conversely, if the area of a circle is given, we can calculate its radius through . Thus, the radius is a function of the area. Sometimes, like in this example, it is a matter of choice which variable is called the independent variable and which one the dependent variable.
In a triangle, suppose the lengths of two sides, and , are given. If we choose a value between and for the angle between these two sides, then the length of the third side is determined. Thus if and are given, we can say is a function of . From geometry, we know that this function is represented by the formula
The federal tax rate for a single person is a function of his or her taxable income. For example, if his or her taxable income is any number between and , the tax rate is 22% and if the taxable income is between and , the tax rate falls into 12%.
- A variable can be a function of more than one other variable. For example, the volume of a circular cylinder is a function of the radius of its base and the height of the cylinder . We need to know both and to be able to calculate through . We will study multivariable functions only in the second part of the course.
The formula
defines as a function of for all (we restrict the values of to nonnegative numbers because we cannot take the root of negative numbers).
If and are two variables connected by the relation
then is a function of because if the value of is given, the value of can be calculated uniquely. Conversely if the value of is given (for example ), this equation defines two corresponding values of (for example, or corresponding to ). Because not a unique value of corresponds to a given value of (except when ), is not a function of .
Notation
In mathematics, we often wish to refer to a generic function without specifying any particular formula, table, or graph. To denote that is a function of , we write
which is read as “ is equal to of .” In this notation, represents the function, that is, the “rule” or “procedure” (which usually but not always involves some formula) associating the values of to the values of . Instead of , we may use other notations such as , etc. If more than a function occur in a problem, one may be expressed as , another as , another as , and so on. It is also convenient in practice to represent different functions by the symbols , etc. However, during any investigation, the same functional symbol always indicates the same law of dependence of the dependent variable upon the independent variable.
Visualizations
A function can be thought of as a machine or a computer program that assigns one output to every allowable input.
 |

|
(a) |
(b) |
Figure 1: A function can be thought of as a (a) machine or (b) computer program that for each allowable input gives one output.
Another way to picture a function is by an arrow diagram. For each element in , the value of in is to be found at the head of the corresponding arrow. As we can see in Figure 2(a), associates to each element in , one and only one element in . Thus, is a function, although two elements in are associated with one element in . But in Figure 2(b), associates two elements to an element in . Therefore, is not a function.
 |

|
(a) |
(b) |
Figure 2: is a function, but is not because assigns two elements in its codomain to in its domain.
Definitions
Definition: A function from a set , to a set , is a rule that assigns, to each element in , one
and only one element in . We then write .
Sets and are called domain and co-domain of , respectively. To mention that is a function with domain and co-domain , we write .
- If , we also call the independent variable , the argument of the function, and the element the value of at or the image of under .
- The definition of a function does not restrict the nature of the elements of and , but in elementary calculus we assume that they are numbers; that is, and are subsets of real numbers , unless otherwise stated.
Formula of the Function
If , the particular value of the function when has a definite value is then expressed as . For example, if
then
and
Also, because it does not matter which letter we use for the independent variable, we have
Strictly speaking is the value of at , but we often talk about “the function ” or “the function .” For example, consider a function that takes a number and gives its square . In this case, we can simply say:
1.“the function ;”
2.“the function ” (if we denote the dependent variable by );
3. simply “the function .”
We can also connect the input and output values by a special arrow, namely “the function .”
Implicit and explicit functions
If an equation between several variables is solved for any one, the latter is said to be an explicit function of the others, the manner of its dependence being exhibited by the solution of the equation. Otherwise, it is said to be an implicit function. Thus, in is an implicit function of ; while, in is an explicit function of . The difference is one of form only. The notation is used to denote that is an explicit function of , and the notation to denote that and are implicit functions of each other.