What is a Function?
A function in mathematics is a mapping that maps all the elements of a set to the elements in another set. It can be expressed as a graph.
The mathematical function works just like a machine. Suppose you go to a juice shop and you want to drink apple juice. You might have noticed the shopkeeper put the apple slices in a juice maker. After grinding, the apple slices turn into juice and now he can serve you the juice. So the input here was apple slices and the machine used for grinding is a mixer. The output is apple juice.
This is exactly how mathematical functions work. We give some input value and some operation happens. After the operation is done we get the output. The elements in set X are written as the symbol x. If x is the input from the set X, we get the result as f(x).
Components of a Function
The expression we get as the output is called the image. The collection of all the outputs of the mapping is defined as the range. Consider a function . The function is the operator defined here. The result f(x) is an element of the set Y expressed as. The set X is defined as domain and set Y is defined as codomain. The codomain set has all the elements of Y. An element from set X that is mapped to an element of set Y is called a pre-image. The range, which is a part of Y, has all the elements of Y which have pre-images in X.
Let f be a mathematical function mapping the elements in the set X to the set Y. Suppose that it is defined as . 2x is an expression in algebra. It means that returns twice the value of x. If the input is , then the output is . Here number 4 is the image of number 2 and number 2 is the pre-image of number 4. It can be written as an ordered pair with two elements namely the input x and output y as .
If the input is , then the output is . Here, number 16 is the image of number 8 and number 8 is the pre-image of number 16. This can be written as an ordered pair . If the input is , then find the output. Also find what is image, pre-image and how it can be written as an ordered pair.
This is a part of the product of X and Y which gives all possible ordered pairs of X and Y, that is .
The product of two sets X and Y, called the Cartesian product , results as the collection of all possible ordered pairs , where x is a part of X and y is a part of Y .
If X equals the collection of integers 1, 2, and 3 and the set Y equals the integers 7 and 8, the product of X and Y results as the collection of all ordered pairs . Thus, the product is written as .
Note that for a function each is defined to exactly one pair . A function from X to Y is a subset of and cannot have the ordered pairs and , since cannot be paired with two elements of Y in a function.
The elements 1, 2, and 3 of X should be paired with exactly one element of Y. Let set S to be a part of such that . Then S is not a mathematical function from X to Y because the element has not been paired with any element of Y. In other words, 2 has no image.
The subset of is a mathematical function because all the elements belonging to X are paired with only one element of Y (1 is mapped with 7 alone and not 8, 2 is mapped with 7 alone and 3 is mapped with 8 alone) and all the elements of X has an image in Y.
We shall see the difference between relations and functions in mathematics.
In mathematics, a relation by definition is a collection of ordered pairs with some relationship. If and then the product of M and N results in a collection of all possible ordered pairs of M and N.
Define a relation R with a rule that the element is square of .
R is a subset of . But this is not a function because 1 has no image.
Types of Mappings
Having known about the relations and functions let us look at some mappings from set X to set Y to check which relations are functions and which relations are not functions.
There are 4 types of mappings. They are
One-to-One Mapping (1-1)
In mathematics, a relation from X to Y has called a one-to-one mapping if each element in the range maps exactly one point in the domain. A pictorial example is given below.
Domain=. Co-domain=. The range set= . The range by definition is the collection of all such that for some . has only one pre-image 1. has exactly one pre-image 2. Now guess how many pre-images A has and the pre-image/pre-images. This can be expressed in a graph.
Let us look into another example and find point out if it is a 1-1 mapping or not.
Domain=. The range set= . has only one pre-image 1. has exactly one pre-image 2. But C has 2 pre-images namely 3 and 4. Therefore this is not a 1-1 mapping.
Now let us check if 1-1 mapping is a function. For a mapping to be a function we must check two conditions from the definition. All the elements in X must have an image in Y and any element should have one and only one image in Y. The 1-1 mapping satisfies both the conditions.
Therefore, 1-1 mapping is a mathematical function.
In mathematics, a relation from X to Y is called a one-to-many mapping if the elements in the X have more than one image in the range. But is this a function? Note that every element in the domain should have only one image in the codomain of a function. In a one-to-many mapping there can be more than one image. Therefore, this is not a mathematical function.
In the above representation, 3 has two images b and c. This is not a mathematical function.
In mathematics, a relation R from X to Y is called a many-to-one function if any element in the codomain has multiple pre-images.
2 and 3 from the domain have the same image Q in the codomain. The relation satisfies the definition of the function. In the relation , 1 has one image P, 2 has one image Q and 3 has one image Q. All the elements in the domain have an image.
Therefore many to one mapping is a mathematical function.
In mathematics, a relation from X to Y is called a many-to-many mapping if an element in the domain has many images and an element in the codomain has many pre-images.
In the above mapping, the relation .
The element has two images namely and . The element has two images namely and .
Similarly, the element has two pre-images namely and . The element has two pre-images and .
Guess if the relation is a function. This is not a function because some elements in the domain have more than one image.
Therefore, a many-to-many mapping is not a function.
A mathematical function mapping from X to Y is onto if for each element y in the codomain Y, there are one or more pre-images in the domain X. Here, the codomain is the range because all elements have at least one pre-image.
In the above representation, all the elements in the codomain have at least one pre-image. This can be expressed as a graph also.
Therefore this is onto.
In the above representation, has no pre-image. Thus, it is not an onto function. Such a function is called an into function.
Note that in mathematics a function is a special type of relation. This is a special type because even though all functions are relations yet all relations are not functions.
Context and Applications
This topic is significant in the professional exams for both undergraduate and graduate courses, especially for:
- Bachelor of Science in Mathematics
- Master of Science in Mathematics
Want more help with your calculus homework?
*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Functions Homework Questions from Fellow Students
Browse our recently answered Functions homework questions.