freeCodeCamp/guide/english/mathematics/functions/bijectivity/index.md

1.4 KiB

title
Bijectivity

Bijectivity

A bijective function is a function that is both injective and surjective.

Injective Function

For a function to be injective, or one-to-one, every element of the codomain must be mapped to a unique element of the domain. Each X value has it's own special Y value.

injective "An Injective Function"

Surjective Function

For a function to be surjective, or onto, every element codomain is mapped to be at least one element of the domain. Each Y value has at least one X value.

surjective "A Surjective Function"

Bijective Function

For a function to be a bijection, or a one-to-one correspondence, the function must be both injective and surjective. Every element of the codomain maps to exactly one element of the domain. The cardinality (or number of elements) of the codomain and the domain are equal.

bijective "A Bijective Function"

More Information: