--- disqus: abhyas29 --- # Relation and Function ###### tags: `Mathematics` [All Mathematics Formula by Abhyas here](/@abhyas/maths_formula) Please see [README](https://hackmd.io/@abhyas/maths_formula#README) if this is the first time you are here. ## Relation Let $A$ and $B$ be two sets then Relations $R$ from $A$ to $B$ is a subset of $A \times B$ i.e. $R \subseteq A \times B$ Also, If $a \in A$ and $b \in B$ then, $R = \{(a, b) : a \in A$ and $b \in b \}$ This can be denoted by $xRy\Leftrightarrow$ condition where $x \in A$ and $y \in B$ e.g. Let $A={a, b, c, d}$ and $B={1, 2, 3, 4}$ Let, - $R_1= \{(b, 3), (b, 4), (a, 3)\}$ is a relation - $R_2 = \{ (a, 1) \}$ is a relation - $R_3=\{ (a, 1), (b, 2), (c, 3), (d, 4) \}$ is a relation - $aR_4b \Leftrightarrow x$ divides $y$ - $R_5 = \{ (a, 4), (c, 1), (3, d) \}$ is **not** a relation, $\because (3, d) \notin A \times B$ - $R_6 = \{ (1, a), (2, c), (3, d) \}$ is **not** a relation, $\because R_5 \not\subseteq A \times B$ ## Domain, co-domain and Range of $R$ ![](https://i.imgur.com/PnlaJ48.png =500x) ### Domain Set of all the first element of order pair in relation $R$. $\therefore$ Domain of $R= \{ a: (a, b) \in R \}$ ### Range Set of all the second element of order pair in relation $R$. $\therefore$ Domain of $R= \{ b: (a, b) \in R \}$ ### Codomain Set of all elements of set $B$. $a\in A$ ## Total number of Possible Relations Let $n(A) = m$ and $n(B)=n$ $\because n(A \times B) = mn$ $\therefore$ Total number of possible relations $= 2^{mn}$ (This is same as number of subsets of $A \times B$) ## Licensing and Links [All Mathematics Formula by Abhays here](/Uhf7AR-EQcKrvHaPG9FSXg) <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>.