Suppose $R$ is a relation on a set $A$, that is, $R$ is a relation from a set $A$ to itself. Then $R◦R$, the composition of $R$ with itself, is always defined.
The Above is from "Schaum's Theory and Problems of Discrete Mathematics"
Consider the set $A= \{1,2\}$ $$R = \{(1,2)\}$$
How is $R◦R$ defined?
It seems to contradict this statement from the same book:
Let $A$, $B$ and $C$ be sets, and let $R$ be a relation from $A$ to $B$ and let $S$ be a relation from $B$ to $C$. That is, $R$ is a subset of $A×B$ and $S$ is a subset of $B ×C$. Then $R$ and $S$ give rise to a relation from $A$ to $C$ denoted by $R◦S$ and defined by: $a(R◦S)c$ if for some $b ∈ B$ we have $aRb$ and bSc. That is , $$R◦S =\{(a,c)|\exists b \in B : (a,b) \in R \& (b,c) ∈ S\} $$
$R\circ R$ is, in this case, $\varnothing$. The case of $R\circ R$ is just the special case of the second quoted piece of text where $A=B=C=\{1,2\}$ and $R=S=\{(1,2)\}$. Notice that it is true that every ordered pair that is a member of $\varnothing$ is an ordered pair from $A\times A$, vacuously.
You can check that the definition of $R\circ S$ specializes in this case to $\{(a,c)|\exists b\in A:(a,b)\in R\wedge (b,c)\in R\}$. How many pairs are there in $A\times A$ that meet this condition?