A relation from a set AA to a set BB is a set RR with

R⊆A×B,R\subseteq A\times B,

where A×BA\times B is the . If (a,b)∈R(a,b)\in R, one often writes a R ba\,R\,b.

Remarks

A relation on a set AA means a relation from AA to itself, i.e. a subset of A×AA\times A. Special kinds of relations include , which encode “having the same type” in a precise sense.

Examples
  • The “less than or equal to” relation on Z\mathbb{Z} is R={(m,n)∈Z×Z:m≤n}R=\{(m,n)\in\mathbb{Z}\times\mathbb{Z}: m\le n\}.
  • For any set AA, the equality relation on AA is {(a,a):a∈A}⊆A×A\{(a,a): a\in A\}\subseteq A\times A.