JustToThePoint English Website Version
JustToThePoint en español

Cartesian Products, Relations, and Partitions

The Cartesian Product

The Cartesian product of two sets $A$ and $B$, denoted $A \times B$, is the set of all possible ordered pairs $(a, b)$, where the first element $a$ belongs to $A$, and the second element $b$ belongs to $B$.

Formally, we write: $A \times B = \{(a, b) \mid a \in A \text{ and } b \in B\}$. Example: Let $A = \{1, 2\}$ and $B = \{\text{Red, Blue}\}$. $A \times B = \{(1, \text{Red}), (1, \text{Blue}), (2, \text{Red}), (2, \text{Blue})\}$

The Order Matters: Because these are ordered pairs, $A \times B \neq B \times A$ (unless $A = B$ or one is empty). For instance, $(\text{Red}, 1)$ is an element of $B \times A$, but it is not an element of $A \times B$.

We can generalize this to the Cartesian product of $n$ sets: $\prod_{i=1}^n A_i = A_1 \times A_2 \times \dots \times A_n = \{(a_1, a_2, \dots, a_n) \mid a_i \in A_i\}$

When we multiply a set by itself $n$ times, we use exponential notation: $A^n$.

Geometric Intuition: René Descartes invented this concept to link algebra to geometry. The 2D coordinate plane is simply $\mathbb{R}^2 = \mathbb{R} \times \mathbb{R}$, which is the set of all $(x, y)$ coordinate pairs!

$\vert{} A \times B\vert{} = \vert{}A\vert{} \vert{}B\vert{} = 3 \times 2 = 6.$

It is written in latex as \prod_{i=1}^n A_i.

Mathematical Relations

A Cartesian product generates every possible pairing. But what if we only care about pairs that share a specific property?

Definition: A relation $R$ from set $A$ to set $B$ is any subset of the Cartesian product $A \times B$. If the relation is strictly within a single set $S$, we say $R$ is a relation on $S$ (meaning $R \subseteq S \times S$).

If an ordered pair $(a, b)$ belongs to the relation $R$, we write $aRb$ or $a \sim b$, read as “$a$ is related to $b$”.

Examples of Relations:

Typically, in these last examples, we write $m \gt n$, $m \ge n$ and $m \vert{} n$ instead of $m \sim n$ if $(m, n) \in R$.

Properties of Relations on a Set $S$

Let $R$ be a relation on a set $S$. We can classify $R$ based on how elements interact:

  1. Reflexive: Every element of the set $S$ is related or linked to itself. $\forall x \in S$, $x \sim x$. Otherwise, $R$ is said to be non-reflexive.
    Example: “$\le$” is reflexive because $3 \le 3$. “$<$” is NOT reflexive because 3 is not strictly less than 3.
  2. Symmetric: Order can be reversed. If when a first element is related to a second then the reverse is also true, that is, the second element is related to the first. If $x \sim y$, then $y \sim x$.
    Examples: Equality “$=$” is symmetric. “Is the sibling of” is symmetric. “$<$” is NOT symmetric because $2 < 5$ does not mean $5 < 2$.
  3. Antisymmetric: If two elements relate in both directions, they must be the exact same element. If $x \sim y$ and $y \sim x$, then $x = y$.
    Example: “$\le$” is antisymmetric. If $a \le b$ and $b \le a$, then $a=b$. The divides relation in a set of positive integer is anti-symmetric, too.
  4. Transitive: Chain links hold. If $x \sim y$ and $y \sim z$, then $x \sim z$.
    Example: “$=$”, “$<$”, and “$\le$” are all transitive.

A relation is a partial order when it is reflexive, antisymmetric, and transitive. For example, $(\mathbb{R}, \le)$ and $(\mathbb{N}, \text{ divisibility}) = \{(m, n) \in \mathbb{N}^2: m \text{ divides } n\}$ are good examples. The set of subsets of a given set (its power set, say $P(S)$) ordered by inclusion is another example.

A partial order relation that provides a way to compare between any two elements of a set is called a total order relation, that is, $\forall x, y \in S$, either $x \sim y$ or $y \sim x$ (or both). For example, the set of integers over the relation “less than or equal to” is a totally ordered set because for every element $a$ and $b$ in the set of integers, either $a \le b$ or $b \le a$.

Equivalence Relations

In mathematics, we frequently want to group different things together if they share a core property. We do this using a specific type of relation.

Definition: An equivalence relation is a binary relation that is Reflexive, Symmetric, and Transitive. It acts as a generalized version of “equals”.

Deep Algebraic Examples

1. Constructing Integers and Rational Numbers

We can define integer addition and multiplication as two maps $+: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}, \cdot: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}$,: $[(a, b)] + [(c, d)] = [(a + c, b + d)], [(a, b)] \cdot [(c, d)] = [(ac + bd, ad + bc)]$.

Let $S = \mathbb{Z} \times (\mathbb{Z} \setminus \{0\})$. This is the set of all ordered pairs of integers where the second integer (the denominator) is not zero. We define our relation as follows: $(a, b) \sim (c, d) \iff ad = bc$

Intuition: We are simply formalizing cross-multiplication. We want $\frac{a}{b} = \frac{c}{d}$, which algebraically means $ad = bc$. By defining it this way, we avoid division entirely and rely strictly on integer multiplication!

Proof that this is an equivalence relation:

Multiply the first equation by $f$ and the second equation by $b$: $adf = bcf \quad \text{and} \quad bcf = bde$

Because both equal $bcf$, we can set them equal to each other: $adf = bde$

Since $d \neq 0$ (by our initial definition of the set $S$), we can divide both sides by $d$ to yield $af = be$. This proves that $(a, b) \sim (e, f)$.

Because it satisfies all three properties, it is an equivalence relation. The rational numbers ($\mathbb{Q}$) are defined strictly as the set of all equivalence classes of these ordered pairs. Typically, we choose the fully simplified irreducible fraction (where $a$ and $b$ share no common factors) as the “representative” of the class.

2. Matrix Similarity in Linear Algebra

Let $M_n(\mathbb{R})$ be the set of all $n \times n$ square matrices with real coefficients. We say that matrix $A$ is similar to matrix $B$ ($A \sim B$) if there exists an invertible matrix $P$ such that: $A = P^{-1}BP$

In linear algebra, an n-by-n square matrix is called invertible if the product of the matrix and its inverse is the identity matrix, that is, $AA^{-1}=I_n$. If $A$ and $B$ are two invertible matrices of the same order then $(AB)^{-1} = B^{-1}A^{-1}$.

Geometric Intuition: Why do we care about similar matrices? In linear algebra, two similar matrices represent the exact same linear transformation (like a rotation or a sheer) occurring in space, just viewed from the perspective of two different coordinate systems (basis vectors). The matrix $P$ acts as the “translator” between the two perspectives.

Proof of Equivalence:

For any matrices $A, B, C \in M_n(\mathbb{R})$:

Because the inverse of a matrix product reverses the order ($(QP)^{-1} = P^{-1}Q^{-1}$), we get: $A = (QP)^{-1} C (QP)$. Since the product of two invertible matrices ($QP$) is also an invertible matrix, $A \sim C$.

3. Calculus: Functions and Derivatives

Let $S$ be the set of all differentiable functions mapping $\mathbb{R} \to \mathbb{R}$. Let’s define a relation where two functions are related if their derivatives are identical: $f \sim g \iff f'(x) = g'(x)$

This is trivially an equivalence relation (since equality of derivatives is reflexive, symmetric, and transitive). But what do the equivalence classes look like?

If $f'(x) = g'(x)$, it means the difference between their derivatives is zero: $\frac{d}{dx}[f(x) - g(x)] = 0$

In calculus, if a derivative is zero everywhere, the function must be a constant. Therefore, $f(x) - g(x) = C$, or $f(x) = g(x) + C$.

This means the equivalence class of a function $f$ is the family of all functions that are vertical shifts of $f$. This is the rigorous foundation of the indefinite integral! When you evaluate $\int f'(x) dx = f(x) + C$, you are not returning a single function; you are returning an entire equivalence class of functions.

4. Other Standard Equivalence Relations

Proof.

Image 

5. Counterexamples: When Relations Fail

To truly understand equivalence relations, we must look at relations that fail the test.


Equivalence Class

Definition. An equivalence class is a subset of S which includes all elements that are related or equivalent to each other by some equivalence relation. More formally, give an equivalent relation ∼ on S, and an element x \in S, the equivalence class of x, typically denoted by x or [x] is the subset x = {y \in S : y ∼ x}, and each element of the set is called a representative of the equivalence class.

Examples:

Partitions

A partition of a set S is a grouping of its elements into non-empty subsets Ai ≠ ∅, in such a way that every element is included in exactly one subset. In other words, it is a collection of non-empty subsets or parts Ai which are exhaustive (whose union is the entire set) and mutually exclusive (they are disjoint subsets). More formally, {Ai ⊆ S : i \in I} where I is an indexing set, with satisfies,

  1. Ai ≠ ∅, \forall i \in I, that is, all the subsets are non-empty. The subsets are the cells of the partition.
  2. ∪i\inI Ai = S, that is, every member of S lies in one of the subsets. They are exhaustive, i.e., their union is the entire set.
  3. Ai ∩ Aj = ∅ \forall i,j\in I, i≠j, that is, they are disjoint subsets (they do no overlap). Figure 1.a. Image 

Examples.

Equivalence Classes and Partitions

For any equivalence relation ∼ on a set S, the equivalence classes of the equivalence relation on a set S form or constitute a partition of S. Conversely, for any partition P of S, there is an equivalence relation on S by relating elements if they lie in the same part or subset of the partition.

Basically, we can define an equivalence relation on S by saying x ~ y if and only if x and y are elements in the same part or subset of the partition P. Thus, the notions of equivalence relation and partition are essentially the same thing.

Proof:

Suppose that ∼ is an equivalent relation on S. If x\inS, let $\bar{x}$ = S(x) = {y \in X | y ∼ x}. Thus, S(x) is the equivalence class of x. By the reflexive property, x ∼ x, so x \in S(x) ⇨ S = ∪x\inXS(x). However, some of the S(x)’s may be identical, so let’s get rid of the duplicates.

In other words, we have S = ∪x\inYS(x) and Y is a subset of S. If x, y\inY and x≠y, then by construction, S(x)≠S(y). ¿Do they intersect?

For the sake of contradiction, suppose x, y\inY, x≠y, but z\in S(x)∩S(y). z\in S(x) ⇨ z ∼ x, and z\in S(y) ⇨ z ∼ y. x ∼ z (by symmetry) and z ∼ y ⇨ x ∼ y (by transitivity).

Let’s see that S(x)=S(y). First, let’s prove that S(x) ⊆ S(y). Suppose w \in S(x) ⇒ w ∼ x, but we already know that x ∼ y ⇨ w ∼ y (by transitivity) ⇨ w \in S(y). Secondly, let’s prove that S(y) ⊆ S(x). Suppose w \in S(y), w ∼ y, y ∼ x (by symmetry) ⇨ w ∼ x (by transitivity) ⇨ w \in S(x), and by double inclusion, S(x)=S(y) ⊥ that is a contradiction because we threw out all the duplicates earlier.

Conversely, suppose {Xi}i\inI is a partition of S. Let’s define a relation on S by saying x ∼ y if and only if x, y\inXi for some i\inI.

  1. Reflexive. If x\inS ⇨ x \inXi for some i\inI (every member of S lies in one of the subsets -Partition’s definition ii-). Obviously, x is in the same Xi than itself ⇨ x, x \inXi so x ∼ x.
  2. If x ∼ y, then x, y \inXi for some i\inI, and obviously y, x \inXi, so y ∼ x.
  3. If x ∼ y and y ∼ z, then x, y\inXi and y, z \inXj ⇨ y \in Xi∩Xj, but the partition’s subsets are disjoint (Partition’s definition iii) ⇨ Xi = Xj ⇨ x, y, z \in Xi and in particular, x, z \in Xi ⇨ x ∼ z.

An important example

Let r \in \mathbb{Z}, r ≥ 1. We know that n∼m iff r |(n-m) is a equivalent relation. We call $\frac{\mathbb{Z}}{r\mathbb{Z}}$ = { equivalent classes [n] for r}, and define addition on $\frac{\mathbb{Z}}{r\mathbb{Z}}$ by [n] + [m] = [n+m]. This operation is well-defined and $\frac{\mathbb{Z}}{r\mathbb{Z}}$ is an Abelian group with this operation.

Bitcoin donation

JustToThePoint Copyright © 2011 - 2026 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.