Function
A function from $X$ to $Y$ denoted by $f:X\to Y$ is a binary relation $R$ on $X×Y$ such that if $\left(x,y\right),\left(x,z\right)\in R$, then $z=y$, which says given an element $x\in X$ it is only ever related to a single $y\in Y$.
Function Equality
Suppose that $f:X\to Y$ and $g:X\to Y$ are two functions, then we say that they are equal and write $f=g$ when $f\left(x\right)=g\left(x\right)$ for every $x\in X$
dom f
Given a function $f:X\to Y$, then we denote $\text{dom}\left(f\right):=X$ which we is shorthand for the word domain
ran f
Given a function $f:X\to Y$, then we denote $\text{ran}\left(f\right):=Y$ which we is shorthand for the word range
Constant Function
Suppose that we have a function $f:X\to Y$ such that there is a value $c\in Y$ such that for every $x\in X$, we have $f\left(x\right)=c$, then we say that $f$ is constant with value $c$
Identity Function
Let $X$ be a set, the we define the following function ${\mathrm{id}}_{X}:X\to X$, such that for any $a\in X$ ${\mathrm{id}}_{X}\left(a\right)=a$ and call it the identity function on $X$.
Domain Restricted Function
Let $f:E\to F$ let $A\subseteq E$, then the restriction of $f$ to $A$ is the function $f{↾}_{A}:A\to F$ defined by: $f{↾}_{A}\left(x\right):=f\left(x\right)$ for each $x\in A$

The restriction of a function is thought of as the same function but with elements from it's domain removed, or restricted to a smaller set.

Inclusion Function
Suppose that $A\subseteq B$, the inclusion function $\iota :A\to B$ is defined by: $\iota \left(x\right)=x$ where the output of $\iota$ is considered as an element from $B$
Restriction Equals Inclusion Composed with Original
let $f:E\to F$ and suppose $A\subseteq E$, and let $\iota :A\to E$ be the inclusion function, then we have $f↾A=f\circ \iota$
Let $x\in A$, then $f↾A\left(x\right)=f\left(x\right)$, and $\left(f\circ \iota \right)\left(x\right)=f\left(\iota \left(x\right)\right)=f\left(x\right)$ thus the two functions are equal.
Function Composition
Suppose that $A,B,C$ are sets, and that $f:A\to B,g:B\to C$ are functions, then we define $g\circ f\left(x\right):=g\left(f\left(x\right)\right)$ for any $x\in A$, so that $g\circ f:A\to C$
Suppose that $f,g:X\to Y$ are functions and $\oplus$ is a binary operation on $Y$, then we define $f\oplus g:X\to Y$ as: $\left(f\oplus g\right)\left(x\right):=f\left(x\right)\oplus g\left(x\right)$
Function Multiplication
Let $f:X\to Y$ be a function and let $\otimes$ be a binary operation on $Y$, then for any $c\in Y$, we define $c\otimes f:X\to Y$ as: $\left(c\otimes f\right)\left(x\right)=c\otimes f\left(x\right)$
Image of a Set
Let $f:X\to Y$ be a function and $S\subseteq X$, then
An Element Belongs to a set Implies its Image belongs to the Image of the Set
$x\in A\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}f\left(x\right)\in f\left(A\right)$
This follows by definition
An Element belongs to a Set iff its Image belongs to the Image of the Set when the Function is Surjective
Suppose that $f:A\to B$ is injective, then $x\in A\phantom{\rule{thickmathspace}{0ex}}⟺\phantom{\rule{thickmathspace}{0ex}}f\left(x\right)\in f\left(A\right)$
The previous corollary already shows $\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}$ now if we suppose that $f\left(x\right)\in f\left(A\right)$ then there is some $a\in A$ such that $f\left(x\right)=f\left(a\right)$, since $f$ is injective, then we deduce that $x=a$ so that $x\in A$.
Image Maintains Subsets
Suppose that $A\subseteq B$ then we have $f\left(A\right)\subseteq f\left(B\right)$
Let $x\in f\left(A\right)$ so that $x=f\left(a\right)$ where $a\in A$ we then know that $a\in B$ so therefore $x\in f\left(B\right)$
Union Factors through Image
$f\left(\bigcup \mathcal{M}\right)=\bigcup \left\{f\left(M\right):M\in \mathcal{M}\right\}$
$p\in f\left(\bigcup \mathcal{M}\right)$ iff $p=f\left(x\right)$ where $x\in \bigcup \mathcal{M}$ iff there exists some $M\in \mathcal{M}$ such that $x\in M$ which shows that $f\left(x\right)\in f\left(M\right)$ iff $p\in \bigcup \left\{fM:M\in \mathcal{M}\right\}$ as needed.
Image of the Intersection is a Subset of the Intersection of the Images
$f\left(\bigcap \mathcal{M}\right)\subseteq \bigcap \left\{f\left(M\right):M\in \mathcal{M}\right\}$
Suppose that $p\in f\left(\bigcap \mathcal{M}\right)$ iff $p=f\left(x\right)$ where $x\in \bigcap \mathcal{M}$ iff $M\in \mathcal{M}$, $x\in M$ therefore $f\left(x\right)\in f\left(M\right)$ so that $p=f\left(x\right)\in \bigcap \left\{f\left(M\right):M\in \mathcal{M}\right\}$
Image of the Intersection is Equal to the Intersection of the Images if the Function is Injective
Suppose that $f$ is injective, then $f\left(\bigcap \mathcal{M}\right)=\bigcap \left\{f\left(M\right):M\in \mathcal{M}\right\}$
We already know that $\subseteq$ holds true therefore we do the other direction so suppose that $p\in \bigcap \left\{f\left(M\right):M\in \mathcal{M}\right\}$ therefore $p\in f\left(M\right)$ for all $M\in \mathcal{M}$ so that there is some ${x}_{M}\in M$ such that $p=f\left({x}_{M}\right)$. We note that for all $J,K\in M$ we know that $f\left({x}_{J}\right)=p=f\left({x}_{K}\right)$ so that by injectivity we have ${x}_{J}={x}_{K}$ let ${x}^{\mathrm{\prime }}$ be their common value and note that ${x}^{\mathrm{\prime }}\in \bigcap \mathcal{M}$ and that $p=f\left({x}^{\mathrm{\prime }}\right)$ so that $p\in f\left(\bigcap \mathcal{M}\right)$
Inverse Image of a Function
Suppose $f:X\to Y$ and $U\subseteq Y$, then ${f}^{-1}\left(U\right):=\left\{x\in X:f\left(x\right)\in U\right\}$
Inverse Image Maintains Subsets
Suppose that $A\subseteq B$ then we have ${f}^{-1}\left(A\right)\subseteq {f}^{-1}\left(B\right)$
Let $x\in {f}^{-1}\left(A\right)$ so that $f\left(x\right)\in A$ we then know that $f\left(x\right)\in B$ so therefore $x\in {f}^{-1}\left(B\right)$
Inverse Image of The Range is The Domain
Suppose that $f$ is a function, then ${f}^{-1}\left(\mathrm{ran}\left(f\right)\right)=\mathrm{dom}\left(f\right)$

$x\in {f}^{-1}\left(\mathrm{ran}\left(f\right)\right)$ iff $f\left(x\right)\in \mathrm{ran}\left(f\right)$ iff $x\in \mathrm{dom}\left(f\right)$ by definition

Inverse Image of a Composition
Suppose that we have two functions $f:X\to Y$ and $g:Y\to Z$ and suppose that $S\subseteq Z$, then ${\left(g\circ f\right)}^{-1}\left(S\right)={f}^{-1}\left({g}^{-1}\left(S\right)\right)$
A point $p$ is an element of ${\left(g\circ f\right)}^{-1}\left(S\right)$ iff $\left(g\circ f\right)\left(p\right)\in S$ by definition this means that $g\left(f\left(p\right)\right)\in S$ iff $f\left(p\right)\in {g}^{-1}\left(S\right)$ iff $p\in {f}^{-1}\left({g}^{-1}\left(S\right)\right)$ as needed.
Union Factors through Inverse Image
${f}^{-1}\left(\bigcup \mathcal{M}\right)=\bigcup \left\{{f}^{-1}\left(M\right):M\in \mathcal{M}\right\}$

We can observe that $p\in {f}^{-1}\left(\bigcup \mathcal{M}\right)$, if and only if $f\left(p\right)\in \bigcup \mathcal{M}$, iff there exists some $M\in \mathcal{M}$ such that $f\left(p\right)\in M$ iff $p\in {f}^{-1}\left(M\right)$ so that $p\in \bigcup \left\{{f}^{-1}\left(M\right):M\in \mathcal{M}\right\}$ as needed.

Since all the logical connectives in the above proof are iff's then this shows the two sets equal

Set Difference Factors through Inverse Image
Suppose that $f:X\to Y$, and that $A,B\subseteq Y$, then ${f}^{-1}\left(A\setminus B\right)={f}^{-1}\left(A\right)\setminus {f}^{-1}\left(B\right)$
$x\in {f}^{-1}\left(A\setminus B\right)$ iff $f\left(x\right)\in A\setminus B$ iff $f\left(x\right)\in A$ and $f\left(x\right)\notin B$, iff $x\in {f}^{-1}\left(A\right)$ and $x\notin {f}^{-1}\left(B\right)$, iff $x\in {f}^{-1}\left(A\right)\setminus {f}^{-1}\left(B\right)$, as needed.
Intersection Factors through Inverse Image
${f}^{-1}\left(\bigcap \mathcal{M}\right)=\bigcap \left\{{f}^{-1}\left(M\right):M\in \mathcal{M}\right\}$

We can observe that $p\in {f}^{-1}\left(\bigcap \mathcal{M}\right)$, if and only if $f\left(p\right)\in \bigcap \mathcal{M}$, iff for every $M\in \mathcal{M}$ we have $f\left(p\right)\in M$ iff $p\in {f}^{-1}\left(M\right)$ (still for each $M\in \mathcal{M}$ ) so that $p\in \bigcap \left\{{f}^{-1}\left(M\right):M\in \mathcal{M}\right\}$ as needed.

Since all the logical connectives in the above proof are iff's then this shows the two sets equal

Image of the Inverse Image
Suppose that $f:X\to Y$ is a function, and that $S\subseteq Y$, then $f\left({f}^{-1}\left(S\right)\right)\subseteq S$

Let $p\in f\left({f}^{-1}\left(S\right)\right)$, therefore $p=f\left(x\right)$ where $x\in {f}^{-1}\left(S\right)$, therefore $f\left(x\right)\in S$ as needed.

Note that the above proposition is not equality, consider the function $f:X\to \left\{0,1\right\}$ defined as $f\left(x\right)=0$ for every $x\in X$, then $f\left({f}^{-1}\left(\left\{0,1\right\}\right)\right)=\left\{0\right\}$. This hints at how we can force equality

Inverse Image of the Image
Suppose that $S\subseteq X$, then ${f}^{-1}\left(f\left(S\right)\right)\supseteq S$
Let $s\in S$, we wish to prove that $s\in {f}^{-1}\left(f\left(S\right)\right)$, which means that we must show $f\left(s\right)\in f\left(S\right)$, clearly this is true since $s\in S$

This proposition is not equality if we consider the function $f:\left\{1,2,3,4\right\}\to \left\{1,2,3,4\right\}$ and define $f\left(1\right)=1,f\left(2\right)=2,f\left(3\right)=2,f\left(4\right)=1$, then if we consider ${f}^{-1}\left(f\left(\left\{1,2\right\}\right)\right)$ we see it equals $\left\{1,2,3,4\right\}$ which is clearly a superset.

Invertible Function
Let $f:X\to Y$ be a function, then $f$ is said to be invertible if there exists a function $g:Y\to X$ such that $g\left(f\left(x\right)\right)=x$ for every $x\in X$ and $f\left(g\left(y\right)\right)=y$ for every $y\in Y$
Inverse Function
Suppose that $f$ is invertible, then there is a function $g$ satifying said properties, then we define the notation ${f}^{-1}:=g$ and say that ${f}^{-1}$ is the inverse function of $f$

Note that this seems quite similar to the inverse image notation, which looks like ${f}^{-1}\left(S\right)$ where $S\subseteq Y$, note that they differ as the inverse image is a function from $P\left(Y\right)$ to $P\left(X\right)$, so it is a function that maps sets to sets.

This differs from the inverse of a function because it operates on individual elements of $Y$, so we may write things like ${f}^{-1}\left(s\right)$ where $s\in Y$, noting that ${f}^{-1}:Y\to X$.This idea of using the same notation for a function, but having the type of it's parameters be different is usually known as overloading in the world of programming.

If this is your first brush with notation overloading, then know that it can be confusing, but all confusion can be cleared by inspecting what the inputs are to the function. This should remind you that a function is not just a name, it's signature is given by it's name, input types and return type. To see if you really understand this, answer the following exercise.

Invertible iff Bijective

This means that the notation ${f}^{-1}\left(y\right)$ where $y\in \mathrm{ran}\left(f\right)$ is reserved only for functions $f$ whose inverse exists, otherwise we have problems for example if $f$ was not surjective and there was an element $z$ that can never get mapped to then what does ${f}^{-1}\left(z\right)$ mean? If it was not injective, then suppose that there was $a\ne b$ such that $f\left(a\right)=f\left(b\right)$ then $a\stackrel{?}{=}{f}^{-1}\left(f\left(a\right)\right)={f}^{-1}\left(f\left(b\right)\right)\stackrel{?}{=}b$ makes no sense because we know that $a\ne b$, so we must have injectivity. Therefore you must be carful not to write the symbol ${f}^{-1}$ unless you know that $f$ is invertible.

Inverse Image of the Inverse Function is the Image
Let $f:X\to Y$ and assume that it's inverse exists ${f}^{-1}:Y\to X$ and let $S\subseteq Y$ show that: ${\left({f}^{-1}\right)}^{-1}\left(S\right)=f\left(S\right)$

Suppose that $p\in {\left({f}^{-1}\right)}^{-1}\left(S\right)$, by definition this is only true when ${f}^{-1}\left(p\right)\in S$, so ${f}^{-1}\left(p\right)=s$ for some $s\in S$, equivalent to $p=f\left(s\right)$, which is true if and only if $p\in f\left(S\right)$.

All logical connectives in the above proof are iff's therefore we've shown the two sets equal.

Injective Function
a function $f:X\to Y$ is injective iff $\mathrm{\forall }x,y\in X,f\left(x\right)=f\left(y\right)\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}x=y$
Inverse Image of Image Equality
Suppose that $f:X\to Y$ and that $S\subseteq X$, if $f$ is injective then ${f}^{-1}\left(f\left(S\right)\right)=S$

We've already proven that ${f}^{-1}\left(f\left(S\right)\right)\supseteq S$, so we just need to prove that ${f}^{-1}\left(f\left(S\right)\right)\subseteq S$.

Suppose that $p\in {f}^{-1}\left(f\left(S\right)\right)$, therefore $f\left(p\right)\in f\left(S\right)$, which means that there is some $s\in S$ such that $f\left(p\right)=f\left(s\right)$, since we assumed that $f$ was injective this implies that $p=s$, which concludes by showing $p\in S$.

Surjective Function
a function $f:X\to Y$ is surjective iff
Image of Inverse Image Equality
Suppose that $f:X\to Y$ and that $S\subseteq Y$, if $f$ is surjective then $f\left({f}^{-1}\left(S\right)\right)=S$

We're already aware that $f\left({f}^{-1}\left(S\right)\right)\subseteq S$ , so we must just show that $f\left({f}^{-1}\left(S\right)\right)\supseteq S$.

So we start by assuming $s\in S$, and now we must show that $s\in f\left({f}^{-1}\left(S\right)\right)$, this is only true if $s=f\left(x\right)$ for some $x\in \left({f}^{-1}\left(S\right)\right)$, which in turn means that $x$ also has to satisfy: $f\left(x\right)\in S$.

We start with $s\in S\subseteq Y$, thus since $s\in Y$ and $f$ is surjective we get some $a\in X$ such that $f\left(a\right)=s$, since $s\in S$ , then also $a\in f\left(S\right)$ as needed.

Bijective function
a function is bijective iff it is surjective and injective
composition of two bijective functions is bijective
Suppose $A,B,C$ are non-empty sets and $f:A\to B,g:B\to C$ are functions, and that $g\circ f:A\to C$ is a function. Then if $f$ and $g$ are bijective then $g\circ f$ is also bijective.

We'll show that $g\circ f$ is surjective first, so let $c\in C$, since $g$ is bijective we get some $b\in B$ such that $g\left(b\right)=c$, since $b\in B$, then since $f$ is surjective we get some $a\in A$ such that $f\left(a\right)=b$, thus $g\circ f\left(a\right)=g\left(f\left(a\right)\right)=g\left(b\right)=c$ so then $g\circ f$ is surjective

Now let's show that $g\circ f$ is injective, so suppose that ${a}_{1},{a}_{2}\in A$ and assume that $g\circ f\left({a}_{1}\right)=g\circ f\left({a}_{2}\right)$, note that this means $g\left(f\left({a}_{1}\right)\right)=g\left(f\left({a}_{2}\right)\right)$, therefore since $g$ is injective we know that $f\left({a}_{1}\right)=f\left({a}_{2}\right)$ and since $f$ is injective then we know that ${a}_{1}={a}_{2}$ as needed.

Self Map
Suppose that $X$ is a set, then a self map is any function of the form $f:X\to X$
Permutation
A permutation is a bijective self map
Function Iteration
Given a function $f:X\to X$, then we define ${f}^{\circ 0}:={\mathrm{id}}_{X}$ and then for any $n\in {\mathbb{N}}_{1}$ we define via composition: ${f}^{\circ n}=f\circ {f}^{\circ n-1}$

So for example ${f}^{\circ 3}\left(x\right)=f\left(f\left(f\left(\mathrm{id}\left(x\right)\right)\right)\right)$ which is what we expect.

Relation Preserving Function
Suppose that $\left(R,X\right)$ and $\left(S,Y\right)$ are binary relations, and $f:X\to Y$ a function, then we say that $f$ is relation preserving if given $x,y\in X$ $xRy\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}f\left(x\right)Sf\left(y\right)$

Note that when the relation is an order, we say that it is an order preserving function, you are already familiar with them, consider $f\left(x\right)=x+1$ on $\mathbb{R}$.

Relation Reversing Function
Suppose that $\left(R,X\right)$ and $\left(S,Y\right)$ are relations, and $f:X\to Y$ a function, then we say that $f$ is relation reversing if given $x,y\in X$ $xRy\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}f\left(y\right)Sf\left(x\right)$
The Inverse of an Order Preserving Function is Order Preserving
Suppose that $\left(A,{\le }_{A}\right)$ and $\left(B,\le B\right)$ are partial orders and $f:A\to B$ is order preserving and invertible, then ${f}^{-1}:B\to A$ is also order preserving

Let ${b}_{1},{b}_{2}\in B$ such that ${b}_{1}{\le }_{B}{b}_{2}$ now we want to prove that ${f}^{-1}\left({b}_{1}\right){\le }_{A}{f}^{-1}\left({b}_{2}\right)$.

If it so happens that ${b}_{1}={b}_{2}$ then we automatically have that ${f}^{-1}\left({b}_{1}\right)={f}^{-1}\left({b}_{2}\right)$ as ${\le }_{A}$ is reflexive.

So suppose rather that ${b}_{1}{\le }_{B}{b}_{2}$ and that ${b}_{1}\ne {b}_{2}$. Note that ${f}^{-1}\left({b}_{1}\right)={a}_{1}$ and ${f}^{-1}\left({b}_{2}\right)={a}_{2}$ for some ${a}_{1},{a}_{2}\in A$ since ${\le }_{A}$ is a total order than ${a}_{1},{a}_{2}$ are comparable, if it so happens that ${a}_{2}{\le }_{A}{a}_{1}$ then since $f$ is order preserving, then we would have $f\left({a}_{2}\right){\le }_{B}f\left({a}_{1}\right)\phantom{\rule{thickmathspace}{0ex}}⟺\phantom{\rule{thickmathspace}{0ex}}{b}_{2}{\le }_{B}{b}_{1}$ since $f$ was assumed invertible, which would only be possible if ${b}_{1}={b}_{2}$ which we know is not the case, therefore we must have that ${a}_{1}{\le }_{A}{a}_{2}$ which means that ${f}^{-1}\left({b}_{1}\right){\le }_{A}{f}^{-1}\left({b}_{2}\right)$

When a Function Defined in Terms of a Function is a Function
Suppose that $g:A\to B$ and $h:A\to A$, then if $f$ is a defined such that $f\left(g\left(a\right),g\left(b\right)\right)=g\left(h\left(a,b\right)\right)$ is a function iff for any $x,y,z,w\in A$ $\left(g\left(x\right)=g\left(z\right)\wedge g\left(y\right)=g\left(w\right)\right)\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}g\left(h\left(x,y\right)\right)=g\left(h\left(z,w\right)\right)$