I read that the definition of an ordered pair $(a,b)$ is $(a,b)=\{\{a\},\{a,b\}\}$. This definition is based on the concept of unordered pair, which, in turn, is based on the Axiom of pair:
For every two sets $A$ and $B$ there exists a set $C$ such that $x\in C$ iff $x=A$ or $x=B$.
As we see, this axiom declares the existence of a set $\{A,B\}$ where $A$ and $B$ are both sets. This is what we call an unordered pair. Then considering $\{A\}:=\{A,A\}$ we define the ordered pair as $(A,B):=\{\{A\},\{A,B\}\}$. Thus, we have defined an ordered pair of sets. But, how can we define or work with ordered pairs of objets that are not necessarily sets? In the books I am reading this is not specified, and I don´t figure it out yet. Any help is welcome.