Functions and Mappings

Given Sets X,Y\mathbb{X}, \mathbb{Y}, a function or mapping from X\mathbb{X} to Y\mathbb{Y} is a rule that assigns each xXx \in \mathbb{X} a unique element f(x)Yf(x) \in \mathbb{Y}

Formally:

f:XYf: \mathbb{X} \longrightarrow \mathbb{Y}

Where X\mathbb{X} is the domain of the function and Y\mathbb{Y} is the codomain or image of ff

Basic Function Mappings

Optional Properties

Injective - One-to-One:

x1,x2X,  f(x1)=f(x2)    x1=x2\forall x_1, x_2 \in \mathbb{X}, \; f(x_1)=f(x_2) \implies x_1=x_2

Surjective - Onto:

yY,  xX:f(x)=y\forall y \in \mathbb{Y}, \; \exists x \in \mathbb{X} : f(x)=y

Bijective - Both injective and surjective

Example

A function f:ZZf: \mathbb{Z} \longrightarrow \mathbb{Z} is defined as f(x)=x2f(x)=x^2 where xZx \in \mathbb{Z}