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 Functions→→FunctorsLambda 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 Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Making 10 as an Addition Strategy → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts Through 10 → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → Variables in Logic → Set Notation Basics → Set Membership and Notation → Subsets and Proper Subsets → Indexed Families and Generalized Operations → Binary Relations and Their Properties → Equivalence Relations and Partitions → Injective, Surjective, and Bijective Functions → Function Composition and Functional Structure

Longest path: 65 steps · 289 total prerequisite topics

Prerequisites (2)

Leads To (3)