A function is sometimes called a machine, or a black box, that takes an input and produces an output by having the input used in different formulas.
Functions are tightly coupled with set theory, as their main functionality is to establish a relation between the different elements of two sets. This relationship between elements of different sets is specified by an expression that takes a variable that can be any value of the starting set (named domain) and results in an element of the ending set (named codomain). This is not always a one-to-one relationship, as there can sometimes be two elements of the domain for which the expression would evaluate to the same element of the codomain. All the elements of the codomain that are linked to an element of the domain through the function, are named the image of the function (or the image set)
Functions are useful to relate one value in terms of another one, for example, a position in function of the time.
Table of Contents
- Notation
- Graphing
- Classification of functions
- Linear
- Slope or gradient
- Quadratic
- Forms of a quadratic function
- Vertex
- Exact roots or zeroes
- Polynomial functions
- Exponential functions
- Rational (or homographic) function
- Inverse
- Composition
- Sources
Notation
The norm is to name the function [math]f[/math], [math]g[/math], or [math]h[/math], to name the domain as the [math]X[/math] set and the codomain as the [math]Y[/math] set. Consequently, the input variable is usually named [math]x[/math] and the output usually [math]y[/math].
[math]f(2) = 5[/math]
That means that the [math]5[/math] element of [math]Y[/math] set is linked to the [math]2[/math] element through the [math]f[/math] function.
Commonly, a function is defined with its name, input variable, and an expression (or function evaluation) dependent on its input variable.
[math]f(x) = x^{2} +1[/math]
This results in an equation that can be solved to identify the correspondent [math]y[/math] element of the [math]Y[/math] set, to the [math]x[/math] element of the [math]X[/math] set.
If [math]f(x) = x^{2} +1[/math], then [math]f(2) = 2^{2} +1 = 5[/math]
In this example, solving [math]f(-2)[/math] would result in [math]5[/math] also, reason why it is useful and common to specify the domain of the function (the starting set, the set of elements that can be used as the input variable). This is specified by pointing a right arrow from the starting set to the ending set:
[math]f: X \rightarrow Y[/math]
Notice how no restrictions are made in this example, as the function is denoting that the starting set will be [math]X[/math] and the ending set will be [math]Y[/math], but for a restrictive domain or codomain, set notation, or set-builder notation can be used in the functions’ definition:
- [math]f: {R} \rightarrow {R}[/math]
- [math]f: [1,5] \rightarrow [2,26][/math]
- [math]f: [1,3) \cup (3,5] \rightarrow [5,26][/math]
The complete notation for defining a function with its range and its function evaluation is:
[math]f: X \rightarrow Y \diagup f(x) = [/math] expression
Like the previous example, if the range of the function is [math]{R} \rightarrow {R}[/math], then there are two elements of the [math]X[/math] set (or the domain) that resolve the expression to one element of the codomain. This is the case in all quadratic functions.
- [math]f: {R} \rightarrow {R} \diagup f(x) = x^{2} +1[/math]
- [math]f(2) = 2^{2}+1 = 5[/math]
- [math]f(-2) = (-2)^{2}+1 = 5[/math]
Because this possibility exists, specifying (or restricting) the range of the function is usually ideal. This is named domain restriction.
- [math]f: {R}^{+} \rightarrow {R} \diagup f(x) = x^{2} +1[/math]
- [math]f(2) = 2^{2}+1 = 5[/math]
- Now that the domain is restricted to positive real numbers, [math]-2[/math] is not part of the domain
Graphing
Functions can be graphed by representing the set of all pairs [math](x, y)[/math] (or [math](x,y,f(x,y))[/math] as Cartesian coordinates in a plane or space.
Classification of functions
Functions can be classified by the nature of their formulas. For example:
[math]f(x) = 8x – 1 \\ g(x) = x^{2} + 2x \\ h(x) = \sqrt{x+1}[/math]
f, g, & h are all valid functions, but each contains specific properties and identities
Linear
Linear functions, probably the first type of function learned, maybe the simplest one, is one where its expression consists of a polynomial of degree zero or one. For example:
[math]f: {R} \rightarrow {R} \; \diagup \; f(x) = 2x + 3 \\ f: {R} \rightarrow {R} \; \diagup \; f(x) = 3[/math]
Where the notation is:
[math]f: X \rightarrow f(x) \; \diagup \; f(x) = ax+b[/math]
- If [math]a > 0[/math] it’s said that the slope/gradient is positive (goes upwards)
- If [math]a < 0[/math] it’s said that the slope/gradient is negative (goes downwards)
- If [math]a = 0[/math] there is no slope and the function is a constant function
Slope or gradient
The slope or gradient of the function determines how steep the graph is, or how “fast” the Y value increments over an increment on the X axis between any two points. Because this is the ratio of difference between two points, it can be calculated as:
[math]m = \frac{\text{vertical change}}{\text{horizontal change}} = \frac{\text{rise}}{\text{run}} = \frac{Y_{2} – Y_{1}}{X_{2} – X_{1}} = \frac{\triangle y}{\triangle x}[/math]
Quadratic
Quadratic functions are formed by a second degree polynomial. It’s graph is a parabola (a mirror-symmetrical plane curve, U shaped).
[math]f(x) = ax^{2} + bx + c \\ a \neq 0 \\f(x,y) = ax^{2} + bxy + cy^{2} + dx + ey +f [/math]
Forms of a quadratic function
A quadratic function can be expressed in different ways:
- The standard form:
- [math]f(x) = ax^{2} + bx + c[/math]
- The factored form:
- [math]f(x) = a(x-r_{1})(x-r_{2})[/math]
- [math]r_{1}[/math] and [math]r_{2}[/math] are the roots of the graph
- The vertex form:
- [math]f(x) = a(x + h)^{2} + k[/math]
- [math]h[/math] and [math] k [/math] are the [math]x[/math] and [math]y[/math] coordinates of the vertex
- [math]a[/math] is the principal coefficient, equal in all forms.
- To convert from standard to factored form, roots (or zeroes) need to be calculated
- Converting from standard form to vertex form can be used by completing squares.
- When [math]a \,>\,0[/math] the parabola opens upwards (U). The vertex is the minimum.
- When [math] a \,<\,0[/math] the parabola opens downwards ([math]\cap[/math]). The vertex is the maximum.
- [math]a[/math] and [math]b[/math] control the location of the axis of symmetry
Vertex
The vertex is the point where a parabola turns, thus, the turning point, where the parabola “starts to” increase if it was decreasing and vice-versa. As any point, it has an x and y coordinates that can be calculated or deduced by the different forms:
- Vertex from the standard form:
- Can be obtained by completing squares and transforming the standard form to the vertex form, where the coordinates of the vertex are:
- [math]V = (\frac{-b}{2a},c-\frac{b^{2}}{4a})[/math]
- Can be obtained by completing squares and transforming the standard form to the vertex form, where the coordinates of the vertex are:
- Vertex from the factored form:
- Having the two roots, it can be deduced that the x coordinate of the vertex is exactly in between its roots (or any two points):
- [math]V_{x} = (\frac{x_{1} + x_{2}}{2},f(\frac{x_{1} + x_{2}}{2}))[/math]
- Having the two roots, it can be deduced that the x coordinate of the vertex is exactly in between its roots (or any two points):
Exact roots or zeroes
Roots of a quadratic function are the points where the function intersects the X axis. A quadratic function can contain one, two, or zero roots. Roots or zeroes of a function can be calculated by equating the function’s expression to zero.
[math]f(x) = x^{2} + 2x + 2 \\ x^{2} + 2x + 2 = 0[/math]
Polynomial functions
If we know quadratic functions, we also know polynomial functions, given that quadratic functions are already polynomial ones of grade two. A distinction is made over higher degree polynomial functions and thus the ‘polynomial functions’ category exists.
Polynomial functions look like:
[math]f: {R} \rightarrow {R} \; \diagup \; f(x) = a_{_{n}}x^{n} \; + \; a_{_{n-a}}x^{n-1} \; + \; \ldots \; + \; a_{_{2}}x^{2} \; + \; a_{_{1}}x^{1} \; + \; a_{_{0}}x^{0} [/math]
Solving the roots of a polynomial function is no different than with the quadratic. For quadratic, cubic and quartic there are specific formulas, but for higher degrees, the Ruffini’s rule can be used
Exponential functions
Said to be “the most important function in mathematics”, by Walter Rudin, exponential functions are such where the independent variable is used as an exponent of a constant, such that:
[math]f: {R} \rightarrow {R} \;\diagup\; f(x) = a^{x}\\ a > 0 \: \wedge \: a \neq 1[/math]
In these functions, the rate of change at each point is proportional to the value of the function at that point.
Exponential functions are useful for modeling exponential growths and decays (for example the unconstrained growth of a self-reproducing population, the decay of a radioactive element, the compound interest accruing on a financial fund, or a growing body of manufacturing expertise)
Because the X value will never be 0, it approximates to it infinitely, making the X axis the horizontal asymptote (unless the domain is restricted)
Rational (or homographic) function
As the name implies, a rational function is any function that can be expressed as any rational fraction of polynomials. These functions produce an hyperbolas graph:
[math]f: X \rightarrow Y \;\diagup\; f(x) = \frac{P(x)}{Q(x)}[/math]
[math]f: X \rightarrow Y \;\diagup\; f(x) = \frac{ax^{n}+b}{cx^{n}+d}[/math]
For example:
[math]f: X \rightarrow Y \;\diagup\; f(x) = \frac{2x-1}{27x+2} \\ \\ g: X \rightarrow Y \;\diagup\; g(x) = \frac{x}{x^{2}-1} [/math]
Intuitively, we can see that there are values from the X set (under the real numbers) that’d make the function’s expression unsolvable. Let’s take for example the following function
[math] f: X \rightarrow Y \;\diagup\; f(x) = \frac{x+2}{x-1} [/math]
[math]f(1) = \frac{1+2}{1-1} = \frac{3}{0}[/math]
So we know that the domain of the function, when bounded by the real numbers, is the set:
[math] X = (-\infty,1) \:\cup\: (1, +\infty)[/math]
Both arms of the hyperbola tend to limit in a common way, known as the vertical and horizontal asymptotes. Where:
[math]A_{h}=\frac{A}{C} \wedge A_{v}=\frac{-D}{C}[/math]
Inverse
If there’s a function that goes from [math]X \rightarrow Y[/math] and said function is bijective, there exists, then, an inverse function that goes from [math]Y \rightarrow X[/math].
[math]f: X \rightarrow Y \;\diagup\; f(x) = 2x +1 \\ f^{-1}: Y \rightarrow X \;\diagup\; f^{-1}(x) =\frac{ x – 1}{2}[/math]
The inverse of a function can be obtained by “clearing out” x in terms of y
[math] y = 2x + 1 \\ y-1 = 2x \\ \frac{y-1}{2} = x[/math]
Composition
Composition of a function is to assign the independent value of function [math]f[/math] the result of assigning a value to the function [math]g[/math]. That is, [math]f[/math] composed by [math]g[/math]
- [math]f(x) = 2x + 1[/math]
- [math]g(x) = x^{2}[/math]
- [math] (f\:o\:g)(x) = 2(x^{2}) + 1[/math]
- [math] (f\:o\:g)(3) = 2(3^{2}) + 1 = 19[/math]
- [math](g\:o\:f)(x) = (2x+1)^{2}[/math]
- [math](g\:o\:f)(3) = (2*3+1)^{2} = 49[/math]
Sources
- https://en.wikipedia.org/wiki/Function_(mathematics)
- https://en.wikipedia.org/wiki/Equation
- https://en.wikipedia.org/wiki/Graph_of_a_function
- https://en.wikipedia.org/wiki/Quadratic_function
- https://en.wikipedia.org/wiki/Parabola
- https://en.wikipedia.org/wiki/Completing_the_square
- https://en.wikipedia.org/wiki/Axial_symmetry
- https://en.wikipedia.org/wiki/Linear_function
- https://en.wikipedia.org/wiki/Slope