ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalGE-167Function Composition
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    GE-167

    Discrete Structures

    Progress0 / 67 done
    Topics67
    1Propositional and Predicate Logic
    2Logical Operators3Translations Between Symbolic Expressions and Formal English Expression4Logical Equivalences
    5Quantifiers6Nested Quantification7Equivalences in Predicate Logic8Translations Between Symbolic Forms and Formal English
    9Proof Methods and Strategies10Direct Proof11Proof by Contraposition12Proof by Induction13Proof by Implication14Existence Proof15Uniqueness Proofs16Trivial Proofs17Vacuous Proofs
    18Notations and Set Operations19Venn Diagrams20Countable and Uncountable Sets
    21Equivalence Relations and Partitions22Partial Orderings23Recurrence Relations51Reflexive, Symmetric, Transitive, and Antisymmetric52Equivalence Relations and Equivalence Classes53Partial Orders
    24Injective, Surjective, Bijective25Special Types of Functions26Function Composition27Inverse Functions28Recursive Functions29Compositions
    30Sequences and Series
    31Inclusion and Exclusion Principle32Pigeonhole Principle33Permutations and Combinations46Product Rule and Sum Rule47Principle of Inclusion-Exclusion48Binomial Coefficients49Pascal's Identity and Pascal’s Triangle50Binomial Theorem
    34Division Theorem35Modular Arithmetic36LCM and GCD37Euclidean and Extended Euclidean Method38Finding Solutions to Congruence
    39Fundamental Theorem of Arithmetic40Characterizations of Primes41Mersenne Primes
    42Weak Induction43Strong Induction
    44Formulation of Recurrences45Closed Formulas
    54Terminologies55Elements of Graph Theory56Planar Graphs57Graph Coloring58Euler Graph59Hamiltonian Path60Rooted Trees61Graph Traversals62Handshaking Lemma and Corollary63Special Families of Graphs64Graph Isomorphism65Planarity in Graphs66Eulerian and Hamiltonian Graphs67Trees in Graph Theory
    10 min read
    Topic 26 of 67
    Topic Study Note Illustration
    26

    Function Composition

    Function composition is the process of combining two or more functions to create a new function. If we have two functions f : A → B f:...

    Function Composition

    Function composition is the process of combining two or more functions to create a new function. If we have two functions f:A→Bf: A \to Bf:A→B and g:B→Cg: B \to Cg:B→C, their composition, denoted (g∘f)(g \circ f)(g∘f), is a function from set AAA to set CCC, defined by:

    (g∘f)(x)=g(f(x))for all x∈A.(g \circ f)(x) = g(f(x)) \quad \text{for all } x \in A.(g∘f)(x)=g(f(x))for all x∈A.

    This means that you first apply the function fff to xxx, and then apply the function ggg to the result of f(x)f(x)f(x).


    1. Formal Definition of Function Composition

    Let f:A→Bf: A \to Bf:A→B and g:B→Cg: B \to Cg:B→C be two functions. The composition of fff and ggg, denoted as g∘fg \circ fg∘f, is a function from AAA to CCC defined by:

    (g∘f)(x)=g(f(x))for all x∈A.(g \circ f)(x) = g(f(x)) \quad \text{for all } x \in A.(g∘f)(x)=g(f(x))for all x∈A.

    Here, f(x)f(x)f(x) produces an element in BBB, and then g(f(x))g(f(x))g(f(x)) produces an element in CCC.


    2. Composition of Functions and Their Domains

    For the composition g∘fg \circ fg∘f to be defined:

    • The codomain of fff, i.e., the set BBB, must match the domain of ggg, i.e., the set BBB must be a subset of the domain of ggg.
    • Therefore, the result of f(x)f(x)f(x) must always lie within the domain of ggg.

    3. Example of Function Composition

    Let’s consider two functions:

    • f:R→Rf: \mathbb{R} \to \mathbb{R}f:R→R, defined by f(x)=2x+1f(x) = 2x + 1f(x)=2x+1,
    • g:R→Rg: \mathbb{R} \to \mathbb{R}g:R→R, defined by g(x)=x2g(x) = x^2g(x)=x2.

    To find (g∘f)(x)(g \circ f)(x)(g∘f)(x), we first apply f(x)f(x)f(x) and then apply ggg to the result of f(x)f(x)f(x):

    f(x)=2x+1,f(x) = 2x + 1,f(x)=2x+1, g(f(x))=g(2x+1)=(2x+1)2.g(f(x)) = g(2x + 1) = (2x + 1)^2.g(f(x))=g(2x+1)=(2x+1)2.

    Thus, the composition g∘fg \circ fg∘f is:

    (g∘f)(x)=(2x+1)2.(g \circ f)(x) = (2x + 1)^2.(g∘f)(x)=(2x+1)2.

    4. Properties of Function Composition

    Function composition has several important properties that are useful in mathematical proofs and problem-solving:

    a. Associativity

    Function composition is associative, meaning that if we have three functions f:A→Bf: A \to Bf:A→B, g:B→Cg: B \to Cg:B→C, and h:C→Dh: C \to Dh:C→D, then:

    h∘(g∘f)=(h∘g)∘f.h \circ (g \circ f) = (h \circ g) \circ f.h∘(g∘f)=(h∘g)∘f.

    This property allows us to compose multiple functions without worrying about the grouping of functions.

    b. Identity Function

    The identity function idA\text{id}_AidA​ on a set AAA is the function that maps every element to itself. It has the property that for any function f:A→Bf: A \to Bf:A→B:

    f∘idA=fandidB∘f=f.f \circ \text{id}_A = f \quad \text{and} \quad \text{id}_B \circ f = f.f∘idA​=fandidB​∘f=f.

    Thus, composing a function with the identity function leaves the original function unchanged.

    c. Non-Commutativity

    Function composition is not commutative, meaning that in general:

    g∘f≠f∘g.g \circ f \neq f \circ g.g∘f=f∘g.

    In other words, the order in which we apply the functions matters. Changing the order can lead to different results.


    5. Composing Functions with Different Domains and Codomains

    If the functions f:A→Bf: A \to Bf:A→B and g:B→Cg: B \to Cg:B→C are composed, we are guaranteed that the domain of fff is AAA, and the codomain of ggg is CCC. However, sometimes you might want to compose functions with different domains and codomains:

    Example:

    Let’s say f:A→Bf: A \to Bf:A→B and g:C→Dg: C \to Dg:C→D are two functions with different domains and codomains. In order to compose them, you need to find a suitable domain and codomain such that composition is valid. This is less common but can occur in specialized contexts.


    6. Inverse Functions and Composition

    If fff is a bijection, meaning it is both injective (one-to-one) and surjective (onto), it has an inverse function f−1:B→Af^{-1}: B \to Af−1:B→A. The composition of a function with its inverse satisfies:

    f−1∘f=idAandf∘f−1=idB.f^{-1} \circ f = \text{id}_A \quad \text{and} \quad f \circ f^{-1} = \text{id}_B.f−1∘f=idA​andf∘f−1=idB​.

    This shows that the inverse function "undoes" the operation of the original function, essentially returning the original input.


    7. Example of Composing with an Inverse

    Let’s take an example where f:R→Rf: \mathbb{R} \to \mathbb{R}f:R→R is defined by f(x)=3x+4f(x) = 3x + 4f(x)=3x+4, and its inverse function is f−1(x)=x−43f^{-1}(x) = \frac{x - 4}{3}f−1(x)=3x−4​.

    • Composition with the inverse: f−1∘f(x)f^{-1} \circ f(x)f−1∘f(x): f−1(f(x))=f−1(3x+4)=(3x+4)−43=x.f^{-1}(f(x)) = f^{-1}(3x + 4) = \frac{(3x + 4) - 4}{3} = x.f−1(f(x))=f−1(3x+4)=3(3x+4)−4​=x.
    • Composition in the opposite direction: f∘f−1(x)f \circ f^{-1}(x)f∘f−1(x): f(f−1(x))=f(x−43)=3(x−43)+4=x.f(f^{-1}(x)) = f\left( \frac{x - 4}{3} \right) = 3\left( \frac{x - 4}{3} \right) + 4 = x.f(f−1(x))=f(3x−4​)=3(3x−4​)+4=x.

    In both cases, the result is just xxx, confirming that the composition of a function with its inverse gives the identity function.


    8. Real-World Applications of Function Composition

    Function composition is widely used in many areas, including:

    • Mathematics: In calculus, when dealing with transformations, mappings, or solving equations.
    • Computer Science: In functional programming, where functions are combined and manipulated to build complex algorithms.
    • Physics: In modeling complex systems where multiple processes or phenomena are combined (e.g., transformations in space and time).
    • Economics: To model the impact of multiple variables and their interactions (e.g., cost functions, demand functions, etc.).

    Conclusion

    Function composition is a fundamental concept in mathematics that allows the combination of functions to create new ones. It is essential for building more complex relationships between variables, solving problems, and understanding how different mathematical structures interact. Function composition is associative, involves inverse functions, and has important applications in various fields such as mathematics, computer science, and economics.

    ← Previous topic 25
    Special Types of Functions
    Next topic 27 →
    Inverse Functions

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    10mremaining
    1.7kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Discrete Structures