Functions are things that take an input and process that input according to stated rules and give an output based on the input and the rules.
A function can be considered a rule for creating values. We can think of anything that we find in the world as a functional system.
The human mind is often studied in terms of functions in what is called functionalism.
Also, in computer science, the concept of a function is critical to understanding computer languages like C++.
Consider the input and output of a simple functional object, a toaster. Although this may seem a silly example, the point at which the conceptual breakdown occurs for many students of mathematics is around the concept of functions.
I think this is because functions are written in a way that can appear intimidating but, in reality, the concept of a function is very simple.
The domain of a particular function is the set of all possible inputs for a function.
The range of a particular function is the set of all possible outputs of a function.
There are common ways to write functions in mathematics that use the variable letter "x" as the independent variable and "y" as the dependent variable.
We can say that the value of [y] depends on the the value of [x].
We can say that "y is a function of x" and we it is often written as [y = f(x)] and this can be stated as "y equals the f of x".
If, for example, "y = f(x)" and "f(x) = x2 + 1", we can say that [y = x2 + 1].
If [x = 3], then, given that [y = x2 + 1] we can rewrite this as [y = (3 x 3) + 1] or [y = 10].
|
|
|
If [x = 10] then we can say that [y = 100 + 1] or [y = 101]. The graph above displays the resulting graphing of [y = x2 + 1].
We could also reverse this equation and say that this is the graph of [x =
(y -1).
Notice that the square root sign has precedence over the entire contents of the parenthesis following the square root sign "
".
Let's say we had a function called ADDONE and the function of ADDONE was to take the input number, P, and add [1] to it and assign it to Q. Assume that our domain, or input possibilities, are the following: domain of ADDONE = {1, 2, 3}.
The domain consists of these three separate values. The function of ADDONE is defined as [ Q = ( P + 1 ) ].
For each of the three inputs, [1], [2], and [3], we replace the "P" in [ Q = (P + 1) ] with [1], then [2], and then [3]. For [1], we get Q = [1 + 1] and Q = 2. For the next value, Q = 3 and, for the last, we get Q = 4. So, the range of the function ADDONE is {2, 3 4}.
Note that in mathematics, functions are not generally worded or referred to as ADDONE, though, in computer science, functions are defined in just this way.