
Mathematical Function
A function is a rule or relationship between two sets that assigns each element of a first set, called the domain, to a unique element of another set, called the codomain.
In everyday life, there are many functional relationships: every person has an age, every country has a capital city, and every word has an initial letter. In mathematics, we frequently work with relationships between two quantities where one depends on the other. For example, the area A of a circle depends on its radius r through the formula \(A = \pi r^2\). This relationship is a function because each possible radius corresponds to a single, unique area value.
To visualize how a function \(f\) works, it helps to imagine it as a processing machine. When we input a value \(x\) from the domain, the machine applies the function rule and produces a single output value \(y = f(x)\), read as “f of x” and called the image (or output) of \(x\). Since the value of \(y\) depends on the choice of \(x\), we call \(x\) the independent variable and \(y\) the dependent variable.
We can also represent a function using a mapping diagram (or arrow diagram) that connects the elements of the starting set \(A\) to those of the target set \(B\). Not every relationship between sets is a function; for it to qualify, two conditions must be met:
- Existence: Every element in the starting set \(A\) must be paired with an element in the target set \(B\). In symbols: \(\forall x \in A, \, \exists y \in B \mid (x, y) \in f\).
- Uniqueness: Each element of \(A\) must be paired with a single element of \(B\); in other words, two different arrows cannot branch out from the same input element. In symbols: \((x, y) \in f \land (x, z) \in f \implies y = z\).
Table of Contents
Components of a Function
To completely define a function, we need to identify four components that determine which values go in, which values come out, and how they are related:
- Domain: The set of all possible input values for which the function is defined. It is commonly denoted as \(D_f\) or \(\text{Dom}(f)\).
- Codomain: The target set of the function, which contains all permissible output values.
- Range: Also called the image of the function, it is the subset of the codomain consisting solely of the actual output values obtained by applying the function to the elements of the domain. It is denoted as \(R_f\) or \(\text{Im}(f)\).
- Function rule: The formula or procedure that specifies how each element of the domain is paired with its corresponding element in the codomain.
A common mistake is confusing the codomain with the range, as they do not always coincide. While the codomain is the broader set where outputs are allowed to land, the range gathers only the values actually reached, meaning that \(R_f \subseteq \text{Codomain}\) always holds.
Example
Consider the function defined by \(f(x) = x^2\). Let’s examine its components:
The domain is the entire set of real numbers (\(\mathbb{R}\)), since any real number can be squared. The codomain is also defined as \(\mathbb{R}\); however, the range is only the interval \([0, +\infty)\), because the square of a real number is never negative. In this case, negative numbers belong to the codomain, but they are not part of the range.
Although the domain and codomain can consist of any type of objects, algebra and calculus work primarily with sets of real numbers; such functions are called real-valued functions of a real variable (or simply real functions).
Function Notation and Evaluating Functions
To name a function, we typically use the lowercase letter \(f\), though \(g\), \(h\), \(p\), \(q\), or uppercase letters such as \(F\), \(G\), and \(H\) are also used to distinguish multiple functions within the same problem. By convention, the last letters of the alphabet—such as \(t\), \(u\), \(v\), \(w\), \(x\), \(y\), and \(z\)—are reserved for variables.
Thus, the expression \(y = f(x)\) indicates that \(y\) is the result of applying the rule \(f\) to the value \(x\), though expressions like \(w = G(z)\) or \(v = h(t)\) are equally valid. For instance, in the formula for the area of a circle, \(A = \pi r^2\), the independent variable is \(r\) and the dependent variable is \(A\), so we can write it in function notation as \(A(r) = \pi r^2\).
When we want to explicitly specify the sets between which a function operates, we use the following notation:
$$f: A \to B \\ x \mapsto f(x)$$
Each symbol in this expression serves a specific purpose:
- \(f:\) indicates the name assigned to the function.
- \(A \to B\) specifies the starting set or domain (\(A\)) and the target set or codomain (\(B\)).
- \(x \mapsto f(x)\) shows the assignment rule that maps each individual element \(x\) to its output \(f(x)\).
For example, the notation \(f: \mathbb{R} \to \mathbb{R}\) defined by \(x \mapsto x^2\) (or \(f(x) = x^2\)) is read as: “\(f\) is a function from the real numbers to the real numbers that maps each \(x\) to \(x^2\).”
Depending on how the equation is written, a function can be expressed in explicit form, when the dependent variable is isolated in terms of the independent variable, or in implicit form, when both variables appear together in an equation without either being isolated. For example, the explicit equation \(y = 2x + 3\) and the implicit equation \(2x - y + 3 = 0\) represent the exact same function.
Evaluating Functions
Evaluating a function means calculating the output value that corresponds to a specific input value. To do this, we substitute the given number or expression for the independent variable in the function rule and simplify the resulting expression.
Example 1
Given the function \(f(x) = 3x^2 - 2x + 1\), find \(f(-2)\).
To find the output at \(-2\), we replace every occurrence of \(x\) with \(-2\), using parentheses to keep track of signs:
$$f(-2) = 3(-2)^2 - 2(-2) + 1$$
$$f(-2) = 3(4) + 4 + 1 = 12 + 4 + 1 = 17$$
Therefore, the value of the function at \(x = -2\) is \(17\).
Example 2
Evaluate the function \(g(x) = 2x + 5\) for the expression \(x = a + 1\).
We substitute the entire binomial \((a + 1)\) for the variable \(x\) and apply the distributive property:
$$g(a + 1) = 2(a + 1) + 5 = 2a + 2 + 5 = 2a + 7$$
Thus, the output of \(g\) at \(a + 1\) is the expression \(2a + 7\).
Ways to Represent a Function
The same function can be expressed in different ways depending on the context of a problem. The four standard representations are a verbal description, an algebraic formula, a table of values, and a graph on the coordinate plane:
- Verbal description: Describes in words the rule relating the two quantities. For example, “every real number is paired with its square.”
- Formula or equation: Expresses the function rule using algebraic symbols, allowing any output to be computed directly. Following the previous example, this is written as \(f(x) = x^2\).
- Table of values: Organizes selected values of the independent variable \(x\) alongside their corresponding outputs \(y = f(x)\) in rows or columns.
- Graph: Plots the set of all ordered pairs \((x, y)\) where \(y = f(x)\) on the Cartesian coordinate plane, providing a visual picture of the function’s overall behavior.
To illustrate the last two representations, let’s build a table of values for the function \(f(x) = x^2\) using a few integers and then plot those points \((x, y)\) on the coordinate plane:
| \(x\) | \(-2\) | \(-1\) | \(0\) | \(1\) | \(2\) |
| \(y = f(x)\) | \(4\) | \(1\) | \(0\) | \(1\) | \(4\) |
By plotting the ordered pairs \((-2, 4)\), \((-1, 1)\), \((0, 0)\), \((1, 1)\), and \((2, 4)\) on the coordinate system and connecting them with a smooth curve across all real numbers, we obtain the parabola corresponding to the function:
On a graph, the points where the curve crosses the coordinate axes—if any exist—stand out as key features. The intersections with the horizontal axis are called the zeros or roots (or x-intercepts) of the function and correspond to the \(x\)-values where \(f(x) = 0\). Meanwhile, the y-intercept (or vertical axis intercept) occurs at the point \((0, f(0))\), provided that \(0\) belongs to the domain of the function; due to the uniqueness condition, a function can have multiple zeros, but at most one \(y\)-intercept.
The Vertical Line Test
Not every curve drawn on the coordinate plane represents a function. To visually check whether a graph corresponds to a function, we apply the Vertical Line Test:
A graph on the coordinate plane represents a function if and only if no vertical line intersects it at more than one point.
If there is at least one vertical line that crosses the curve at two or more distinct points, it means that a single \(x\)-value produces multiple \(y\)-values, violating the uniqueness condition. Conversely, if every vertical line intersects the graph at most once, each value in the domain is guaranteed to have a single output.
Examples of Functions and Non-Functions
To solidify the concept, let’s first examine several cases where the existence and uniqueness conditions hold, and then contrast them with relations that do not qualify as functions.
Examples of Functions
In mathematics and applied sciences, we encounter numerous functions defined by algebraic or transcendental formulas, each with its natural domain:
- Linear function: \(f(x) = 2x\) assigns each real number \(x\) to twice its value. Its domain is \(\mathbb{R}\), and each input corresponds to a unique output.
- Absolute value function: \(g(x) = |x|\) assigns each real number to its distance from zero on the number line. Even though opposite numbers share the same output (for example, \(g(-3) = 3\) and \(g(3) = 3\)), it is still a function because every input has a single output.
- Square root function: \(f(x) = \sqrt{x}\) returns the principal (non-negative) square root of \(x\). For the output to be a real number, its domain must be restricted to the non-negative real numbers \([0, +\infty)\).
- Reciprocal function: \(y = \dfrac{1}{x}\) pairs each nonzero real number with its multiplicative inverse. Its domain is \((-\infty, 0) \cup (0, +\infty)\), since division by zero is undefined.
- Natural logarithm function: \(h(x) = \ln(x)\) assigns each positive real number to its base-\(e\) logarithm, so its domain is the open interval \((0, +\infty)\).
There are also everyday or experimental functions that do not always start from a simple equation, but rather from measurements or assignment rules:
- The boiling point of pure water as a function of altitude above sea level: each altitude corresponds to a single boiling temperature.
- The distance traveled by a vehicle moving at a constant speed as a function of elapsed time.
- The shipping cost of a package as a function of its exact weight according to a courier’s rate schedule.
Relations That Are Not Functions
A relation between two variables fails to be a function when the uniqueness condition is violated (one input has more than one output) or when existence fails over the stated domain:
- Equation of a circle: The relation \(x^2 + y^2 = r^2\) (with \(r > 0\)) does not define \(y\) as a function of \(x\) because it fails uniqueness. For instance, at \(x = 0\), we get two distinct outputs: \(y = r\) and \(y = -r\).
- Horizontal parabola: The equation \(x = y^2\), treating \(x\) as the independent variable, is not a function either, since a single positive value of \(x\) yields two opposite square roots (\(y = \sqrt{x}\) and \(y = -\sqrt{x}\)).
- Inequalities: The relation “\(x\) is less than \(y\)” (\(x < y\)) is not functional because for a given number such as \(x = 2\), there are infinitely many larger possible values (\(y = 3\), \(y = 5\), \(y = 10\), and so on).
- Divisibility relation: “\(y\) is a multiple of \(x\)” does not define a function either, given that any nonzero integer has infinitely many multiples.
Classification of Functions
Mathematical functions are grouped according to various analytical criteria, the most common being the structure of their algebraic expression, the relationship between elements of their sets, and their graphical behavior.
By Algebraic Expression
Based on the mathematical operations involved in their function rule, functions fall into two major families:
- Algebraic functions: Functions whose rule is built using a finite number of elementary algebraic operations (addition, subtraction, multiplication, division, exponentiation, and root extraction) applied to polynomials. This group includes constant, linear, quadratic, cubic, higher-degree polynomial, rational, radical, absolute value, and piecewise functions.
- Transcendental functions: Functions that cannot be expressed through finite algebraic operations and require limiting processes. Prominent examples in this group include exponential, logarithmic, trigonometric, and hyperbolic functions.
By Relationship Between Domain and Codomain
When analyzing how elements of the starting set map to the target set, we distinguish three structural properties:
- One-to-one (injective) functions: Each element of the range is the image of a unique element in the domain; that is, distinct inputs always produce distinct outputs (\(x_1 \neq x_2 \implies f(x_1) \neq f(x_2)\)).
- Onto (surjective) functions: Every element of the codomain is the image of at least one element in the domain, meaning the range coincides exactly with the codomain.
- Bijective functions: Functions that are both one-to-one and onto at the same time, guaranteeing a exact one-to-one correspondence and ensuring that an inverse function exists.
By Behavior and Analytical Properties
In mathematical analysis and graphing, it is also useful to classify functions according to the following characteristics:
- Increasing and decreasing behavior (monotonicity): Depending on whether output values rise, fall, or remain unchanged as we move along the horizontal axis, a function can be increasing, decreasing, or constant on an interval.
- Symmetry (even and odd functions): Functions are classified as even functions (symmetric about the \(y\)-axis, \(f(-x) = f(x)\)), odd functions (symmetric about the origin, \(f(-x) = -f(x)\)), or neither.
- Continuity: Functions can be continuous, when their graph has no breaks, jumps, or holes across their domain, or discontinuous at specific points.
- Periodicity: Periodic functions are those whose values repeat at regular intervals of the independent variable, as seen in sine and cosine functions.
Operations with Functions
Given two or more known functions \(f\) and \(g\) with domains \(D_f\) and \(D_g\), we can construct new functions through arithmetic operations, composition, or inversion:
- Addition and subtraction: Defined as \((f + g)(x) = f(x) + g(x)\) and \((f - g)(x) = f(x) - g(x)\). The resulting domain is the intersection of the original domains, \(D_f \cap D_g\).
- Multiplication: The product of two functions is given by \((f \cdot g)(x) = f(x) \cdot g(x)\), also defined over the intersection \(D_f \cap D_g\).
- Division: The quotient is expressed as \(\left(\dfrac{f}{g}\right)(x) = \dfrac{f(x)}{g(x)}\), with domain \(D_f \cap D_g\) excluding any values where the denominator equals zero (\(g(x) = 0\)).
- Function composition: Involves applying one function to the output of another. It is denoted \((f \circ g)(x) = f(g(x))\) and read as “\(f\) composed with \(g\).” For this to be defined, the outputs of \(g(x)\) must lie within the domain of \(f\).
- Inverse function: If \(f\) is a bijective function from \(A\) to \(B\), there exists a unique inverse function \(f^{-1}\) from \(B\) to \(A\) that reverses the original mapping, satisfying \(f^{-1}(y) = x \iff f(x) = y\).
Content on Functions
Did you find this useful? Rate it!
0.0 / 5 — 0 votes
HOW TO CITE THIS ARTICLE
Machado, D. (2026, November 28). Mathematical Function. Flamath. https://en.flamath.com/math-function
Leave a Reply





Related Articles