# Function

A function [ilmath]f[/ilmath] is a special kind of relation

## Domain

A function ought be defined for everything in its domain, that's for every point in the domain the function maps the point to something.

### Examples

(See notation below if you're not sure what the $f:X\rightarrow Y$ notation means)

• $f:\mathbb{R}\rightarrow\mathbb{R}$ given by $f(x)=\frac{1}{x}$ isn't defined at $0$
• $f:\mathbb{R}\rightarrow\mathbb{R}$ given by $f(x)=x^2$ is correct, it is not surjective though, because nothing maps onto the negative numbers, however $f:\mathbb{R}\rightarrow\mathbb{R}_{\ge 0}$ with $f(x)=x^2$ is a surjection. It is not an injective function as only $0$ maps to one point.

## Notation

A function [ilmath]f[/ilmath] from a domain [ilmath]X[/ilmath] to a set [ilmath]Y[/ilmath] is denoted [ilmath]f:X\rightarrow Y[/ilmath]

TODO: Come back after the relation page and fill this out