Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On the most basic level I would like to define something like this: $$g:\Bbb R\to\Bbb R, x \mapsto x$$ $$f:\Bbb R\times?\to\Bbb R, (x, g)\mapsto xg(x)$$ My question is: How would one define a function such that another function can be a parameter?

share|cite|improve this question
up vote 1 down vote accepted

You don't need any special notation for this, the only thing you would like to do is specify the domain. The usual mathematical notation for set of functions $A \to B$ is $B^A$, so you could write like this:

$$f : B^A \to C,$$


$$ f : (A \to B) \to C$$

should be understood as well (especially within the area of computer-science-related math). The definition itself is not special, e.g.

$$f(g) = g(5).$$

However, be aware, that there is a notation for functions returning functions (i.e. having functions as values). As before we could write $f : A \to C^B$ or $f : A \to (B \to C)$, but there are two ways to define it:

$$f(x) = y \mapsto x+y$$


$$f(x)(y) = x+y.$$

Finally, you can combine the first part and the second part, for example $f : \mathbb{R}^\mathbb{R} \to \mathbb{R}^\mathbb{R}$ or $f : (\mathbb{R} \to \mathbb{R}) \to (\mathbb{R} \to \mathbb{R})$ and

$$ f(g) = x \mapsto x\cdot g(x) $$ or $$ f(g)(x) = x \cdot g(x).$$

I hope this helps $\ddot\smile$

share|cite|improve this answer
Ah yes, currying. – kahen Sep 19 '13 at 21:47

$f: \mathbb R \times {\mathbb R}^{\mathbb R} \to \mathbb R$.

$X^Y$ is the set-theoretic notation for the set of functions from $Y$ to $X$ (mind the order!)

For example $2^{\mathbb N} = \{0,1\}^{\mathbb N} = $ the set of sequences of zeroes and ones.

share|cite|improve this answer
Can you explain how $2$ becomes ${0,1}$ – Ali Caglayan Sep 19 '13 at 22:49
That's standard with the usual set representation of $\omega$, the first infinite ordinal. $0 = \emptyset$, $1 = \{0\}$, $2 = 1 \cup \{1\} = \{0,1\}$, $3 = 2 \cup \{2\} = \{0,1,2\}$, etc. See von Neumann's definition of ordinals. – kahen Sep 19 '13 at 23:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.