Chapter 1

Relation and Function

Understanding Cartesian Products, Mappings, and Graphical Representations.

1. Relations

A relation is a fundamental connection between the elements of two sets. To understand relations, we first need to define the Cartesian Product.

Ordered Pair: $(x, y)$ where order matters. $(x, y) \neq (y, x)$

Cartesian Product ($A \times B$): The set of all possible ordered pairs from set $A$ to set $B$.
$A \times B = \{ (x, y) \mid x \in A, y \in B \}$

Relation ($R$): Any subset of the Cartesian Product. $R \subseteq (A \times B)$

Key Terminology

Term Definition
Domain The set of all first elements ($x$-coordinates) of the ordered pairs in a relation.
Range The set of all second elements ($y$-coordinates) that are actually mapped to in the relation.
Codomain The entire target set $B$. (Note: Range $\subseteq$ Codomain).
Inverse Relation ($R^{-1}$) Created by swapping the $x$ and $y$ values of $R$.
$R^{-1} = \{ (y, x) \mid (x, y) \in R \}$
Example: Let $A = \{1, 2\}$ and $B = \{a, b, c\}$.
Let relation $R = \{(1, a), (2, b)\}$.
* Domain of $R = \{1, 2\}$
* Range of $R = \{a, b\}$
* Codomain = $\{a, b, c\}$
* Inverse $R^{-1} = \{(a, 1), (b, 2)\}$

2. Functions

A function is a special type of relation. For a relation to be a function from set $A$ to set $B$, every element in set $A$ must map to exactly one unique element in set $B$.

Notation: $f: A \to B$
Read as "Function $f$ maps set $A$ to set $B$."
Note: All functions are relations, but not all relations are functions. If one input ($x$) yields two different outputs ($y$), it is a relation, not a function.

3. Classification of Functions

Functions are classified based on how elements in the domain map to the codomain.

Type Explanation Condition
One-to-One (Injective) Every element in the domain has a distinct and unique image in the codomain. If $f(x_1) = f(x_2)$, then $x_1 = x_2$.
Many-to-One Two or more elements in the domain map to the same image in the codomain. e.g., $f(x) = x^2$ where $f(2) = 4$ and $f(-2) = 4$.
Onto (Surjective) Every element in the codomain is mapped to by at least one element in the domain. Nothing is left over. Range = Codomain
Into There is at least one element in the codomain that is not mapped to. Range $\subset$ Codomain
Bijective A function that is both One-to-One AND Onto. Required for a function to have an inverse.

4. Graphing a Function & The Vertical Line Test

Steps to Graph a Function:

  1. Choose Inputs: Assign arbitrary values to $x$ (e.g., -2, -1, 0, 1, 2).
  2. Calculate Outputs: Substitute these $x$ values into the function to find the corresponding $f(x)$ or $y$ values.
  3. Create a Table: Organize your coordinates $(x, y)$.
  4. Plot and Connect: Plot the points on a Cartesian plane and draw a smooth line or curve through them.
The Vertical Line Test:
Once you have a graph, you can easily check if a relation is a function. Draw imaginary vertical lines down the graph.
* If any vertical line intersects the graph at more than one point, it fails the test (it is not a function).
* If every vertical line intersects the graph at exactly one point, it is a valid function.