# Defining and using the Codomain of a function

A function is described in terms of its domain, its range (image) and its codomain. The first two are well defined sets but I found the codomain of a function as a bit ambiguous as according to me a function can have infinite codomains, as codomain is merely defined as a set containing the range of the function, and their can be many such sets in most cases.

Then my question is that how we can define codomain of a function uniquely and what is its use ?

To specify, I also found similar questions on the site but I could not be satisfied and want someone to help me in this by explaining this in detail as this is really confusing.

Thanks for help.

I imagine you're focused on the graph of a function — the set of all points $(x, f(x))$.
One of the ways to encode the notion of function by the second convention is as a triple $(X, Y, \Gamma)$ where $X$ is the domain, $Y$ is the codomain, and $\Gamma$ is the graph.
• @AbhinavDhawan: If, for example, you use the representation of functions I described in my post, then the codomain of $(X,Y,\Gamma)$ is $Y$. – Hurkyl Apr 12 '17 at 13:45