Canonical: https://knowlpedia.com/shared-foundations/surjective-function/

# Surjective function

A function whose outputs cover the entire codomain

A **surjective function** is a [function](https://knowlpedia.com/shared-foundations/function/) \(f:A\to B\) such that for every \(b\in B\) there exists at least one \(a\in A\) with \(f(a)=b\).

## Remarks

Surjectivity can be expressed using the [image](https://knowlpedia.com/shared-foundations/image/): \(f\) is surjective exactly when \(f(A)\) equals its [codomain](https://knowlpedia.com/shared-foundations/codomain/) \(B\). Surjectivity is one of the two conditions (along with injectivity) needed for a [bijection](https://knowlpedia.com/shared-foundations/bijective-function/).

## Examples

- The function \(f:\mathbb{R}\to\mathbb{R}\) given by \(f(x)=x^3\) is surjective, since every real number has a real cube root.
- The parity map \(p:\mathbb{Z}\to\{0,1\}\) (even \(\mapsto 0\), odd \(\mapsto 1\)) is surjective.
