Relation
## Definition / Concept
A relation from $A$ to $B$ is any subset of the Cartesian product $A\times B$.
## Formula
$$R\subseteq A\times B$$
If:
$$(a,b)\in R$$
then $a$ is related to $b$ under $R$.
## Terminologies
- Domain of relation → Set of all first components of ordered pairs in $R$.
- Codomain → The set $B$ to which the relation is defined.
- Range → Set of all second components that actually occur in $R$.
## Formula
$$\text{Domain}(R)=\{a\in A:\exists b\in B,\ (a,b)\in R\}$$
$$\text{Range}(R)=\{b\in B:\exists a\in A,\ (a,b)\in R\}$$
$$\text{Range}(R)\subseteq B$$
## Usage
- Forms the foundation for the study of functions.