Talk:Function composition

message: Oleg Alexandrov 01:34, 16 Jun 2005 (UTC)
thread_title:  I am surprised this article was not categorized so far. Thanks Paul. 

message: Any better way to write the operator than the current f o g?
f \circ g?
:Now I saw someone convert small o in another article into Unicode U+2218 ∘ so I looked at this again. 2218 seems to be the right character, but on Talk:Category theory someone points out that it "doesn't display correctly on some browsers, most notably Internet Explorer." Anyway, I suppose other articles in Wikipedia should follow the choice made in this article. See also Template_talk:Unicode. --TuukkaH 18:05, 3 October 2005 (UTC)
replies: text: I agree that the unicode character is best. It doesn't display because IE just doesn't support Unicode. I use Mozilla.He Who Is 21:41, 4 June 2006 (UTC)
replies: text: A decade later, there is really no excuse not to use ∘ (Unicode U+2218, the unicode ring operator).  Using the degree sign is a hack we should discard. Cerberus (talk) 19:51, 14 September 2016 (UTC)
thread_title:  typography 

message: We say:
:"In the mid-20th century, some mathematicians decided that writing "g o f" to mean "first apply f, then apply g" was too confusing and decided to change notations.  They wrote "xf" for "f(x)" and "xfg" for "g(f(x))".  However, this movement never caught on, and nowadays this notation is found only in old books."
Does anyone have a reference for this? I'm sure I recall the left-to-right notation being used in my undergrad maths degree, which was only three years ago. — Matt Crypto 11:55, 19 August 2005 (UTC)
replies: text: I've seen John Baez, who is thoroughly modern , use the left to right notation for composition, especially in the context of category theory. -Lethe | Talk 18:45, 3 October 2005 (UTC)
replies: text: Edit: actually, I've seen Baez write gf for first act with g and then with f, but I have never seen him write xf for f(x).  That notation seems pretty rare to me. -Lethe | Talk 18:48, 3 October 2005 (UTC)
replies: text: Maybe you just didn't realise it. In any case, it is typical in category theory to conceptualise "elements" of a set as a certain type of morphism, so in that case, it would be perfectly correct and consistent to write xfg for g(f(x)). Revolver 16:47, 7 October 2005 (UTC)
replies: text: There's another notation, which I think I saw in Jacobson's textbook, is xf for f(x). -Lethe | Talk 17:06, 7 October 2005 (UTC)

text: Just a passing note from a Haskell programmer: xfg and fg cannot both be correct type-wise, assuming an unambiguous definition of the notation. That is, h = f o g is correct, and Haskell has $  for correctly expressing y = f $ g $ x as well, but o and $ are not interchangeable. Of course, mathematicians needn't fear type errors like Haskell programmers need. In any case, you can see some programmers and programming languages prefer a left-to-right notation, such as cat file | sort | uniq for composition in shell. --TuukkaH 20:36, 3 October 2005 (UTC)

text: Is it worth noting that most (if not all) concatenative programming languages use a direct equivalent of the xfg syntax to express their programs?  --Piet Delport 10:59, 2 January 2006 (UTC)

text: Note the discussion of this convention at Group homomorphism. I will try to come up with a rewrite for the offending paragraph in the next few days. It is not correct as written, and the pseudo-historical "In the mid-20th century, some mathematicians..." is not up to encyclopedia standards. Michael Kinyon 21:37, 13 March 2006 (UTC)
thread_title: Composition notation

message: JA: As for typography, these tricks work in some settings:
*  "ο" 
* f ο g
* F ο G
* L ο M
JA: Jon Awbrey 03:20, 27 January 2006 (UTC)
thread_title:  Fun with composition signs 

message: Would a derivative of a composite function be a "composite derivative"?  ~Kaimbridge~ 20:23, 30 January 2006 (UTC)
replies: text: I don't know what you mean by a "composite derivative". The derivative of a composition of two functions is given by the chain rule. Paul August ☎ 20:47, 30 January 2006 (UTC)
replies: text: The "composition of two functions" is technically a "composite function", so I was just inquiring if its derivative would be a "composite derivative"——okay, I'll inquire over at chain rule.  ~Kaimbridge~ 20:15, 3 February 2006 (UTC)
thread_title:  Derivative of composite function 

message: Consider the graph of the following function:
(tan\circ cos)^{\infty}(x).
As the exponent converges to infinity, the function assumes a quizzical shape. A cyclical zig-zag made up of boxes set side by side. Wach one peaks at about 1.5614, and has a width of about 1.52. The latter seems to is about pi/2, which makes sense, since that makes pi its period. As for the former, I have been trying to find a connection between it and other known constants, and have yet to find anything. Any suggestions? He Who Is 21:54, 4 June 2006 (UTC)
replies: text: What are f and g? -lethe talk [ +] 21:57, 4 June 2006 (UTC)

text: Those are just the solutions of (\tan\circ\cos)^2(x) = x.  Repeated iteration of x \to f(x) will tend to attractors, such as fixed points of f. –EdC 17:08, 5 February 2007 (UTC)
thread_title:  Upper Limit of the Composition of Tan and Cos 

message: I'm a bit confused by the line "For example, (\sqrt x)^2 = \sqrt{x^2} only when x \ge 0; for all negative x, the first expression is undefined."  For x < 0 don't we have (\sqrt x)^2 = (i \sqrt -x)^2 = i^2 (\sqrt -x)^2 = -x? TooMuchMath 05:06, 20 September 2006 (UTC)
replies: text: Not if f and g are defined to be real-valued functions, which I think is being assumed in the context. Profzoom 22:38, 26 September 2006 (UTC)

text: I have to go with TooMuchMath on this. The domain was not specified and the commmutativity is invalid anyhow. Let's not say \sqrt x is undefined for x < 0 since this is false.--134.117.28.234 18:54, 30 November 2006 (UTC)

text: I agree with TooMuchMath's point on the domain not being specified, but it is true that the square root function and the square function commute under composition only for non-negatives. The last step in TooMuchMath's equation string is wrong: the two negatives should cancel to be a positive. Basically, (\sqrt x)^2 always returns the input, regardless of its sign, but \sqrt{x^2} returns the number with the same magnitude as the input but with a non-negative sign, i.e., it is equivalent to the absolute value function. So for the square root and square functions to commute under composition for a particular number, that number must be the same as its absolute value: x \ge 0. David815 (talk) 23:39, 24 May 2014 (UTC)
replies: text: Whether the domain was specified or not, \sqrt x is not defined for negative values of x.  Indeed, how can it be defined, even if complex numbers are allowed?  For example, what is \sqrt{-1}?  There are two different complex z such that z^2 = -1. --Alexey Muranov (talk) 13:17, 17 January 2019 (UTC)
replies: text:  See Square_root#Principal_square_root_of_a_complex_number. Although it is true that z^2 = -1 has more than one solution, it is conventional to define \sqrt{-1} uniquely. McKay (talk) 06:29, 18 January 2019 (UTC)
replies: text: You can surely select a function from a "multivalued" relation, but there is no special reason to do it this way and to prefer, for example, i over -i.  If one uses the "principal branch of the square root," this should be specified, as this is not the default meaning of the square root. --Alexey Muranov (talk) 19:04, 18 January 2019 (UTC)

text: I am unaware of the convention to define \sqrt{-1} uniquely.  I know that in number theory it is customary to extend the field of rationals with element like \sqrt{2} or \sqrt{-3}, but I thought that in this case either only the field extension matters, and it does not depend on the chosen value, or the element \sqrt{-3} is treated formally, and not as a particular complex number. --Alexey Muranov (talk) 19:10, 18 January 2019 (UTC)
thread_title:  <math>(\sqrt x)^2</math> undefined? 

message: I'm wondering if there is something more general than function composition.  
Example, I have a function f that maps elements of X onto real numbers.  I use this function to define another function g that maps subsets of X onto real numbers--perhaps g gives an average, median, total, minimum, maximum etc.  
How can I describe the relationship between f and g?  Clearly I cannot say g is composed of f.  I want to say something like g is 'based on' f.  Anyone know of anything in the literature?  If so, I guess there should be a link to funciton composition... —The preceding unsigned comment was added by 220.253.86.44 (talk) 00:03, 24 April 2007 (UTC)
replies: text: Perhaps what you are looking for is the idea of an operator. Operators take one function as input, and spew out another function (or spew out a number, or a set ...). Operators that take two functions as input, and spew something out, are called binary operators. There are many, many operators. The classic example is D, which, given any function, spews out its derivative. One can certainly find ways of defining avg so that it is an operator. linas 03:01, 24 April 2007 (UTC)

text: Don't know how to help you. As the article on operator says, an operator is "just a function".  That's all, nothing more. That's neither poorly defined, nor is it conflicting. But you have to think "outside the box" to understand why "composition" (and things like it) are operators (i.e. are "just functions"). You have to answer the questions: what is the domain? what is the range? The domain and range of operators are typically not numbers of any sort. You might be looking for the concept of a dual space. In particular, you might be intersted in the space that is dual to the space of all functions-- see functional analysis. Or perhaps you're just looking for the concept of an integral -- the average of a function is just its integral...linas 04:53, 26 April 2007 (UTC)

text: To be fair, if an operator were "just a function" then there would be no point to operators at all!  We already have functions! For operators to be useful, they must be a _type_ of function.  There appears to be some ambiguity with precisely what type of function an operator is!InformationSpace 02:56, 27 April 2007 (UTC)
replies: text: What you're talking may be related to a closure in computer science.  It's a function that takes an argument and returns another function generated from that argument.  Karl Dickman talk 21:05, 26 November 2008 (UTC)
thread_title:  Something more general than function composition? 

message: ...the functions f: X → Y and g: Y → Z can be composed by computing the output of f when it has an argument of g(x) instead of x.
Should this not be computing the output of g when it has an argument of f(x) ? Tobz1000 (talk) 17:01, 19 May 2009 (UTC)
replies: text: They can be composed in either order, but the one you propose would match the second paragraph and the image better, so I swapped them. — Carl (CBM · talk) 17:32, 19 May 2009 (UTC)

text: I've rephrased it.  The "instead of" was confusing to interpret.  — Quondum 06:52, 29 August 2013 (UTC)
thread_title:  In the opening line... 

message: A further variation encountered in computer science is the Z notation:  is used to denote the traditional (right) composition, but ⨾ (a fat semicolon with Unicode code point U+2A3E[2]) denotes left composition.
The unicode notation is left untranslated on my computer, even though I have Unicode Arial which works well most of the time.  I suggest that someone with knowledge of this add an explanation about where to get the font that would render this symbol.  Better yet, why not just refer to it as ";"?  The details of Z code is a very special subject that may not belong in this article. SixWingedSeraph (talk) 14:58, 31 August 2009 (UTC)
replies: text: Cambria (typeface) has it (because is M$'s math font). JMP EAX (talk) 06:24, 24 August 2014 (UTC)

text: You can find a [partial] list of fonts that support it here. The article now mentions the semicolon too. JMP EAX (talk) 06:38, 24 August 2014 (UTC)
thread_title:  Semicolon for functional composition 

message: As noted above in #typography about six years ago, the appropriate symbol appears to be Unicode U+2218: ∘.  I find it displays correctly on IE9 and Mozilla Firefox 8, and is used in List of mathematical symbols.  The large circle symbol used in this article is a disconcertingly large workaround.  Is there any reason (now that browsers may reasonably be expected to support the more common Unicode symbols) not to update this accordingly in the article?  — Quondum☏ 18:42, 11 May 2012 (UTC)
replies: text: It depends less on the browser and more on the fonts installed. A list is here: . Support for it is indeed much better than for (say) \fatsemi. JMP EAX (talk) 06:57, 24 August 2014 (UTC)
replies: text:  is indeed now used throughout the article, except where  markup is used. -- Beland (talk) 18:40, 24 January 2021 (UTC)
thread_title:  Typography again 

message: Regarding function composition for which g ∘ f = f ∘ g holds:
Do composed functions which have this property have a dedicated name? Can they be considered symmetric functions? --Abdull (talk) 11:59, 18 July 2013 (UTC)
replies: text: No, they can’t. Also, there is no such thing as “functions which have this property”, there are pairs of functions that commute, and this relation is not transitive. The nearest match to your query is a commutative subgroup of a group of transformations; see group action. Incnis Mrsi (talk) 12:37, 18 July 2013 (UTC)
replies: text:  Actually there is. It's called center of a semigroup.  JMP EAX (talk) 20:23, 23 August 2014 (UTC)

text:  And for a chosen subset (rather than the whole group/semigroup) it's called a centralizer. JMP EAX (talk) 07:13, 24 August 2014 (UTC)

text: Of course the place where you should have learned that is the article on commutativity (in general), but that's the usual polished turd. JMP EAX (talk) 02:07, 26 August 2014 (UTC)
thread_title:  commutativity and function composition 

message: The term "Composite function" would often be interpreted in mathematics as a "Piecewise" function. The closest wikipedia page to the desired result that turns up in a search of the term "Composite function" is "Function composition". Should someone add something like "Not to be confused with piecewise functions (piecewise)"?
Micsthepick (talk) 01:12, 5 June 2016 (UTC)
thread_title:  Should this page be linked to the page: "Piecewise"? 

message: Please read  'New expression of multivariate function composition', Is it easy to be understand? Can you accept it?
For multivariate function composition
:f (x_1, \ldots, x_{i-1}, g(x_1, x_2, \ldots, x_n), x_{i+1}, \ldots, x_n).
We will give it three expressions  like (f.g) for unary function composition. In the expression of (f.g), '.' can be considered as a binary operation taking f and g as its operands or a binary function taking f and g as its variables.
For multivariate function, the first expression is like an operation:
:(fC_{i}g)(x_{1},\cdots,x_{n})=f[x_{1},x_{2},\ldots,x_{i-1},g(x_{1},\ldots,x_{n}),x_{i+1},\cdots,x_{n}].
The second one is like a function:
:[C_{i}(f,g)](x_{1},\ldots,x_{n})=f[x_{1},x_{2},\cdots,x_{i-1},g(x_{1},\ldots,x_{n}),x_{i+1},\cdots,x_{n}].
The third one is like a fraction:
:[C_{i}\frac{f}{g}](x_{1},\ldots,x_{n})=f[x_{1},x_{2},\cdots,x_{i-1},g(x_{1},\ldots,x_{n}),x_{i+1},\cdots,x_{n}].
Why do we use these forms? We can describe any expression in a fire-new way.  For example, x^a+x^b,first we denote it as  f_{a}[f_{p}(x,a),f_{p}(x,b)], in which f_{a}(x_{1},x_{2})=x_{1}+x_{2} and f_{p}(x_{1},x_{2})=x_{1}^{x_{2}}. In addition, we denote subtraction as f_{s},multiplication as f_{m}, division as f_{d}, root as f_{r} and logarithm as f_{l} respectively. We want give an expression like  [W(f_{a},f_{p})(x,a,b)]  in which the left part is called bare function containing only symbolics of function and the right part contains only variables.
 f_{a}[f_{p}(x,a),f_{p}(x,b)] is an expression of a function of three variables. We consider  f_{a} and  f_{p} as especial functions of three variables too and introduce unary operator P^n_{i,j} to express these especial functions of three variables.
[A^3_{1,3}(f_{a})](x_{1},x_{2},x_{3})=x_{1}+x_{3}+O(x_{2})=f_{a}(x_{1},x_{3})+O(x_{2})
Here  x_{1} or  x_{3} is transitional variable and O(x)=0..
[P^3_{1,2}(f_{p})](x,a,b)=x^a+O(b)=f_{p}(x,a)+O(b)
[P^3_{1,3}(f_{p})](x,a,b)=x^b+O(a)=f_{p}(x,b)+O(a)
By these examples we know the meaning of superscript and subscript of  P^n_{i,j} and we call it function promotion.
It is clear that we obtain  f_{a}[f_{p}(x,a),f_{p}(x,b)] by substituting  x_{1} and  x_{3} in  f_{a}(x_{1},x_{3}) by f_{p}(x,a) and f_{p}(x,b) respectively. So  f_{a}[f_{p}(x,a),f_{p}(x,b)] can be written in:
{\{}[P^3_{1,3}(f_{a})]C_1[P^3_{1,2}(f_{p})]{\}}C_{3}[P^3_{1,3}(f_{p})](x,a,b)
or
C_{3}{\{}C_{1}[P^3_{1,3}(f_{a}),P^3_{1,2}(f_{p})],P^3_{1,3}(f_{p}){\}}(x,a,b)
or
C_{3}\frac{C_1[P^3_{1,3}(f_a),P^3_{1,2}(f_p)]}{P^3_{1,3}(f_p)}(x,a,b)
We never mind how complex they are. We consider them as multivariate functions being composition results of two other multivariate functions being composition results and or promotion results. These new expressions are different from x^{a}+x^{b}. Actually we had departed bare function from variables in these new expressions and there is only one "x" in them. This is what we want to do when we solve transcendental equations like x^a+x^b=c.
For an unary function promotion,  P^n_{j}(u)=u(x_{j}). In special,u=x_{j}, P^n_{j}(e)=x_{j} in which 'e' is the identity function.
In C_{i}(f,g) if  g=P^n_{j}(e)=x_{j} and i\neq j,
:C_{i}[f,P^n_{j}(e)](x_{1},\ldots,x_{n})=f[x_{1},x_{2},\cdots,x_{i-1},x_{i+1},\cdots,x_{j-1},x_{j},x_{j+1},\cdots,x_{n}].
Note,there is no  x_{i} in the expression.
C_{i}[f,P^n_{j}(e)] is called oblique projection of f. Actually it is a function of n-1 variables and is dependent on only f and i,j so we denote it as  C_{i,j}(f).
For example,C_{i,j}(f_{p})(x)=f_{p}(x,x)=x^x  — Preceding unsigned comment added by Woodschain175 (talk • contribs) 22:34, 25 June 2017 (UTC)
thread_title:  New expression of multivariate function composition 

message: You're right, my edit was not needed. Background:  lists all irregular parameters. Especially "="-sign and "|"-sign may cause trouble in regular parameter input. e.g. when entering  has both errors.
Now that list has listed these two instances unnecessarily (because, a pipe in a wikilink works fine). When cleaning up that list, I assumed this was a problem. And since the list is recreated every month, I did so twice ;-). THe only advantage of using  would be, that it does not show up on the list again, in January. -DePiep (talk) 10:24, 4 December 2017 (UTC)
replies: text: If it is helpful for your editing, I have no objections against . I just hadn't understood the reason of your edits (twice); now I do. - Jochen Burghardt (talk) 18:54, 4 December 2017 (UTC)
thread_title:  Pipe symbol in {{tl|math}} 

message: I propose to insert at the very beginning the present SVG image and its caption,  with two meanings of “composition”:  the binary operation, also a result of the operation.   Arthur Baelde (talk) 13:55, 1 March 2023 (UTC)
replies: text: I reverted on the grounds of wp:coatrack -- Ancheta Wis    (talk  | contribs) 13:32, 13 May 2023 (UTC)
thread_title:  Leading image