🔹 𝐖𝐡𝐚𝐭 𝐢𝐬 𝐚 𝐑𝐞𝐥𝐚𝐭𝐢𝐨𝐧?
A relation is a set of ordered pairs \((x, y)\), where \(x\) is an input and \(y\) is an output. It defines a relationship between two sets of data.
Example:
\[ R = \{(1, 2), (2, 4), (3, 6)\} \]
Here, \(R\) relates each input \(x\) to an output \(y\).
---
🔹 𝐖𝐡𝐚𝐭 𝐢𝐬 𝐚 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧?
A function is a special type of relation where each input \(x\) maps to exactly one output \(y\). In other words, no two ordered pairs in a function can have the same \(x\)-value with different \(y\)-values.
Example:
\[ f(x) = 2x \]
This function maps every \(x\) to a unique \(y\).
---
🔹 𝐊𝐞𝐲 𝐃𝐢𝐟𝐟𝐞𝐫𝐞𝐧𝐜𝐞𝐬:
✅ Relation:
- Can have multiple outputs for the same input.
- Example: \( \{(1, 2), (1, 3)\} \) is a relation but not a function.
✅ Function:
- Each input has only one output.
- Example: \( \{(1, 2), (2, 4)\} \) is both a relation and a function.
---
🔹 𝐓𝐲𝐩𝐞𝐬 𝐨𝐟 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧𝐬:
1️⃣ One-to-One Function: Each output corresponds to exactly one input.
2️⃣ Onto Function: Every element in the range is mapped to by at least one input.
3️⃣ One to one correspondence: If it's both one to one and onto function
---
🔹 𝐕𝐢𝐬𝐮𝐚𝐥 𝐑𝐞𝐩𝐫𝐞𝐬𝐞𝐧𝐭𝐚𝐭𝐢𝐨𝐧:
- Relation: Can have branching outputs for a single input.
- Function: No branching; each input maps to a single output.
---
🔹 𝐄𝐱𝐚𝐦𝐩𝐥𝐞 :
# Relation (not a function)
relation = {(1, 2), (1, 3), (2, 4)}
# Function (each input maps to one output)
function = {(1, 2), (2, 4), (3, 6)}
https://t.me/R2EMEDIAL2017
https://t.me/R2EMEDIAL2017