---
tag: 0F9JHP8AJN
kind: definition
name: Codomain
msc: ["03E20"]
defines: 0C5SR4FC74
uses: [0XHDTE5YMZ]
sources:
  - url: https://en.wikipedia.org/wiki/Codomain
    locator: lead section
---

## Definition

Let $f \colon A \to B$ be a [[function|0XHDTE5YMZ]].
The codomain of $f$ is the set $B$.

## Remarks

Each value $f(a)$ is in the codomain, but not every element of the codomain needs to be a value.
The set of values is the [[range|0E9GTAV478]] of $f$. It is a subset of the codomain.
The function $f$ is [[surjective|0XKH881BZ7]] when its range is the whole codomain.

## Explanations

### L1 human

For $f \colon \mathbb{R} \to \mathbb{R}$ with $f(x) = x^2$, the codomain is $\mathbb{R}$.
The value $-1$ is in the codomain, but no input gives it.
