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).

"Function"

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 f:XY. The function is the operator defined here. The result f(x) is an element of the set Y expressed as f x =y. 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.

"Components of a Function"

Example

Let f be a mathematical function mapping the elements in the set X to the set Y. Suppose that it is defined as f x =2x. 2x is an expression in algebra. It means that f x =y returns twice the value of x. If the input is x=2, then the output is f x =4. 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 2,4 .

If the input is x=8, then the output is f x =16. 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 8,16 . If the input is x=10, then find the output f x . 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 X×Y.

Cartesian Product

The product of two sets X and Y, called the Cartesian product X×Y, results as the collection of all possible ordered pairs x,y , where x is a part of X xX and y is a part of Y yY .

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 1,7 , 1,8 , 2,7 , 2,8 , 3,7 , 3,8 . Thus, the product is written as X×Y= 1,7 , 1,8 , 2,7 , 2,8 , 3,7 , 3,8 .

Note that for a function each xX is defined to exactly one pair x,y . A function from X to Y is a subset of X×Yand cannot have the ordered pairs 1,7 and 1,8 , since 1X 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 X×Y such that S= 1,7 , 3,8 . Then S is not a mathematical function from X to Y because the element 2X has not been paired with any element of Y. In other words, 2 has no image.

The subset R= 1,7 , 2,7 , 3,8 of X×Y 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.

Pictorial Examples

Functions

"Example of Functions"

Not functions

"Not function"

Relation

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 M= 1,4,5 and N= 4,9,16,25 then the product of M and N results in a collection of all possible ordered pairs of M and N.

M×N= 1,4 , 1,9 ,(1,16),(1,25),(4,4),(4,9),(4,16),(4,25),(5,4),(5,16),(5,25)

Define a relation R with a rule that the element nN is square of mM.

Then R= (4,16),(5,25) .

R is a subset of M×N. 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

  1. One-to-one
  2. One-to-many
  3. Many-to-one
  4. Many-to-many

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.

"One to one mapping"

Domain= 1,2,3 . Co-domain= D,B,C,A . The range set= D,B,A . The range by definition is the collection of all yYsuch that y=f(x) for some xX. DY has only one pre-image 1. BYhas 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.

"One to one mapping"

Domain= 1,2,3,4 . The range set= D,B,C . DY has only one pre-image 1. BYhas 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 xXshould have one and only one image in Y. The 1-1 mapping satisfies both the conditions.

Therefore, 1-1 mapping is a mathematical function.

One-to-Many Mapping

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.

"One to many mapping"

In the above representation, 3 has two images b and c. This is not a mathematical function.

Many-to-One Mapping

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.

"Many to one mapping"

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 R= 1,P , 2,Q , 3,Q , 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.

Many-to-Many Mapping

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.

"Many to many mapping"

In the above mapping, the relation R= 0,2 , 0,3 , 1,3 ,(2,4),(3,4),(3,5) .

The element 0X has two images namely 2Y and 3Y. The element 3X has two images namely 4Y and 5Y.

Similarly, the element 3Y has two pre-images namely 0X and 1X. The element 4Y has two pre-images 2X and 3X.

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.

Onto 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.

"Onto function"

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.

"Into function"

In the above representation, RY has no pre-image. Thus, it is not an onto function. Such a function is called an into function.

Common Mistakes

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?

We've got you covered with step-by-step solutions to millions of textbook problems, subject matter experts on standby 24/7 when you're stumped, and more.
Check out a sample calculus Q&A solution here!

*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.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
MathCalculus

Fundamentals of Calculus

Functions Homework Questions from Fellow Students

Browse our recently answered Functions homework questions.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
MathCalculus

Fundamentals of Calculus