A function is a relationship between input(s) and output(s). It can be represented as a formula or equation; for example, a formula or equation can be written as follows:
a = b • 3 • c
This is valid but there exists a notation specific to functions; they can be written in the format of a pair of parentheses containing the independant variables separated by commas after the dependant variable as such:
a(b,c) = b • 3 • c
Here the relationship between the input and output is that the output is three times the input. The function [a] takes two parameters [b and c] and performs the specified operations. The final value after the evaluation is the value of a(b,c). Therefore, a(6,4) = 6 • 3 • 4 = 72 or simply, a(6,4) = 72. This statement can be represented in a natural language like English as well:
The function a of six and four is 72.
Functions can also be nested within each other's parameters, e.g:
a(i) = i + (i + 1)
f(x) = x + (x + 1)
f(a(1)) = f(1 + (1 + 1)) = (1 + (1 + 1)) + ((1 + (1 + 1)) + 1) = 3 + (3 + 1) = 3 + 4 = 7
This is called function composition and there is a special notation for performing it; in terms of the above case, that is:
f ∘ a(1)
It should be noted that the common or more expected and accepted notation for an example of a function is f(x) or f of x, as f acts as an abbreviation of the word function and x is the generally accepted symbol for an unknown or arbitrary independant variable.