I understand that $f$ represents a function while $f(x)$ represents the value of a function, but while I can easily see how to apply this convention to work with functions instead of numbers in some circumstances, e.g., $$\sin(x)\text{ becomes } \sin\text{,}$$ $$\cos(x)\text{ becomes } \cos\text{, and}$$ $$g(x)\text{ becomes } g\text{,}$$ it isn't clear to me how to to express the functions corresponding to the numbers $$x^{2}\text{, or}$$ $$2\cdot x\text{.}$$

Short of defining new symbols, like $S$ or $I$ (which I've seen for the function corresponding to $x \mapsto x$), can one say things like $$\left(\cdot\right)^{2}\text{ for }x^{2}\text{, or}$$ $$2\cdot \left(\cdot\right)\text{ or }2\left(\cdot\right)\text{ or }2\cdot\text{ for }2\cdot x\text{?}$$

What is the general idiom for expressing such functions concisely?


A good question. There are various approaches.

Formally, in simple cases such as the ones in the question, you can get away with giving a name to the identity function $\mathrm{Id}$ which returns its argument unchanged. Then, by analogy with, say $\sin^2$, the function that squares its argument becomes $\mathrm{Id}^2$ and the function that doubles its argument is $2\,\mathrm{Id}$.

If you're really devious, you can even decide to name the identity function "$x$", and declare that everything is a function of a hidden variable with some other name. That can quickly get confusing if you have other named functions around, though. If your audience are algebraists, they will probably like this approach.

The full-featured bells-and-whistles solution, however, is to use the applied lambda calculus, in which the function that squares its argument is notated $(\lambda x.x^2)$ or $(\lambda y.y^2)$ or $(\lambda z.z^2)$ ... you get the pattern. The variable that follows the $\lambda$ is bound by the function expression and not visible outside. Thus you can write $(\lambda x.x^2)(20)=400$. The notation also allows you to write functions that take functions as arguments, such as $(\lambda f.f(42))$, or functions that return other functions, such as $(\lambda x.(\lambda y.x+y))$.

The lambda calculus is one of the bedrock formations of computer science, but not much used by contemporary mathematics -- even though it was originally invented as a possible general foundation for mathematics before computers were even invented. Mathematics sometimes uses notations such as "... the function $x \mapsto x^2$ ..." for $(\lambda x.x^2)$, but this $\mapsto$ notation is rarly used inside larger expressions.

  • 2
    $\begingroup$ @rax There's some ambiguity in $\operatorname{Id}^2$: it could mean either the pointwise product of the identity function with itself, or the composition $\operatorname{Id} \circ \operatorname{Id}$ (the second one happens to $\operatorname{Id}$ itself). I guess the standard interpretation depends on context. $\endgroup$ – Srivatsan Nov 15 '11 at 22:01
  • $\begingroup$ True -- I was imagining that one declares once and for all that one is working with pointwise multiplication rather than composition by saying something like "we're working in the commutative algebra of functions". $\endgroup$ – Henning Makholm Nov 15 '11 at 22:04
  • 1
    $\begingroup$ The "devious" approach you describe would seem to be the most convenient (and in practice, widely used). E.g., when one writes (or thinks) $$f'(x)=[\sin x + x^{2}\sin(x+1)]'$$when$$f(x)=\sin x + x^{2}\sin(x+1)$$ and then subsequently uses theorems about the combination and composition of functions to write, say (just as an illustration), $$f'(x)=(\sin x)' + x^{2}\cdot[\sin(x+1)]'+2x\cdot\sin(x+1)$$ or $$f'(x)=(\sin x)' + x^{2}\cdot\sin'(x+1)\cdot(x+1)'+(x^{2})'\cdot\sin(x+1)$$ isn't one (or at least shouldn't one be) doing just that: treating $x$ as the function $\mathrm{Id}$? $\endgroup$ – orome Nov 15 '11 at 22:37
  • 6
    $\begingroup$ You can quickly run into trouble that way, however, because now you're treating juxtaposition as function composition when you write $\sin x$, but as pointwise multiplication in $2x$ (and implicitly in $x^2$). That's bound to create confusion sooner or later if you do it with abandon. For cases such as this I think it will be clearer to write everything with explicit $x$'s and then eschew $(\cdots)'$ in favor of $\frac{d}{dx}(\cdots)$. In the end, when you're writing for humans, clarity should be the final arbiter. $\endgroup$ – Henning Makholm Nov 15 '11 at 22:44

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.