A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Function Composition and Functional Structure

College Depth 64 in the knowledge graph I know this Set as goal
1,460topics build on this
289prerequisites beneath it
See this on the map →
Functions as Sets and Their CharacteristicsInjective, Surjective, and Bijective FunctionsFunctorsLambda Calculus+1 more
composition structure identity

Core Idea

Given f: A → B and g: B → C, their composition (g ∘ f): A → C is defined by (g ∘ f)(a) = g(f(a)). Composition is associative and has an identity function id_A for each set, making it a fundamental operation. Bijections compose to bijections, and injections/surjections preserve their properties under composition.

Explainer

From your study of functions, you know a function f: A → B is a rule that assigns each element of A exactly one element of B. Composition asks: what happens when you apply two functions in sequence? If f takes elements of A to elements of B, and g takes elements of B to elements of C, then the composition (g ∘ f) takes elements of A directly to C by doing f first, then g. Written out: (g ∘ f)(a) = g(f(a)). The output of f becomes the input of g.

Notice the notation: g ∘ f is read "g after f" or "g of f," and is applied right to left. This matches mathematical convention where function application is written on the right of the argument: you write g(f(a)), not f(g(a)). The codomain of f must match the domain of g — otherwise composition is undefined. This domain-matching requirement is what makes the order of functions in a composition non-interchangeable in general: f ∘ g and g ∘ f are typically different functions (or may not even both be defined if A ≠ C).

Two algebraic properties make composition deeply useful. First, it is associative: (h ∘ g) ∘ f = h ∘ (g ∘ f) whenever the types align. This means you can compose a chain of functions without worrying about which pair you combine first — the result is the same. You can verify this directly: both sides send a to h(g(f(a))). Second, each set A has an identity function id_A: A → A defined by id_A(a) = a, and this identity acts as a neutral element: f ∘ id_A = f and id_B ∘ f = f. Together, associativity and identity make the collection of functions on a set into a monoid — the algebraic structure behind sequential processes.

Composition interacts cleanly with injectivity, surjectivity, and bijectivity. The composition of two injections is injective, the composition of two surjections is surjective, and the composition of two bijections is a bijection. Furthermore, if g ∘ f is injective then f must be injective (though g need not be), and if g ∘ f is surjective then g must be surjective (though f need not be). These facts let you decompose structure: to show a function is a bijection, it is often easiest to exhibit a two-sided inverse — a function h such that h ∘ f = id_A and f ∘ h = id_B. This inverse, when it exists, is unique and is itself a bijection. Composition is therefore the algebraic glue that connects functions into structures like groups of symmetries, categories, and recursive constructions — the topics you'll build on next.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Making 10 as an Addition StrategyAddition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts Through 10Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineOpposites and Additive InversesAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsVariables in LogicSet Notation BasicsSet Membership and NotationSubsets and Proper SubsetsIndexed Families and Generalized OperationsBinary Relations and Their PropertiesEquivalence Relations and PartitionsInjective, Surjective, and Bijective FunctionsFunction Composition and Functional Structure

Longest path: 65 steps · 289 total prerequisite topics

Prerequisites (2)

Leads To (3)