Types of Functions

Detailed Explanation with Diagrams

1. One-One Function (Injective)

A function is called one-one if different elements of domain map to different elements of codomain. No two inputs share the same output.

Domain

1
2
3

Codomain

a
b
c

Example: f(x) = x + 1

2. Many-One Function

A function where two or more inputs map to the same output. This is allowed in functions.

Domain

1
2

Codomain

a

Example: f(x) = x²

3. Onto Function (Surjective)

A function is onto if every element of codomain has at least one pre-image in domain.

Domain

1
2

Codomain

a
b

Example: f(x) = x³ (R → R)

4. Into Function

A function is into if at least one element of codomain has no pre-image.

Domain

1
2

Codomain

a
b

Example: f(x) = x² (R → R)

Quick Comparison