Function: Definition, Domain, Range of a Function and Its Types

Illustration explaining the function concept with domain, codomain, range of a function, examples, and types for Class 9 Maths notes by Nisar Math Academy.

A function is one of the most important concepts in mathematics. It explains the relationship between two sets in which every element of the first set is connected with exactly one element of the second set. Functions are widely used in mathematics, science, engineering, economics, and computer science.

In this article, you will learn what is function, its definition, domain, range of a function, types of functions, properties, examples, short notes, MCQs, and a practice worksheet.

Students can also explore more mathematics topics, recorded lectures, lesson plans, assessments, and downloadable notes at Nisar Math Academy. The website provides free notes and sample lectures, while complete courses are available through membership.

What is Function?

A function is a special type of relation that assigns exactly one output to every input.

If a function is represented by f : A → B, then every element of set A has one and only one image in set B.

In simple words, a function is a rule that maps each input to only one output.

Function Definition

Definition:

A function is a relation from set A to set B in which every element of set A is associated with one and only one element of set B.

Mathematically,

f : A → B

where

  • A = Domain
  • B = Codomain
  • f = Function

Domain

The domain of a function is the set of all possible input values.

Example

If

A = {1, 2, 3}

then

Domain = {1, 2, 3}

Codomain

The codomain is the set in which the outputs of a function lie.

Example

If

B = {2, 4, 6, 8}

then

Codomain = {2, 4, 6, 8}

Range of a Function

The range of a function is the set of all actual output values produced by the function.

The range is always a subset of the codomain.

Example

Suppose

A = {1, 2, 3}

B = {2, 4, 6, 8}

and

f(1) = 2

f(2) = 4

f(3) = 6

Then

Range = {2, 4, 6}

Formula of a Function

A function may be written as

f(x) = expression

Examples

f(x) = x + 3

f(x) = x²

f(x) = 2x − 5

Examples of Function

Example 1

A = {1, 2, 3}

B = {4, 5, 6}

1 → 4

2 → 5

3 → 6

This is a function because every element of A has exactly one image.

Example 2

A = {1, 2}

B = {3, 4, 5}

1 → 3

2 → 5

This is also a function.

Example 3

1 → 2

1 → 3

This is not a function because one input has two outputs.

Conditions for a Function

A relation is called a function if

  • Every element of the domain has an image.
  • Each element has only one image.
  • Two different elements may have the same image.
  • An element of the codomain may have no pre-image.

Types of Functions

One-to-One Function (Injective Function)

Different elements of the domain have different images.

Example

1 → A

2 → B

3 → C

Many-to-One Function

Two or more elements of the domain have the same image.

Example

1 → A

2 → A

3 → B

This is still a function.

Onto Function (Surjective Function)

Every element of the codomain has at least one pre-image.

Into Function

Some elements of the codomain have no pre-image.

Identity Function

Every element maps to itself.

Example

1 → 1

2 → 2

3 → 3

Constant Function

Every element of the domain maps to the same element.

Example

1 → 5

2 → 5

3 → 5

Difference Between Relation and Function

RelationFunction
An element may have multiple images.Every element has exactly one image.
May or may not satisfy function rules.Always satisfies function rules.
General association between sets.Special type of relation.

Real-Life Applications of Function

Functions are used in many practical situations, such as

  • Calculating students’ marks
  • Banking systems
  • Computer programming
  • Mobile applications
  • Business analysis
  • Engineering calculations
  • Scientific research
  • Economics
  • Physics
  • Artificial Intelligence

Solved Example 1

Determine whether the following relation is a function.

A = {1,2,3}

B = {4,5,6}

1 → 4

2 → 5

3 → 6

Solution

Each element has exactly one image.

Therefore, it is a function.

Solved Example 2

Find the domain and range.

f(x) = x²

for

A = {−2, −1, 0, 1, 2}

Solution

Domain

{−2, −1, 0, 1, 2}

Outputs

4, 1, 0, 1, 4

Range

{0,1,4}

Key Points

  • A function is a special relation.
  • Every input has exactly one output.
  • Domain contains input values.
  • Codomain contains possible outputs.
  • Range contains actual outputs.
  • Range is always a subset of the codomain.
  • One input cannot have two different outputs.

Short Notes

Function: A relation in which every element of the domain has exactly one image.

Domain: Set of all input values.

Codomain: Set of possible output values.

Range: Set of actual output values.

Types of Functions:

  • One-to-One Function
  • Many-to-One Function
  • Onto Function
  • Into Function
  • Identity Function
  • Constant Function

Important Rule: One input cannot produce two different outputs.

MCQs

1. A function is a special type of

A) Set

B) Relation

C) Number

D) Matrix

Answer: B

2. The set of input values is called

A) Range

B) Codomain

C) Domain

D) Image

Answer: C

3. The actual output values form the

A) Domain

B) Range

C) Codomain

D) Relation

Answer: B

4. Every element of the domain has

A) Two images

B) Three images

C) Exactly one image

D) No image

Answer: C

5. Range is a subset of

A) Domain

B) Universal Set

C) Codomain

D) Empty Set

Answer: C

6. Which is NOT a function?

A) 1→2, 2→3

B) 1→2, 1→3

C) 2→5

D) 3→6

Answer: B

7. Identity function maps each element to

A) Zero

B) Another element

C) Itself

D) Infinity

Answer: C

8. A constant function assigns

A) Different outputs

B) Same output to every input

C) Two outputs

D) No output

Answer: B

9. Many-to-One function is

A) Not a function

B) A valid function

C) A relation only

D) Impossible

Answer: B

10. Function is represented by

A) A ↔ B

B) A → B

C) A × B

D) A ÷ B

Answer: B

Worksheet / Assignment

Q1. Define a function.

Q2. Explain the domain with an example.

Q3. Define the range of a function.

Q4. Differentiate between domain and range.

Q5. Explain the codomain.

Q6. State the conditions of a function.

Q7. Explain one-to-one and many-to-one functions with examples.

Q8. Explain onto and into functions.

Q9. Write five real-life applications of functions.

Q10. Determine whether the following relations are functions.

a)

1 → A

2 → B

3 → C

b)

1 → A

1 → B

2 → C

c)

1 → A

2 → A

3 → B

d)

4 → X

5 → Y

6 → Z

Q11. Find the domain and range of

f(x) = x²

for A = {−3, −2, −1, 0, 1, 2, 3}

Q12. Write short notes on

  • Function
  • Domain
  • Codomain
  • Range
  • Identity Function
  • Constant Function

Conclusion

A function is one of the most fundamental concepts in mathematics. Understanding what is function, the domain, and the range of a function helps students solve advanced mathematical problems with confidence. Mastering the different types of functions builds a strong foundation for algebra, calculus, and higher mathematics. Students are encouraged to practice the worksheet and MCQs and explore additional notes, recorded lectures, and assessments available on Nisar Math Academy.

WordPress Tags:

Binary Relations: Definition, Examples, Types and Properties | Complete Student Notes

Operations on Sets – Definition, Examples, Basic Operations

Types of Sets in Mathematics: Definition, Examples and Different Types of Sets

================================================================

Leave a Reply

Your email address will not be published. Required fields are marked *

© Copyright 2026 - Function: Definition, Domain, Range of a Function and Its Types « Nisar Math Academy. All rights reserved.

Nisar Ahmad