A
function [math]f : A \href{/cs2800/wiki/index.php/%5Cto}{\to} B
[/math] is
surjective if
for every output
[math]y \href{/cs2800/wiki/index.php/%5Cin}{\in} B
[/math],
there exists an input
[math]x \href{/cs2800/wiki/index.php/%5Cin}{\in} A
[/math] such that
[math]f(x)=y
[/math].