Relations
More info about relations:
- If some pair $(s, t)$ is in a relation $R$, we can write: $(s, t) \in R$ (
$(s, t) \in R$
) or, even cooler: $s R t$ ($s R t$
). If this is the case, we say that $s$ is $R$-related to $t$. Examples: $(😀, 😆) \in \text{Smiles}$ and $100\ \text{CUNYfirst-Grades}\ A+$ (as in $sRt$).
- We don't need to stop only at relating two sets: we could have multi-set relations. Example: For $S_1 = \{1, 2\}$, $S_2 = \{3, 5\}$, and $S_3 = \{0, 6\}$, we could have the tertiary relation: $R = \{(1, 5, 0), \,$$(2, 5, 6), \,$$(1, 3, 0)\}$ (this is a set of triples!) However, in the scope of this course, we'll focus only on binary relations.
- In a relation from set $S$ to set $T$, there's no limit on how many times some $s \in S$ is the 1st coordinate in ordered pairs. Example: If $S = \{1, 2\}$ and $T = \{3, 5\}$, we aren't limited to having only one pair that has $1$ as its 1st coordinate: you could have two or more pairs starting with $1$, e.g., $\{(1, 3), (1, 5)\}$, or zero pairs starting with $1$ (that is, there may be no pair that has $1$ in it at all!)
- Likewise, there's no limit on how many times some $t \in T$ is the 2nd coordinate in ordered pairs. Example: If $S = \{1, 2\}$ and $T = \{3, 5\}$, we aren't limited to having only one pair that has $5$ as its 2nd coordinate: you could have two or more pairs starting with $5$, e.g., $\{(1, 5), (2, 5)\}$, or zero pairs ending with $5$ (that is, there may be no pair that has $5$ in it.)