Back in elementary mathematics, you would start off with a function such as:
When you wanted to find the value of y when is 2, you replace or substitute with 2 and add 2 + 2 to get . If the variable is -1 for example, then is equal to (-1 + 2) = 1.
Introducing the Function Notation
The function notation is a more convenient way of relating the independent variable x to the dependent variable y.
Instead of , we would have:
The variable is now replaced by . My independent variable is and the dependent variable depends on the value of . So when using the values 2 and -1 in the function , we get:
Think of a function as a machine like this:
The function takes an input , does some computations, and outputs a corresponding value for that value. (A similar statement can be made when explaining a function to a beginning programming student.)
The variable is a common independent variable. Other independent variables include (represents time), (height), or one of your choice.
Note that a function can have different inputs or values producing the same output. (E.g. -1 and +1 in outputs 1).
Let’s say we have another function such as . When substituting x = 1, we get so f(1) is 0.25. One could ask, couldn’t I have used the from before? The answer is yes.
To avoid confusion, one can name functions differently. We should use a different letter such as g and rename the function as . Then g(1) = 0.25 as done earlier.
Domain and Range
Notice that in , we would have the dreaded division by zero if is equal to -3. The function is not defined at We say that the the domain for is all real numbers except for x = -3 since we can use any x-value except -3. In notation, that is
The range for is all values that can take on given the permissible values of or the domain of (in this example). For , the range is all values except for 0. In notation, that is
Instead of the input, machine, output diagram model, we can now have it as:
Suppose we have .
Domain: There is no restriction on or can take on all real numbers or .
Range: Squaring any real number gives a non-negative number. The function h(x) will be 0 or positive. In notation we have
Other (Advanced) Functions
The functions above might have been too simple for some. I won’t cover more complex functions in great detail.
Other functions include: , , (Gamma Function), and . The independent variable can also be random and be denoted by
An example of such an advanced function would be the normal distribution’s probability density function (pdf). Its probability density function is:
where is a constant and the mean of the normal distribution, is the variance of the distribution and .
A function takes an input , makes computations in the function (machine) and produces an output as a value or expression.
The domain of the function is all input values that the function can use and the range of a function is all possible output values.
Image taken from http://our3esforthefuture.org/Math/Functions/functions.aspx