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

Functions: Domain, Codomain, and Range

College Depth 70 in the knowledge graph ☐ I know this ☆ Set as goal
6,822topics build on this
321prerequisites beneath it
See this on the map →
Cartesian Products and Relations→→Economic Geography: Location, Agglomeration, and Uneven DevelopmentInjective, Surjective, and Bijective Functions+5 more
functions domain codomain range

Core Idea

A function f: A → B is a relation where each element of A (the domain) maps to exactly one element of B (the codomain). The range is the set of all elements in B that are actually outputs of f. Distinguishing codomain from range is critical: the codomain is fixed by definition, while the range is determined by which outputs are attained.

Explainer

You already know that a Cartesian product A × B consists of ordered pairs (a, b), and that a relation is a subset of A × B. A function f: A → B is a special kind of relation: one where every element of A appears as the first coordinate of exactly one pair. In other words, every input has exactly one output. What distinguishes a function from a general relation is this uniqueness requirement — no input maps to two different outputs, and no input is left without an output.

The three terms domain, codomain, and range capture different aspects of a function's scope. The domain is the set A of all permitted inputs — the function must be defined on every element of A. The codomain is the set B declared as the target — it is a promise about where outputs land, chosen as part of the function's definition. The range (also called image) is {f(a) : a ∈ A} ⊆ B — the collection of outputs actually produced. The range is always a subset of the codomain, but can be strictly smaller.

The distinction between codomain and range is subtle but critical. Consider f: ℝ → ℝ defined by f(x) = x². The codomain is ℝ (all real numbers), but the range is [0, ∞) — no output is negative. You could alternatively write f: ℝ → [0, ∞), declaring the codomain to be just the nonneg­atives. These are technically different functions even though the formula is identical, because the codomain is part of the function's specification. This matters enormously for surjectivity: f is surjective (onto) if and only if every element of the codomain is achieved as an output — i.e., range = codomain. Whether f(x) = x² is surjective depends entirely on the declared codomain.

This framework also clarifies well-definedness. When you define a function by a formula or rule, you must verify: (1) the formula applies to every element of the domain, and (2) each domain element maps to a unique output. In abstract algebra, functions are often defined on equivalence classes, and checking well-definedness — verifying the output doesn't depend on which representative you chose — is a required proof step. The domain-codomain-range framework makes that checklist precise.

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 → Number Bonds to 10 → 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 (0s, 1s, 2s, 5s, 10s) → 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 → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Cartesian Products and Relations → Functions: Domain, Codomain, and Range

Longest path: 71 steps · 321 total prerequisite topics

Prerequisites (1)

Leads To (7)