In category theory, the domain of a morphism is its sourceobject; that is, the domain of $f\colon X \to Y$ is $X$. In particular, this is the case for a function: its domain is the set of elements to which it can be applied.

However, this can conflict with other meanings of ‘domain’, especially in a category like Rel. For instance, for any subset$A\subseteq X$, there exists a relation$R\colon X \to Y$ whose “domain” is $A$ under some uses of the term.

A separate meaning of ‘domain’ occurs in domain theory, which is at the interface of logic and theoretical computer science. There a domain is a particular type of poset. Still another meaning occurs in algebra in the term integral domain.