6

In most texts I have seen applying function $f$ to an element $x$ is denoted by $f(x)$, as opposed to $xf$ or $(x)f$ or $x(f)$. This makes function composition inconvenient. Given a diagram $A \xrightarrow{f} B \xrightarrow{g} C$ I need to write $f$ and $g$ in the opposite order of how I read them off from the diagram: $(g\circ f)(x)$ as opposed to $(x)(f\circ g)$.

Question: Is there a benefit to the current notation that I am missing? Or is this just unfortunate notation that happened to stick over the years?

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Feb 19 '22 at 21:13
  • It's only inconvenient if you also decide to compose in the opposite direction. For left-functions writing $g(f(x))$ is perfectly natural for what $g \circ f$ does. For right-functions writing $((x)f)g$ is perfectly natural for what $f \circ g$ does. You wouldn't write $g \circ f$ for function composition on the right: you'd use $f \circ g$. – Randall Feb 19 '22 at 21:20
  • 11
    .noitnevnoc lacirotsih a tsuj ylbaborp si tI – copper.hat Feb 19 '22 at 21:22
  • 2
    It just makes sense given how we phrase function actions: we talk about the exponential of a number, or the cosine of an angle, so we write $\exp(x)$ and $\cos(\alpha)$. – Captain Lama Feb 19 '22 at 21:39
  • As an aside, there is a convention known as “reverse Polish notation” which uses postfix notation. It’s useful for calculators since expressions can be computed without parentheses. – Mark Saving Feb 19 '22 at 22:02
  • fg(x) means that g gets to act on x first and then f on the result. On my calculator if I want to do (say) sin(cos(x)) I put in x, then press cos and then sin. This seems absolutely right to me because I have been using the same HP11 calculator for over 40 years. If you are wedded to a Casio then you type out the whole thing and then press equals. I like the ability to go back and edit the function in Casio type calculators but overall we have 300 years of investment in the postfix type notation. – nerak99 Feb 20 '22 at 09:33
  • Related: https://math.stackexchange.com/q/314794/468350 – Xander Henderson Sep 07 '22 at 14:15

2 Answers2

4

It is perfectly possible to write functions on the right, like $xf$ or $x^f$, and this is commonly done in some areas, for example, with permutations in group theory. A consequence is that a product of cycles multiplies from left to right, exactly as you mention above, rather than right to left which can seem "backwards" (but it is done that way in many elementary textbooks).

However, for notation like $\sin x$ the "left side" notation is too-well established historically, and changing it to something like $x^{\sin{}}$ is probably not going to happen.

When the argument is written out, like the $x$ in $\sin(x)$, which side of the function you use doesn't matter too much, since the position of the $x$ directs the reader to perform the operations in the right order. It's only in a context where the argument is hidden, like with permutations, or in an arrow diagram like in your example, that the left-side convention can seem backwards. But you can (and I do like to) switch to right-side convention in such cases.

Ted
  • 35,732
  • 1
    I agree that functions acting on the left is too historically established to change at this point. My question is whether there is any other benefit to it other than its history. It is clear what the benefit of the $xf$ notation is -- no tripping up every time I work with commutative diagrams (which is all the time). – Vasily Ilin Feb 20 '22 at 19:14
1

To add to @Ted's answer.

I think it has its origin in our usage (in Europe & the US) of language. We say "a function applied to", which suggest to write $f(x)$. However, for the same reason, we tend to read functional composition (as you pointed out) from left to right. So, it is a matter of what you want to put your focus on. If in your subject not much functional composition is involved, you can stay with the $f(x)$ notation. However, if you use functional composition a lot, like in permutation group theory, you might prefer $xf$ or $x^f$.

Let me point out that I have seen a lot of papers in group theory that actually use both conventions. For functions (and transformation) the right-action notation is used, but for "higher operators" that are never composed, the other notation is used. An example would be, if you associate another object (like a graph) with some given object $X$, people tend to write $G(X)$ while using the $xf$ notation for "ordinary" functions.

I do not speak Hebrew or Arabic, so I cannot tell how strong this habit might be for people that read from left to right.

StefanH
  • 18,586