Example:Surjections and solving equations

From CS2800 wiki

One way of understanding surjections and right inverses is as the existence of a solution to an equation. For example, the function [math]f : \href{/cs2800/wiki/index.php?title=%E2%84%9D&action=edit&redlink=1}{ℝ} \href{/cs2800/wiki/index.php/%E2%86%92}{→} \href{/cs2800/wiki/index.php?title=%E2%84%9D&action=edit&redlink=1}{ℝ} [/math] given by [math]f(x) := sin(x) [/math] is not surjective. This is reflected in the fact that you cannot solve the equation [math]f(x) = y [/math] for an arbitrary [math]y [/math]; indeed, there is no [math]x [/math] with [math]f(x) = 7 [/math].

If we restrict the codomain of [math]f [/math] so that the function becomes surjective (i.e. let [math]g : \href{/cs2800/wiki/index.php?title=%E2%84%9D&action=edit&redlink=1}{ℝ} → \lt nowiki\gt [-1,1]\lt /nowiki\gt be given by \lt math\gt g(x) := sin(x) [/math]), then there is a right inverse (namely the [math]arcsin [/math] function).