- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Composition of Functions of Set
Two functions f: A → B and g: B → C can be composed to give a composition g o f. This is a function from A to C defined by (g o f)(x) = g(f(x))
Example
Let f(x) = x + 2 and g(x) = 2x + 1, find (f o g)(x) and (g o f)(x).
Solution
(f o g)(x) = f(g(x)) = f(2x + 1) = 2x + 1 + 2 = 2x + 3
(g o f)(x) = g (f(x)) = g(x + 2) = 2 (x+2) + 1 = 2x + 5
Hence, (f o g)(x) ≠ (g o f)(x)
Some Facts about Composition
If f and g are one-to-one then the function (g o f) is also one-to-one.
If f and g are onto then the function (g o f) is also onto.
Composition always holds associative property but does not hold commutative property.
Advertisements