# Terminology Question: Precompose vs Compose?

I was wondering if there was a standard convention on what 'precompose' means compared to 'compose', as I am often confused between the two when all sorts of text casually use both terminologies. For example, say we have some collection of objects $A$ and $B$, and two maps $f:A\to B$ and $g:B\to A$.

• If I say "compose $f$ with $g$", does this mean $g\circ f$ or $f\circ g$?
• Similarly, if I say "precompose $f$ with $g$", does this mean $g\circ f$ or $f\circ g$?
• Both usages are ambiguous, and that is that; there is nothing more to be said. (You could say precompose $f$ to $g$ to eliminate the ambiguity in that case, though) – Mariano Suárez-Álvarez Feb 14 '13 at 21:45
• "Precompose with $f$" usually means the operation $(-) \circ f$. "Pre" here refers to the order of application and not the order in which the symbols are printed on paper... – Zhen Lin Feb 14 '13 at 21:50
• Not sure why you're being so caustic. Your answer only confuses me more, as you argue that both usages are ambiguous and yet there is no ambiguity with "to". This hardly makes sense to me, leaving more questions than any answers you feel have "nothing more to be said." – Dustin Tran Feb 14 '13 at 22:13
• Precompose $f$ to $g$ describes an operation on $f$ that places it before $g$ (in the relevant sense of before), so it is not ambiguous. While I would myself expect precompose $f$ with $g$ to mean the same thing, the fact is that it is also used to describe an operation on $f$ and $g$ jointly that results in one being precomposed to the other without clearly specifying which is which $-$ hence the ambiguity. In short, Mariano is right, though I suspect that precompose with is more often understood to be precompose to than to be the very ambiguous precompose and. – Brian M. Scott Feb 14 '13 at 22:32
• I'm honestly a little baffled by everyone here saying that "precompose" is ambiguous. In my own personal experience, "precompose with $f$" is widely understood to mean $g\circ f$, as Zhen Lin commented above. "Compose", on the other hand, is more ambiguous: the terms "precompose" and "postcompose" were invented precisely to resolve this ambiguity. Maybe this is just something that only people who do a lot of category theory say... – Eric Wofsey Jun 2 '16 at 22:12

I'll consider the uses of precompose and compose separately.

Precompose: This appears to simply be another case of linguistic misappropriation by mathematicians, for using this word in the sense of functional composition does not make any linguistic sense whatever. From the Oxford English Dictionary (full snippet at end of answer):

precompose, v. $\qquad\mid\qquad$ trans. To compose beforehand. Usu. in pass.

Hence, the usage of "with, to, and" does not seem to make a difference--if you are considering $g\circ f$ or $f\circ g$, what would it mean to do anything beforehand (with, to, or and) when all you've got on your hands are two functions? Beforehand what? It doesn't make any sense. I would recommend striking out the word precompose completely from any mathematical writing. In fact, I did some minor searching (I had never heard of "precomposing" in a mathematical context before coming across this post) and came across the following blurb from the University of Utah about Precomposing Equations:

Let's "precompose" [quotes not mine] the function $f(x)=x^3-2x+9$ with the function $g(x)=4-x$. (Precompose $f$ with $g$ means that we'll look at $f\circ g$. We would call $g\circ f$ "postcomposing" $f$ with $g$.)

Whatever the case, usage of precompose seems unwise and is only likely to lead to confusion, hence that author's use of quotes for precompose, your own confusion on the matter, and also some mildly humorous confusion that occurred on this thread.

Compose: This is an issue of direction of composition more than anything else it seems; for instance, when you write $f\circ g$, what do you actually mean? Does $(f\circ g)(x)$ mean $f(g(x))$ or $g(f(x))$? That is, which mapping is applied first? This issue is addressed in the form of a warning at the beginning of John Durbin's book Modern Algebra (6th ed, p. 18):

Some authors write mappings on the right rather than on the left. Our $\alpha(x)$ becomes, for them, $x\alpha$. Then in $\beta\circ\alpha$ it is $\beta$, the mapping on the left, that is applied first, because $x(\beta\circ\alpha)=(x\beta)\alpha$. Although we shall consistently write mappings on the left, it is important when reading other sources to take note of which convention is being followed.

Hence, when you read about composing $f$ with $g$, I have always seen this mean $f\circ g$ and never $g\circ f$, but the more important thing it seems, as illustrated above, is to have a common understanding of what mapping is being applied first.

Snippet: • We can act on the set of maps A -> B with groups Aut(B), (under postcomposition), or Aut(A) (under precomposition). In this example, and many others, the terms are both clear and useful. – Andrew Marshall Jan 14 '17 at 20:56

I think "composed" has a consistent usage ("$f$ composed with $g$" = $f \circ g$) but "precomposed" doesn't.

I'm happy with people using "precompose", but the "pre" here can seemingly refer to either:

1. "before it in the order we write it": so "$f$ precomposed with $g$" is the same as $f \circ g$.
2. "before it in the order we apply functions": so "$f$ precomposed with $g$" is the same as $g \circ f$

This is doubly confused by the fact that some people apply functions on the right, so $f(x)$ becomes $xf$, and therefore functions are applied in the opposite order to the way I would expect.

As said above, my personal feeling is that if I said "$f$ composed with $g$" then I would unambiguously mean $f \circ g$, so "$f$ precomposed with $g$" in order to be a useful term should be $g \circ f$. (However, what is unambiguous to me may not be to other people...)

The long and short of it is: since there's an ambiguity, you should always explain what you mean by it the first time you use the word! And if possible, avoid using it and just write what you mean, either $g \circ f$ or $f \circ g$.