---
tag: 0XKH881BZ7
kind: definition
name: Surjective function
msc: ["03E20"]
defines: 01RVCMSN5N
uses: [0XHDTE5YMZ, 0F9JHP8AJN]
sources:
  - url: https://en.wikipedia.org/wiki/Surjective_function
    locator: lead section
---

## Definition

Let $f \colon A \to B$ be a [[function|0XHDTE5YMZ]].
The function $f$ is surjective when, for each $b \in B$, there is an $a \in A$ with $f(a) = b$.

## Remarks

Other names are onto function and surjection.
Equivalently, the [[range|0E9GTAV478]] of $f$ is the whole [[codomain|0F9JHP8AJN]] $B$.
The function $x \mapsto x^3$ on $\mathbb{R}$ is surjective, and $x \mapsto x^2$ on $\mathbb{R}$ is not, because $-1$ is not a value.

## Explanations

### L1 human

A surjective function hits every element of the codomain at least once.
To prove surjectivity, take an arbitrary $b \in B$ and find an input $a$ with $f(a) = b$.
