Relations, Functions, and Morphisms
In the set-theoretic foundation of mathematics, we transition from static collections to dynamic interactions by defining relations and functions. These concepts allow us to compare sets, group elements by shared properties, and transform data while preserving structure.
Binary Relations and Their Properties
A Binary Relation between sets and is formally defined as a subset of the Cartesian product . If , we often write . When , we say is a relation on .
The nature of a relation is determined by several key properties:
- Reflexivity: .
- Symmetry: .
- Antisymmetry: .
- Transitivity: .
Equivalence Relations and Partitions
An Equivalence Relation is reflexive, symmetric, and transitive. The most significant feature of an equivalence relation is that it partitions the set into disjoint Equivalence Classes. For , the class .
- Example: Modular arithmetic. The relation partitions the integers into classes.
- Quotient Sets: The set of all equivalence classes is denoted . This allows us to “collapse” a set into a simpler structure.
Order Relations
A Partial Order (POSET) is reflexive, antisymmetric, and transitive (e.g., or ). If every pair of elements is comparable, it is a Total Order. Partial orders are the basis for Lattice Theory and Domain Theory.
The Formal Definition of a Function
A Function is a relation with two specific constraints:
- Existence: such that .
- Uniqueness: .
This ensures that every input is mapped to exactly one output. We write .
- Domain: The set of all valid inputs.
- Codomain: The set where outputs reside.
- Range (Image): The specific subset of reached by the function, .
Classification of Mappings
The behavior of a function relative to its codomain defines its classification:
- Injection (One-to-One): Differing inputs yield differing outputs. .
- Surjection (Onto): The range is equal to the codomain. such that .
- Bijection: Both injective and surjective. A bijection represents a perfect “one-to-one correspondence” between sets. Bijections are invertible: there exists .
Composition and Identity
Given functions and , the Composition is defined by .
- Composition is associative: .
- Every set has an Identity Function such that and .
Images and Pre-images
For a subset , the image is . For a subset , the Pre-image (or inverse image) is . Crucially, exists even if the function is not invertible as a mapping! Pre-images behave well with set operations:
Morphisms: A Categorical Overview
In higher mathematics, we look at functions that preserve structure. These are called Morphisms.
- Homomorphism: A function between algebraic structures (like groups) that preserves the operations.
- Homeomorphism: A continuous bijection between topological spaces with a continuous inverse.
- Isomorphism: A morphism that can be reversed. Two isomorphic structures are “mathematically identical” in their properties, even if their elements are different.
Computational Modeling of Relations
In software, relations are often modeled as Boolean-valued functions or via adjacency structures.
type SetElement = string | number;
type Relation<T extends SetElement> = (a: T, b: T) => boolean;
/**
* Example: The 'Less than or equal to' relation on numbers.
* This is a Partial Order (and actually a Total Order on R).
*/
const leq: Relation<number> = (a, b) => a <= b;
/**
* Example: Modular equivalence (an Equivalence Relation).
*/
const modEquiv = (n: number): Relation<number> => (a, b) => (a - b) % n === 0;
// Functions are simply a subset of relations where each 'a' has one 'b'.
type MathFunction<A, B> = (input: A) => B;
Knowledge Check
A relation that is reflexive, symmetric, and transitive is known as what?
While computers handle finite mappings efficiently, the pure mathematical study of functions extends to infinite-dimensional spaces (Functional Analysis), where functions themselves become the “elements” of larger sets. Understanding the properties of mappings is the first step toward understanding the architecture of space and transformation.