What is rigorous notation for functions?

I have seen many ways to denote a function: $f(x)=x^2, y=x^2, f: x\mapsto x^2$ and so on. What is exact notation for functions? Please include lethal doses of rigor, set theory, and of course notational exactness.

Note: I am very familiar with functions in general. I just know that a lot of mathematical literature abuses notation when it comes to functions.

• Erm... What do you mean by "correct notation?". Notation is not a statement or logical derivation. It can be ambiguous, convenient, confusing, unusual, short, etc. but how can it be correct or incorrect? – fedja May 25 '13 at 12:55
• Definitions are rigorous. Not notations. One can define a new notation rigorously, but it's the definition which is rigorous, not the notation. – Asaf Karagila May 25 '13 at 16:59

$$f:E\to F,\quad x\mapsto f(x)$$

For example, the function $f:\mathbb R\to\mathbb R$, $x\mapsto x^2$, is not the function $g:\mathbb R_+\to\mathbb R$, $x\mapsto x^2$, but the functions $h:\{-1,0,1\}\to\mathbb R$, $x\mapsto x^2$ and $k:\{-1,0,1\}\to\mathbb R$, $x\mapsto |x|$ are equal.

• Main thing to remember is that one should later refer to "the function $f$", not "the function $f(x)$". Conventions whether $\int f(x)\,\mathrm dx$ or $\int f\,\mathrm d\mu$ are better are often a matter of taste. Make sure to be able to distinguish between different functions (so Did's first example shows that $x\mapsto x^2$ may not be specific enough). Note that many other places of ambiguity exist, for example is $f^2$ given by $x\mapsto f(f(x))$ or by $x\mapsto f(x)\cdot f(x)$? – Hagen von Eitzen May 25 '13 at 13:20
• @HagenvonEitzen What is the du-thingy notation? Any references? – PyRulez Jan 23 '15 at 23:41

You should include the following:

1: The name of your function e.g. $f$

2: The domain and codomain (not the image!) of your function. e.g. $A \rightarrow B$

3: The rule of your function, e.g. $x \mapsto x^2$.

so this function would be:

$f:A \rightarrow B,\ x \mapsto x^2$

Using ZF a function $f$ is a subset $f \subseteq \mathcal P(X \times Y)$ for some fixed sets $X,Y$ such that $\forall x \in X \ \exists ! y \in Y \ (x,y) \in f$. We denote with $f(x) \in Y$ the unique value in $Y$ such that $(x,f(x)) \in f$.

Now, what is allowed to describe for a given $x \in X$ its image $f(x) \in Y$, heavily depends on the structure of $Y$ and we may introduce notation such as $f: X \rightarrow Y, \ x \mapsto f(x)$ for our own convenience...