Question about $x\mapsto f(x)$ notation.

206 Views Asked by At

I'm trying to learn this notation, but I have some questions regarding its uses:

Why is a "$:$" used instead of "$=$" when defining the function, e.g. $f: x\mapsto f(x)$ isntead of $f = x\mapsto f(x)$, or even $f\triangleq x\mapsto f(x)$, as you define the function?

WolframAlpha uses the symbol $\to$ instead of $\mapsto$, and mentions the latter being "used when explicitly considered as a "map."", but what's the difference between a function and a map? Is $f:x\to f(x)$ better?

And lastly, is there a way with this notation to define the function at a value? Like $(f : x\mapsto f(x))|_{x=a} = f(a)$ or something?

4

There are 4 best solutions below

9
On BEST ANSWER

Here is what I have seen used:

Usually, we write $f: A \to B$, where $A$ is the domain of $f$ (i.e. the set of inputs), and $B$ is the codomain of $f$, i.e., the set where the outputs lie (note that it isn't necessarily true that an element of $B$ must be an output of $A$ -- if this were true, $f$ would be called onto).

Now, if we want to specify where each specific element goes, perhaps by a formula, then we use the $\mapsto$ arrow instead of $\to$. So we might write $f: \Bbb R \to \Bbb R$ with $x \mapsto x^{2}$. This tells us that $f$ takes input from $\Bbb R$, and has output in $\Bbb R$, and each element $x \in \Bbb R$ is sent to $x^{2}$.

Usually, when we use the equal sign, =, we are using it between two objects that are of the same type. For example, if $A$ and $B$ are sets, we might write $A = B$. If $x$ and $y$ are numbers, we might write $x = y$. If $M$ and $N$ are both matrices with the same dimensions, we might write $M = N$. But if $x$ is a number and $A$ is a set, it doesn't make sense to write $x = A$. For example, $2 = 2$, clearly, and $\{ x, y, z \} = \{ x, y, z\}$, clearly, but does it make sense to say $2 = \{ x, y, z \}$? We can't even say these two aren't equal because they aren't the same type of thing.

We only use $=$ between two things that are of the same type to indicate they are the same thing. This is why it doesn't make sense to say $f = A \to B$. What are we saying? That $f$ equals $A$ arrow $B$? Instead, we use $:$ because it is a definition. Like if you write the definition of a word:

running: (n) a physical activity.

3
On

I'm trying to learn this notation, but I have some questions regarding its uses:

Why is a "$:$" used instead of "$=$" when defining the function, e.g. $f: x\mapsto f(x)$ isntead of $f = x\mapsto f(x)$, or even $f\triangleq x\mapsto f(x)$, as you define the function?

Because stating $f = x\mapsto f(x)$ could easily be misinterpreted as $f = x$, and $f$ gets mapped into $f(x)$, which is ambiguous.

WolframAlpha uses the symbol $\to$ instead of $\mapsto$, and mentions the latter being "used when explicitly considered as a "map."", but what's the difference between a function and a map? Is $f:x\to f(x)$ better?

There is no significant difference.

And lastly, is there a way with this notation to define the function at a value? Like $f|_{x=a} : x\mapsto f(x)|_{x=a}$ or something?

e.g. $x = 5 \Longrightarrow f : 5 \to f(5)$

2
On

Generally there is no difference between map, function, rule of correspondence, application and family although those terms are used in different contexts, for example application is used to say something like let $T:V\to W$ be a linear application, and family is used to just label some objects and is often written as let $\{A_i\}_{i\in I}$ be a family of (something). I think the notation $f:x\mapsto f(x)$ or $f=x\mapsto f(x)$ are both incorrect because none of them specify a very important thing of a function: its domain. I think the best way to define a function is as $f:A\to B,f(x)=\text{something in x}$ and the $\mapsto$ symbol is only useful when you don't want to introduce more variables but want to express something related to a function, for example: The multiplicative group $(R^+,\cdot)$ and the additive $(R,+)$ group are isomorphic because the function $R\to R^+$, $x\mapsto e^x$ is an isomorphism.

The family notation is also useful in some contexts, for example you might find something like let $\{A_i\}_{i\in I}$ be a "family" of sets. There the term family is used to indicate a function $A$ whose domain is $I$ .

In general you have to just figure out what is the author telling you, there are a lot of different ways to write functions.

0
On

A lot of times mathematics, it's actually more important that there is a function from some structure $X$ to a structure $Y$ with certain properties than what the function actually does on the values. That's just details. So to capture this essential information, we write

$$f : X \to Y$$

and there's no other notation for it. $f$ could not be equal to $X \to Y$, it's just its type. If you know programming in a statically typed language like C#, it's like giving the signature of your methods

int Add(int, int);

or even closer in Haskell

add :: Int -> Int -> Int

You can get a great deal of your program right by just working out the datatypes and leave all procedure code blank. What they do is details ;)

So if you write down a function, you give the essential information

$$f : \mathbb R \to \mathbb R$$

and then (maybe) add what it does in detail

$$f : \mathbb R \to \mathbb R, x \mapsto x^2$$

This can even be more concrete

$$f : \{1,2\} \to \{a,b\}, 1 \mapsto b, 2 \mapsto a$$

Now if it's completely obvious what domain and target of your function are, the above may be shortened to

$$f : x \mapsto x^2$$

However you could just say $f(x) = x^2$ as well. The long form here is "Let $f : \mathbb R \to \mathbb R$ be defined by $f(x)=x^2$".


You can be customary to think of $x \mapsto x^2$ as an anonymous function $\mathbb R \to \mathbb R$. In this context, it would make sense to write $f = (x \mapsto x^2)$. There are other notations to it, like lambda-calculus $f = \lambda x.x^2$. However, this is just common in contexts where you deal with functions of functions. For example

$$i(x) := (u \mapsto u(x))$$

though you could write as well

$$i(x)(u) = u(x).$$

Confusing? That's why we usually dont think of $x \mapsto f(x)$ as an anonymous function but just of an explanation what $f : X \to Y$ does.