What is usually understood as DOMAIN and CODOMAIN of a Relation Suppose I have a relation declaration as $R \subseteq A \times B$, such that $A=\{1,2,3,4\}$ and $B=\{10,20,30,40\}$.
And suppose that the definition of this relation is $R=\{(1,20),(3,40)\}$


*

*We call A Domain of $R$.

*We call B Co-domain of $R$.


How we refer to the subset of $A$ and $B$ that are related by $R$; that is, how we refer to sets $\{1,3\}$ and $\{20,40\}$.
Update:
I think, the above question  comes from the fact that usually there is not clear distinction between a relation declaration (that is a type) and a concrete relation (that is an occurrence of that type). $R \subseteq A \times B$ is a type declaration and $R=\{(1,20),(3,40)\}$ is an instance of it. So it is better to call the former $R$ and the latter $r_1$ (considering that there might be other relations like $r_2, r_3, ...$ typed over the same $R$. But even with such a distinction, what is meant by Domain /Codomain when they are used for $r_1$?

There are various conventions regarding the nomenclature for relations. Unfortunately, they are often conflicting.
On the one hand, we have the "axiomatic-set-theoretic" names:


*

*$A, B$ have no name

*$\{1,3\} = \{x \mid \exists y: (x,y)\in R\}$ is called the domain of $R$

*$\{20,40\} = \{y \mid \exists x: (x,y)\in R\}$ is called the codomain of $R$


On the other hand, we have (for lack of a better name) the "naive-set-theoretic" names:


*

*$A$ is the domain of $R$

*$B$ is the codomain of $R$

*$\{1,3\} = \{x \mid \exists y: (x,y)\in R\}$ is called the preimage of $R$

*$\{20,40\} = \{y \mid \exists x: (x,y)\in R\}$ is called the image of $R$


The image in the latter sense is often called the range; this is something both conventions agree on. Both conventions also seem to agree on the meaning of preimage and image.
But whenever one is consulting a source, care needs to be taken in the interpretation of these terms, so as to avoid confusion and mistakes.
