Mathematics | Classes (Injective, surjective, Bijective) of Functions

A function f from A to B is an assignment of exactly one element of B to each element of A (A and B are non-empty sets). A is called Domain of f and B is called co-domain of f. If b is the unique element of B assigned by the function f to the element a of A, it is written as f(a) = b. f maps A to B. means f is a function from A to B, it is written as  f:A\rightarrow B

Terms related to functions:

  • Domain and co-domain – if f is a function from set A to set B, then A is called Domain and B is called co-domain.
  • Range – Range of f is the set of all images of elements of A. Basically Range is subset of co- domain.
  • Image and Pre-Image – b is the image of a and a is the pre-image of b if f(a) = b.

Properties of Function:

  1. Addition and multiplication: let f1 and f2 are two functions from A to B, then f1 + f2 and f1.f2 are defined as-:
    f1+f2(x) = f1(x) + f2(x). (addition)
    f1f2(x) = f1(x) f2(x). (multiplication)
  2. Equality: Two functions are equal only when they have same domain, same co-domain and same mapping elements from domain to co-domain.

Types of functions:

  1. One to one function(Injective): A function is called one to one if for all elements a and b in A, if f(a) = f(b),then it must be the case that a = b. It never maps distinct elements of its domain to the same element of its co-domain.

    We can express that f is one-to-one using quantifiers as \forall a\forall b(f(a)\doteq f(b)\rightarrow a= b) or equivalently \forall a \forall b(a\neq b\rightarrow f(a)\neq f(b)), where the universe of discourse is the domain of the function.

  2. Onto Function (surjective): If every element b in B has a corresponding element a in A such that f(a) = b. It is not required that a is unique; The function f may map one or more elements of A to the same element of B.

  3. One to one correspondence function(Bijective/Invertible): A function is Bijective function if it is both one to one and onto function.


  4. Inverse Functions:Bijection function are also known as invertible function because they have inverse function property. The inverse of bijection f is denoted as f-1. It is a function which assigns to b, a unique element a such that f(a) = b. hence f-1 (b) = a.

Some Useful functions -:

Strictly Increasing and Strictly decreasing functions: A function f is strictly increasing if f(x) > f(y) when x>y. A function f is strictly decreasing if f(x) < f(y) when x<y.

Increasing and decreasing functions: A function f is increasing if f(x) ≥ f(y) when x>y. A function f is decreasing if f(x) ≤ f(y) when x<y.

Function Composition: let g be a function from B to C and f be a function from A to B, the composition of f and g, which is denoted as fog(a)= f(g(a)).

Properties of function composition:

  1. fog ≠ gof
  2. f-1 of = f-1 (f(a)) = f-1(b) = a.
  3. fof-1 = f(f-1 (b)) = f(a) = b.
  4. If f and g both are one to one function, then fog is also one to one.
  5. If f and g both are onto function, then fog is also onto.
  6. If f and fog both are one to one function, then g is also one to one.
  7. If f and fog are onto, then it is not necessary that g is also onto.
  8. (fog)-1 = g-1 o f-1

Some Important Points:

  1. A function is one to one if it is either strictly increasing or strictly decreasing.
  2. one to one function never assigns the same value to two different domain elements.
  3. For onto function, range and co-domain are equal.
  4. If a function f is not bijective, inverse function of f cannot be defined.

This article is contributed by Nitika Bansal

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Article Tags :


Please write to us at to report any issue with the above content.