<aside> đź”– Recall
If $f:A\rarr B$ then we can represent the function $f$ by its graph, which is a subset of $A\times B$.
A point $(x,y)$ is in the graph iff $y=f(x)$, so we could say the graph is the set
$$ \{\big(x,f(x)\big)\isin A\times B:x\in A\} $$
</aside>
Not every subset of $A\times B$ is the graph of a function.
(We need to pass “the vertical line test”)
i.e. for any $x\in A\ \exist!y$ s.t $(x,y)\in$ the graph.
<aside> đź”– A binary relation from $A$ to $B$ is any subset of $A\times B$.
</aside>
Ex.
$$ \{(x,y)\in\R^2: \underbrace{x\le y}_{\darr}\}\\\text{what we think of as relations} $$
or
$$ \{(x,y)\in\R^2:x^2+y^2=1\} $$
or
$$ \{(x,y)\in\R^2:x^2+y^2\le1\} $$
The domain and codomain don’t need to be $\R$.
Ex.
$$ \{(S,T):S\in\mathcal{P}(\{1,2,3\}),T\in\mathcal{P}(\{1.2.3\})\text{ and }|T-S|=1\} $$
$\empty$ $\empty$ $\{1\}$ $\{1\}$ $\{2\}$ $\{2\}$ $\{3\}$ $\{3\}$ $\{1,2\}$ $\{1,2\}$ $\{1,3\}$ $\{1,3\}$ $\{2,3\}$ $\{2,3\}$ $\{1,2,3\}$ $\{1,2,3\}$ codomain is the same
Since in this example, the domain and codomain are the same, we could has a bit more efficient with our picture.
This is a directed graph representation. We use vectors(or nodes) for the element of the domain(also codomain) and a edge from $a$ to $b$ iff $(a,b)$ is in the relation.
Some of our favourite relations are modelled after $\le(=,<,\in,\sube,1,...)$
these all use infix notation (they go in between the operands we apply them to)
We can do this with any relation.
We’d say, $\{1,2\}\mathbf{R}\{1,2,3\}$to mean $(\{1,2\},\{1,2,3\})\in\mathbf{R}$
We can talk about the complement of a relation with a vertical slash through the relations name (think $= vs \ne$ or $\in vs \notin$)
There are too many relations for them to all be interesting, so the best we can hope is to identify so special kinds of relations that are.