In mathematics, the range of a function may refer either to the codomain of the function, or the image of the function. In some cases the codomain and the image of a function are the same set; such a function is called surjective or onto. For any non-surjective function f : X → Y , {\displaystyle f:X\to Y,} the codomain Y {\displaystyle Y} and the image Y ~ {\displaystyle {\tilde {Y}}} are different; however, a new function can be defined with the original function's image as its codomain, f ~ : X → Y ~ {\displaystyle {\tilde {f}}:X\to {\tilde {Y}}} where f ~ ( x ) = f ( x ) . {\displaystyle {\tilde {f}}(x)=f(x).} This new function is surjective.