2
$\begingroup$

I am refreshing a bit my basic knowledge of mathematics, and I have some doubts, I am sure you can help me with.

Let's take this function in python:

def f (x): return x ** 2

I gather that this can be written as:

$$f:\Bbb R \to \Bbb R \\ x \mapsto x^2$$

Both domain and codomain of this function are $\Bbb R$.

How about this function:

def g (f, x):
    def h (y): return x * f (y)
    return h

Assuming that $f$ is a function from $\Bbb R$ to $\Bbb R$, and that both $x, y \in \Bbb R$, how do I write this python function in mathematical notation.

I think I can figure out the domain and codomain:

$$ g: \Bbb R ^ \Bbb R \times \Bbb R \to \Bbb R ^ \Bbb R\\$$

But how do you express the actual function mapping?

$\endgroup$
  • $\begingroup$ What do you mean "the actual function mapping"? I think your boxed text explains the mapping $g$ very clearly. $\endgroup$ – rschwieb Mar 1 '13 at 21:14
3
$\begingroup$

$(f,x)\mapsto (y\mapsto x\cdot f(y))$

$\endgroup$
2
$\begingroup$

Note you can also do an iterated pointwise definition:

$$ g(f,x)(y) := x f(y) $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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