Starting Idea (शुरुआती समझ)
जब हमारे पास दो functions होते हैं, तो कई बार हम एक function के output को दूसरे function के input के रूप में use करते हैं। इसी process को Composition of Functions कहते हैं।
सरल शब्दों में, एक function के बाद दूसरे function को apply करना ही composition है।
Basic Meaning
अगर पहले function apply किया जाए और उसके बाद function , तो resulting function को composition of functions कहते हैं।
इसे इस प्रकार लिखा जाता है:इसे पढ़ते हैं:
“f composed with G”
Definition
यदि और दो functions हों, तो उनका composition एक function होता है जो से में map करता है, और
Important Condition
Composition तभी possible होता है जब पहले function का output, दूसरे function के domain में आता हो।
मतलब:
का codomain = का domain होना चाहिए (या कम से कम उसमें शामिल होना चाहिए)
Example 1
मान लें:
अब,
पहले निकालेंगे:
अब इसे में put करेंगे:
Result
Understanding
यहाँ process यह है:
पहले पर लगा
फिर जो result आया, उस पर लगाया गया
Example 2
मान लें:
अब,
Result
Reverse Order
अब अगर order बदल दें:
तो,
Observation
लेकिन
दोनों same नहीं हैं
Important Conclusion
Composition of functions generally commutative नहीं होता
अर्थात,
Example 3
मान लें:
अब,
और,
फिर से दोनों different हैं
Domain and Codomain in Composition
अगर
और
तो
इसका मतलब composition का final output first function के input set से लेकर last function के output set तक जाता है।
Associative Property
Composition of functions associative होता है
मतलब grouping बदलने से result नहीं बदलता, लेकिन order वही रहना चाहिए।
Example 4
मान लें:
पहले:
फिर:
अब दूसरी तरफ:
फिर:
दोनों same होंगे जब सही substitution किया जाए, इसलिए composition associative होता है।
Identity Function and Composition
अगर identity function है, तो
इसका मतलब identity function composition में कोई बदलाव नहीं करता।
Example 5
मान लें:
तो,
और,
Real Understanding
Composition का मतलब simply “function inside function” है।
पहले inner function solve होता है, फिर outer function apply होता है।
इसे समझने के लिए हमेशा यह याद रखो:
में पहले लगेगा, फिर
Final Understanding
Composition of Functions में एक function का output दूसरे function का input बनता है।
यह operation useful है क्योंकि इससे complex mappings को step by step समझा जा सकता है।
यह generally commutative नहीं होता, लेकिन associative होता है।