Calculus/Functions
Functions
Classical understanding of functions
To provide the classical understanding of functions, a function can be thought of as a machine. Machines take in raw materials, change them in a predictable way, and give out a finished product. The kinds of functions we consider here, for the most part, take in a real number, change it in a formulaic way, and give out another real number. A function is usually named f or g or something similar except when it is a special, named function (such as the pi function, the Riemann Zeta function, or the random variable function). A function is always defined as "of a variable" which tells the reader what to replace in the function.
For instance, tells the reader:
- The function f is a function of x.
- To evaluate the function at a certain number, replace the x with the desired number.
- Replacing x with that number in the right side of the function will produce the function's output for that certain input.
- In English, the definition of is interpreted, "Given a number, will return two more than the triple of that number."
Thus, if we want to know the value (or output) of the function at 3:
- We evaluate the function at x = 3.
- The value of at 3 is 11.
Note that means the value of the dependent variable when takes on the value of 3. So we see that the number 11 is the output of the function when we give the number 3 as the input. We refer to the input as the argument of the function (or the independent variable), and to the output as the value of the function at the given argument (or the dependent variable). A good way to think of it is the dependent variable 'depends' on the value of the independent variable . This is read as "the value of f of three is eleven", or simply "f of three equals eleven".
Notation
Functions are used so much that there is a special notation for them. The notation is somewhat ambiguous, so familiarity with it is important in order to understand the intention of an equation or formula.
Though there are no strict rules for naming a function, it is standard practice to use the letters , , and to denote functions, and the variable to denote an independent variable. is used for both dependent and independent variables.
When discussing or working with a function , it's important to know not only the function, but also its independent variable . Thus, when referring to a function , you usually do not write , but instead . The function is now referred to as " of ". The dependent variable is adjacent to the independent variable (in parenthesis). This is useful for indicating the value of the function at a particular value of the independent variable. For instance, if
- ,
and if we want to use the value of for equal to , then we would substitute 2 for on both sides of the definition above and write
This notation is more informative than leaving off the independent variable and writing simply '', but can be ambiguous since the parentheses can be interpreted as multiplication. Consistency in notation greatly improves the readability of mathematical text.
Modern understanding of functions
The formal definition of a function states that a function is actually a rule that associates elements of one set called the domain of the function, with the elements of another set called the range of the function. For each value we select from the domain of the function, there exists exactly one corresponding element in the range of the function. The definition of the function tells us which element in the range corresponds to the element we picked from the domain. Classically, the element picked from the domain is pictured as something that is fed into the function and the corresponding element in the range is pictured as the output. Since we "pick" the element in the domain for whose corresponding element in the range we want to find, we have control over what element we pick and hence this element is also known as the "independent variable". The element mapped in the range is beyond our control and is "mapped to" by the function. This element is hence also known as the "dependent variable", for it depends on which independent variable we pick. Since the elementary idea of functions is better understood from the classical viewpoint, we shall use it hereafter. However, it is still important to remember the correct definition of functions at all times.
To make it simple, for the function , all of the values constitute the domain, and all of the values ( on the x-y plane) constitute the range.
Remarks
The following arise as a direct consequence of the definition of functions:
- By definition, functions can take as many "inputs" at a time as desired but return only one "output", corresponding to that set of input. While one set of inputs cannot correspond to more than one output, the same output may correspond to more than one set of inputs. This is interpreted graphically as the vertical line test: a line drawn parallel to the axis of the dependent variable (normally vertical) through the graph of a function will intersect that function only once. Equivalently, this has an algebraic (or formula-based) interpretation. We can always say if , then , but if we only know that then we can't be sure that .
- Each function has a set of values, the function's domain, which it can accept as input. Perhaps this set is all positive real numbers; perhaps it is the set {pork, mutton, beef}. This set must be implicitly/explicitly defined in the definition of the function. You cannot feed the function an element that isn't in the domain, as the function is not defined for that input element.
- Each function has a set of values, the function's range, which it can output. This may also be the set of real numbers, in which case the function is termed as a "real-valued" function. It may be the set of positive integers or even the set {0,1}. This set, too, must be implicitly/explicitly defined in the definition of the function.

The vertical line test
The vertical line test is a systematic test to find out if an expression can serve as a function. Simply graph the expression and draw a vertical line along each point in the domain of the relation. If any vertical line ever touches the relation for more than one value, then the expression is not a function; if the line always touches only one value, then the expression is a function.
(There are a lot of useful curves, like circles, that aren't functions (see picture). Some people call these graphs with multiple intercepts, like our circle, "multi-valued functions"; they would refer to our "functions" as "single-valued functions".)
Important functions
| --Polynomial function |
--Identity function
|
--Constant function
|
--Zero function
|
--Linear function (function of a line)--polynomial of the first degree.
|
-- The signum function
|
-- The quadratic function.
|
Example functions
Some more simple examples of functions have been listed below.
|
|
|
It is possible to replace the independent variable with any mathematical expression, not just a numeral. For instance, if the independent variable is itself a function of another variable, then it could be replaced with the value of that function. This is called composition, and is discussed next.
Manipulating functions
Functions can be manipulated in the same manner as any other variable; they can be added, multiplied, raised to powers, etc. For instance, let
- and
- .
Then
- ,
- ,
- ,
- .
Composition of functions
However, there is one particular way to combine functions which cannot be done with other variables. The value of a function depends upon the value of another variable ; however, that variable could be equal to another function , so its value depends on the value of a third variable. If this is the case, then the first variable is a function of the third variable; this function () is called the composition of the other two functions ( and ). Composition is denoted by
- .
This can be read as either "f composed with g" or "f of g of x."
For instance, let
- and
- .
Then
- .
Here, is the composition of and . Note that composition is not commutative:
- , and
- so .
Composition of functions is very common, mainly because functions themselves are common. For instance: addition, multiplication, etc., can be represented as functions of more than one independent variable:
- ,
- , etc.
Thus, the expression is a composition of functions:
= = .
Since the function times equals if and , then
- .
Since the function plus equals if and , then
- .
Transformations
Transformations are a type of function manipulation that are very common. They consist of multiplying, dividing, adding or subtracting constants to either the argument or the output. Multiplying by a constant is known as Dilation and adding a constant is called Translation. Here are a few examples:
- Dilation
- Translation
- Dilation
- Translation

Translations and Dilations can be either horizontal or vertical. Examples of both vertical and horizontal translations can be seen at right. The red graphs represent functions in their 'original' state, the solid blue graphs have been translated (shifted) horizontally, and the dashed graphs have been translated vertically. Dilations are demonstrated in a similar fashion. The function
has had its input doubled. One way to think about this is that now any change in the input will be doubled. If I add one to x, I add two to the input of the function, so it will now change twice as quickly. However, this is a horizontal dilation by because the distance to the y-axis has been halved. A vertical dilation, such as
is slightly more straightforward. In this case, you double the output of the function. The output represents the distance from the x-axis, so in effect, you have made the graph of the function 'taller'. Here are a few basic examples where a is any postive constant:
| Original Graph | Reflection through origin | ||
| Horizontal Translation by a units right | Horizontal Translation by a units left | ||
| Horizontal Dilation by a factor of a | Vertical Dilation by a factor of a | ||
| Vertical Translation by a units down | Vertical Translation by a units up | ||
| Reflection over x-axis | Reflection over y-axis |
Domain and Range
Notation
The notation used to denote intervals is very simple, but sometimes ambiguous because of the similarity to ordered pair notation:
| Meaning | Interval Notation | Set Notation |
| All values greater than or equal to and less than or equal to | ||
| All values greater than and less than | ||
| All values greater than or equal to and less than | ||
| All values greater than and less than or equal to | ||
| All values greater than or equal . | ||
| All values greater than . | ||
| All values less than or equal to . | ||
| All values less than . | ||
| All values. |
Note that must always be unbounded (that is, have no inclusive bracket, but instead have an exclusive parentheses). This is because is not a number, and therefore cannot be in our set. is really just a symbol that makes things easier to write, like the intervals above.
Note: ( is also denoted by ], and ) by [, i.e., (a,b) is the same as ]a,b[, and [a,b) is [a,b[. This is source of funny misunderstandings.
Domain

The domain of a function is the set of all points over which it is defined. More simply, it represents the set of x-values which the function can accept as input. For instance, if
then is only defined for values of between and , because the square root function is not defined (in real numbers) for negative values. Thus, the domain, in interval notation, is . In other words,
- .

Range
The range of a function is the set of all values which it attains (i.e. the y-values). For instance, if:
- ,
then can only equal values in the interval from to . Thus, the range of is .
One-to-one Functions
A function is one-to-one (or less commonly injective) if, for every value of , there is only one value of that corresponds to that value of . For instance, the function is not one-to-one, because both and result in . However, the function is one-to-one because for every possible value of , there is exactly one corresponding value of . Any function that looks like , where , is one-to-one. Note that if you have a one-to-one function and translates/dilates it, it remains one-to-one (Of course you can't multiply or by a zero factor).
If you know what the graph of a function looks like, it is easy to determine whether or not the function is one-to-one. If every horizontal line intersects the graph in at most one point, then the function is one-to-one. This is known as the Horizontal Line Test.
Inverse functions
Function has an inverse function if and only if is one-to-one. For and such that is the inverse function of :
- .
For example, the inverse of is . The function has no inverse.
Notation
The inverse function of is denoted as . The inverse of a function is defined as the function that follows this rule
:
To determine when given a function f, substitute for and substitute for . Then solve for , provided that it is also a function.
Example: Given , find .
Substitute for and substitute for ., then solve for :
To check your work, confirm that :
Graphing Functions

It is sometimes difficult to understand the behavior of a function given only its definition; a visual representation or graph can be very helpful. A graph is a set of points in the Cartesian plane, where each point (,) indicates that . In other words, a graph uses the position of a point in one direction (the vertical-axis or y-axis) to indicate the value of for a position of the point in the other direction (the horizontal-axis or x-axis).
Functions may be graphed by finding the value of for various and plotting the points (, ) in a Cartesian plane. Since functions that you will deal with are generally continuous (see below), the parts of the function between the points can be approximated by drawing a line or curve between the points. Extending the function beyond the set of points is also possible, but becomes increasingly inaccurate.
Plotting points like this is laborious. Fortunately, many functions' graphs fall into general patterns. For a simple case, consider functions of the form
The graph of is a single line, passing through (,) and . Thus, after plotting the two points, a straightedge may be used to draw the graph as far as is needed.
Continuity
Most functions that you will deal with are not a random scattering of points. Rather, the graphs have one or more curves, which do not have sudden gaps in them, and may be drawn without lifting your pencil. Later, the principle of continuity will be defined formally using the concept of limits.
Algebraic manipulation
Purpose of review
This section is intended to review algebraic manipulation.
Rules of arithmetic and algebra
The following rules are always true (see: field theory).
- Addition
- Commutative Law: .
- Associative Law: .
- Additive Identity: .
- Additive Inverse: .
- Subtraction
- Definition: .
- Multiplication
- Commutative law: .
- Associative law: .
- Multiplicative Identity: .
- Multiplicative Inverse:
- Distributive law: .
- Division
- Definition: .
The above laws are true for all , , and , whether , , and are numbers, variables, functions, or other expressions. For instance, although
| = | |
| = | |
| = | |
| = |
is much longer than simply cancelling out in both the numerator and denominator, it is important to understand the longer method. Occasionally people do the following, for instance, which is incorrect:
- .
The correct way is
- ,
where the number cancels out in both the numerator and the denominator.