Home » Math Theory » Algebra » Function


What is a function?

A function is a binary relation between two sets that connect each element of the first set to exactly one element of the second set. In simple terms, a function relates an input to an output. In 1837, a German mathematician, Peter Dirichlet, defined a function as:

If a variable y is so related to a variable x that whenever a numerical value is assigned to x, there is a rule according to which a unique value of y is determined, then y is said to be a function of the independent variable x.

In its simplest form, a function is a process that associates each element of a set X with a single element of a set Y.

In formal terms, a function f from a set X to a set Y is defined by a set G of ordered pairs (x, y) with x∈X, y∈Y, where each element of X is the first component of exactly one ordered pair in G. 

In other words, there is exactly one element y such that the ordered pair (x, y) belongs to the set of pairs defining the function f for each x in X. The set G is referred to as the function’s graph. It is occasionally associated with the function, but this obscures the conventional interpretation of a function as a process. As a result, the function is frequently distinguished from its graph in common usage.

Although some authors make a distinction between “maps” and “functions,” functions are also referred to as maps or mappings.

How can we say that it is a function?

We already know the definition of a function, but how can we say that it is really a function? These are the things that you need to consider to say that a mathematical statement is a function or not.

  • A relation is a function if and only if every element of Set A has only one image in Set B.
  • A function is a relation derived from a non-empty set B such that its domain is A and no two distinct ordered pairs in the function f share their first element.
  • A function from A→B and a, b ϵ f, then fa=b, where b is the image of a under the function f, and a is the pre-image of b under f. 
  • If there exists a function f:A →B, the domain is denoted as the set A, and the codomain is represented as set B.

One-to-one function

If no two elements in the domain of f correspond to the same element in the range of f, then the function is said to be one-to-one. In other words, for each x in the domain, the range contains exactly one image. Furthermore, no y in the range corresponds to more than one x in the domain.

The figure below describes a one-to-one function.

Many-to-one function

A function is said to be many-to-one if it has y values mapped to more than one x value.

The image below illustrates the many-to-one function.

What are the types of functions?


Functions that are injective mean it eliminates the possibility of having two or more “A”s pointing to the same “B.”

In the formal definition of a one-to-one function or an injective function, it is defined as:

A function f:A →B is said to be injective (or one-to-one, or 1-1) if for any x, y ∈A, fx=f(y) which implies x = y. Alternatively, we can use the contrapositive formulation: x≠y, which implies fx≠f(y), although in practice, usually the former is more effective.

Say, for example, if fx= x+3 from the set of R to R, can we say that it is injective?

To say that a function is injective, it should satisfy that fx=f(y) and x = y. Thus, if we are to check it, if we let x = 1, then f(x) = 4 by substitution. So if we say that f(y) = 4, the only value of y that will satisfy the function is 3. 

Hence, it is true for fx=f(y) and x = y.

Therefore, we can conclude that it is injective.


Functions that are surjective means that every “B” has at least one matching “A.” This means that, there shouldn’t be any “B” that is not pointed by A. In simple terms, every B has some A. 

In the formal definition of a surjective function or onto function, it is defined as:

A function f:A →B is said to be surjective (or onto) if rng(f) = B. That is, for every b ∈B there is some a ∈A for which fa=b.

The illustration below shows the examples of a surjective function and a not surjective function.

SurjectiveNot Surjective


A bijective function is both injective and surjective. Consider it a “perfect pairing” of the sets such that each has a partner and no one is left out. As a result, the elements of the sets have perfect “one-to-one correspondence.” 

In the formal definition of a bijective function, it is defined as:

A function f:A →B is said to be bijective (or one-to-one and onto) if it is both injective and surjective. 

To say that a function is bijective, it must satisfy the following conditions

  • each element of A must have at least one element of B;
  • no element of A must be paired with more than one element of B;
  • each element of B must be paired with at least one element of A; and
  • no element of B may be paired with more than one element of A.  

Take note:

  • A one-to-one function is different from a one-to-one correspondence.
  • A surjective function can be a many-to-one function, but not all many-to-one functions are surjective. 

What is the domain, codomain, and range of a function?

The fact that f is a function from set X to set Y is denoted as f:X→Y. In the definition of a function, X and Y are referred to as the function’s domain and codomain, respectively. If (x, y) is a member of the set defining f, then y is either the image of x subtracted from f or the value of f applied to the argument x. In the context of numbers, one can also say that y is the value of f of x of its variable, or, more succinctly, that y is the value of f of x, denoted by y = f(x).

When a function is defined, the domain and codomain are not always specified explicitly. Without performing some computation, one may only know that the domain is contained within a larger set. This is frequently the case in mathematical analysis, where “a function from X to Y” frequently refers to a function with a proper subset of X as a domain. 

A function’s range is defined as the collection of all elements’ images. The range is occasionally used interchangeably with codomain.

What are the notations used to denote a function?

There are numerous ways for denoting functions. The most frequently used notation is the functional notation, which defines the function through an equation that explicitly specifies the function and argument names. This distinction between language and notation can become significant in situations where functions act as inputs to other functions. 

Functional Approach

In 1734, Leonhard Euler denoted functions by a single italicized letter, most frequently the lower-case letters f, g, or h. Some widely known and used functions are denoted by a symbol composed of letters. In which case, a roman type, such as “sin” for the sine function, is typically used instead of an italic font for single-letter symbols.

The notation y = f(x), which is read as y equals the function of x, means that the pair (x, y) belongs to the set of pairs that defines the function f. If X is the domain of f, then the set of pairs defining the function is denoted using a set-builder notation. Thus, 

{x, fx | x ϵ X}

Arrow Notation

The arrow notation is frequently used to explicitly express the domain X and codomain Y of a function f. Thus,  f:X →Y is read as “the function f  from X to Y” or “the function f mapping elements of X to elements of Y.”

Index Notation

Most often, index notation is used in place of functional notation. That is, rather than writing f(x), one writes fx.

This is frequently the case for functions with a domain defined by the set of natural numbers. Such a function is referred to as a sequence, and in this case, the element fn  is referred to as the sequence’s nth element.

Additionally, the index notation is frequently used to distinguish certain variables referred to as parameters from “true variables.” Parameters are defined as specific variables that are assumed to be constant throughout the course of a problem’s investigation.

Dot Notation

The symbol x does not represent any value in the notation x → f(x); it is simply a placeholder, indicating that if x is replaced by any value on the left of the arrow, it should be replaced by the same value on the right. As a result, x may be replaced with any symbol, most frequently the interpunct “”. This may be useful for differentiating between the function f and its value f(x) at x.

Specialized Notation

Other, more specialized notations exist for functions in various branches of mathematics. For instance, in linear algebra and functional analysis, linear forms, and the vectors on which they act are denoted by a dual pair to demonstrate the underlying duality. This is similar to the bra–ket notation used in quantum mechanics. 

In logic and computation theory, the lambda calculus function notation is used to express explicitly the fundamental concepts of function abstraction and application. In category theory and homological algebra, networks of functions are described in terms of how they and their compositions commute using commutative diagrams that extend and generalize the arrow notation described above.

How do we specify a function?

Given a function f(x), each element x of the domain of the function f has a unique element associated with it, that is the value f(x) is at x. There are a number of ways to explicitly or implicitly specify or describe the relationship between f(x) and x.

Occasionally, a theorem or axiom asserts the existence of a function with certain properties without elaborating. Frequently, the specification or description of the function f is referred to as its definition.

By listing function values

On a finite set, a function can be defined by listing the codomain elements that are associated with the domain elements.

Say, for example there exist X={4,  5,  6}, then, we can define a function f:X→R by f1 =4, f2 =5,  f3 =6.

By formula

Often, functions are defined using a formula that combines arithmetic operations and previously defined functions; this formula enables computing the value of the function from the value of any domain element.

For example, if there exist a function f:X→R and defined by fx=x+2 for every 

x ∈{1, 2, 3 }, then we can determine the codomain of the function. Thus, f1 =3, f2 =4,  f3 =5.

When a function is defined in this manner, determining its domain can be challenging. If the function’s definition formula contains divisions, the domain must exclude values of the variable for which the denominator is zero; thus, for a complicated function, the domain is determined by computing the zeros of auxiliary functions. 

Oftentimes, functions are classified according to the nature of the formulas that define them, such as: 

  • Quadratic functions – quadratic function is a function that is denoted by 

f)x)=ax2+bx+c, where a, b, and c are constants.

  • Polynomial functions – are functions that can be defined using only addition, subtraction, multiplication, and exponentiation with respect to nonnegative integers. For example, f(x)= 4x5+x2-1. 
  • Rational functions – rational functions are functions that can be written in the ratio of two polynomials. Say, for example, f(x)= $\frac{x + 2}{x – 3}$ and f(x)=$\frac{x – 1}{x^2+2x+3}$.
  • Elementary functions – an elementary function is a function of a single variable that can be real or complex which is defined as the sums, products, and compositions of an infinitely large number of polynomial, rational, trigonometric, hyperbolic, and exponential functions, as well as their inverse functions.

By recurrence

Sequences are frequently defined by recurrence relations. Sequences are functions whose domain is nonnegative integers.

The factorial function on nonnegative integers (n → n!) is a fundamental example, as it is defined by the recurrence relation where,

n!=n (n-1)! for n>0, and the initial condition of 0! = 1.

How do we represent a function?

Functions can be represented in various ways such as graphing and using the table of values.

Using table of values

A function can be thought of as a collection of values. If a function’s domain is finite, it can be completely specified in this manner. For example, if the function with a finite domain f:{-2, -1,  0 , 1,  2}→ R as f(x)=x+2. Then, the function can be represented by table of values such that:


Using graphing

A graph is frequently used to depict a function intuitively. As an illustration of how a graph can aid in the comprehension of a function, it is straightforward to determine whether a function is increasing or decreasing based on its graph. 

We usually use a 2-dimensional coordinate system called the Cartesian plane to identify the x, y coordinates when graphing functions. 

Illustrated below are samples of the graphs of functions such as linear, quadratic, and cubic functions.

Using graphs to represent a function can easily help us determine if it is a polynomial function, trigonometric function, or an absolute value function.

What is the significance of functions?

Functions are widely used in science and the majority of mathematical disciplines. According to some, functions are the “central objects of investigation” in the majority of branches of mathematics. 

Functions are the mathematical building blocks that enable the design of machines, the prediction of natural disasters, the cure of diseases, the understanding of global economies, and the operation of airplanes. Functions can take multiple variables as input but always return the same output, which is unique to that function.

A function in computer programming refers to a section of a computer program that implements the abstract concept of function. It is a component of a program that generates an output for each input. However, in many programming languages, every subroutine is referred to as a function, even if there is no output and the functionality is limited to modifying some data in the computer’s memory. Functional programming is a programming paradigm that relies on subroutines that behave like mathematical functions to construct programs.

Functions Worksheets
Multiplication of Functions (Travel and Tours Themed) Worksheets
Division of Functions (Health and Fitness Themed) Worksheets

Link/Reference Us

We spend a lot of time researching and compiling the information on this site. If you find this useful in your research, please use the tool below to properly link to or reference Helping with Math as the source. We appreciate your support!

  • "Function". Helping with Math. Accessed on June 16, 2024. https://helpingwithmath.com/function/.

  • "Function". Helping with Math, https://helpingwithmath.com/function/. Accessed 16 June, 2024.

  • Function. Helping with Math. Retrieved from https://helpingwithmath.com/function/.