# 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]
• If we have say two topological spaces [ilmath](X,\mathcal{J})[/ilmath] and [ilmath](Y,\mathcal{K})[/ilmath] then we may write:
• [ilmath]f:(X,\mathcal{J})\rightarrow(Y,\mathcal{K})[/ilmath] and mean [ilmath]f:X\rightarrow Y[/ilmath]
• That is to say that as a general rule given a function [ilmath]f:(A_1,A_2,\cdots)\rightarrow(B_1,B_2,\cdots)[/ilmath] take it as a function [ilmath]f:A_1\rightarrow B_1[/ilmath]

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