27 lines
1.1 KiB
Markdown
27 lines
1.1 KiB
Markdown
A function takes in an element from its **domain**, transforms it in someway and outputs that transformed element, which is part of the **co-domain**.
|
|
Every element of the **domain** must map to a value in the **co-domain**, all values of the **co-domain** that are mapped to form the functions **image**.
|
|
A function must be **deterministic** - one input can only map to a single output.
|
|
|
|
## Notation
|
|
General function notation: $f: X -> Y$
|
|
|
|
> [!INFO]
|
|
> $f$: name of the function
|
|
> $X$: Domain
|
|
> $Y$: Co-domain
|
|
> $f(x)$: Image of $f$
|
|
> $X$, $f(x)$ and $Y$ are [[Set Theory | Set]]
|
|
|
|
For any $x in X$ the output $f(x)$ is an element of $Y$.
|
|
|
|
## Mapping Properties
|
|
### Injectivity
|
|
A function is _injective_ if every element in $Y$ has _at most_ one matching $x in X$.
|
|
- $forall y in Y,exists^(<=1) x in X : f(x) = y$
|
|
|
|
### Surjectivity
|
|
A function is _surjective_ if every element $y in Y$ has _at minimum_ one matching $x in X$
|
|
- $forall y in Y, exists x in X : f(x) = y$
|
|
|
|
### Bijectivity
|
|
A function is _bijective_ if every element $y in Y$ has _exactly_ one matching $x in X$ (it is _injective_ and _surjective_) |