Jump to content

Talk:Function (mathematics)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


Total reset needed for this article[edit]

Outsiders watching the style of this discussion would probably think about a pond of frogs. When one person replies to another, three more jump in between; others exhibit adolescent behavior in explicitly refusing even to hear any technical arguments; still others wield Wikipedia rules instead of logic. All this is only to say that a total reset is urgently needed, and that restraint is needed to avoid derailing the entire project. I will set the example in exercising restraint, and add a brief note only when logic is all too severely violated. Otherwise I just observe the proceedings...

In any case, can we at least agree on the following points?

- The article should primarily serve the readers, not some personal hidden agenda.

- The current state of the art requires (at least) two conceptually different definitions.

- The simplest of these would be the best starting point.

- Any definition should be referenced accurately (immediately verifiable, no misquotes). The reason for insisting on this last point is not some bureaucratic consideration but the hope that in the literature of the past hundred years there is at least one formulation people are prepared to quote literally, even if it does not fit their own dream definition. Functions are not rocket science but high school material. Boute (talk) 05:14, 1 March 2024 (UTC)[reply]

You should try to make the same point without the insulting preface. Comparing people to frogs and calling them children is not an exemplary "exercise in restraint". –jacobolus (t) 15:47, 1 March 2024 (UTC)[reply]
No insult, but a general observation in empathy with potential outsiders, and apparently an effective wake-up call. Restraint here obviously means making only contributions that improve the paper. Look at the pages and pages wasted on an high-school level issue. What would outsiders think? Boute (talk) 19:41, 1 March 2024 (UTC)[reply]
I'm not clear what you're hoping for. I guess you want someone to answer the complaint politely one time and thereafter just let the critic talk to themselves / shout into the void without reply? –jacobolus (t) 20:27, 1 March 2024 (UTC)[reply]
Re "high-school level issue": a big part of the problem here is that this is not (only) a high school level issue. We need to describe functions at a level that can be understood by high school students, which is a high school level issue. But we also need to describe functions with the understanding gained from research into the foundations of mathematics, in set theory (well covered in this discussion), in type theory (not so well covered), and maybe also with some discussion of constructivism (currently not covered at all), at a level far above high school mathematics. The need to treat these things at multiple levels significantly adds to the difficulty of formulating an article that anyone interested in only a single level can be satisfied with. —David Eppstein (talk) 21:35, 1 March 2024 (UTC)[reply]
That's exactly why I suggested several non-equivalent definitions. However, the discussion got stuck at high school level issues. This must be resolved first before moving to the next level. Boute (talk) 12:12, 2 March 2024 (UTC)[reply]
To substantively address your comment though: I think everyone wants the article to serve readers (in particular including high school students and early undergraduates). I agree with you that it would be nice to immediately reference one or several sources about any definition(s) here, though I don't think an exact quotation is necessary to insert inline into the text, and making basic material look like a quotations can even be kind of confusing to readers (exact quotations in footnotes can be helpful though). –jacobolus (t) 16:37, 1 March 2024 (UTC)[reply]
Please don't distort clear messages. Good intentions need constant reminders. Evidently basic material should not look like quotations, but in a Wikipedia article a definition should be traceable literally to some source, because not observing this principle is precisely the cause of the endless repetitive discussions we are witnessing here. Don't believe that the literature of the past hundred years does not contain excellent candidate definitions (examples found by opening the hidden text box at the start of this discussion page). Enough generalities, make a solid proposal and submit it for discussion. Boute (talk) 20:19, 1 March 2024 (UTC)[reply]
Is the hidden "Outline for a new version of the article" supposed to be text to go directly into the article? I personally find it to be incredibly confusing and distracting, and not written in anything like the encyclopedic "house style" I expect for Wikipedia articles. I don't think it's suitable to go into a Wikipedia article as-is, but perhaps contains some useful ideas which could be turned to productive use; the sources themselves seem fine to cite. –jacobolus (t) 20:36, 1 March 2024 (UTC)[reply]
Logical error: it was clearly stated that the outline was meant as a resource to the other editors, and that integration into an article was left to them. Boute (talk) 02:26, 2 March 2024 (UTC)[reply]
Fair enough, and thanks for answering the question. I don't personally see a clear way to do that, and even each portion is rewritten as flowing encyclopedic prose, I find the organization confusing. Maybe someone else has concrete ideas of how to write some section(s) based on that, but I don't think you can reasonably expect someone to appear to do such translation for you. –jacobolus (t) 03:37, 2 March 2024 (UTC)[reply]
Your outline cites Apostol's Calculus. Here is what Apostol says:
The word "function" was introduced into mathematics by Leibniz, who used the term primarily to refer to certain kinds of mathematical formulas. It was later realized that Leibniz's idea of function was much too limited in its scope, and the meaning of the word has since undergone many stages of generalization. Today [1960s], the meaning of function is essentially this: Given two sets, say and a function is a correspondence which associates with each element of one and only one element of The set is called the domain of the function. Those elements of associated with the elements in form a set called the range of the function. (This may be all of but it need not be.)
Letters of the English and Greek alphabets are often used to denote functions. The particular letters and are frequently used for this purpose. If is a given function and is an object of its domain, the notation is used to designate that object in the range which is associated to by the function and it is called the value of at or the image of under The symbol is read as " of ."
The function idea may be illustrated schematically in many ways. For example, in Figure 1.3(a) the collections and are thought of as sets of points and an arrow is used to suggest a "pairing" of a typical point in with the image point in Another scheme is shown in Figure 1.3(b). Here the function is imagined to be like a machine into which objects of the collection are fed and objects of are produced. When an object is fed into the machine, the output is the object .
Although the function idea places no restriction on the nature of the objects in the domain and in the range in elementary calculus we are primarily interested in functions whose domain and range are sets of real numbers. Such functions are called real-valued functions of a real variable, or, more briefly, real functions, and they may be illustrated geometrically by a graph in the -plane. We plot the domain on the -axis, and above each point in wit plot the point where The totality of such points is called the graph of the function.
Leaving aside definitional disagreements about the range of a function, this seems overall like a nice introduction to me, which could quite plausibly be cited here and recommended to readers as a source to read. –jacobolus (t) 20:56, 1 March 2024 (UTC)[reply]
Possibly a good start, but which edition of Apostol's Calculus are you using? The second edition (Wiley, 1967) literally states on page 53:
" A function f is a set of ordered pairs (x, y) no two of which have the same first member. "
and goes on (same page) defining domain and range as, respectively, the set of first and second members.
Did Apostol (in your assumed quotation: edition? page?) really say in one paragraph that the range need not be all of Y and later on call Y the range? Sorry, but as this stands, it cannot be plausibly cited. Boute (talk) 02:53, 2 March 2024 (UTC)[reply]
This is the 2nd edition of Apostol, from a couple pages before the part you are quoting; it's essential context for the "formal" version, considering the intended audience of ~18 year olds. –jacobolus (t) 03:38, 2 March 2024 (UTC)[reply]
An informal paragraph on p. 51 in Apostol's Calculus indeed contains this error (a typo? better not speculate), which makes it unsuitable here. A Wikipedia article should contain no logical errors, a fortiori in an introductory context because setting misconceptions straight afterwards is always more difficult. As for the intended audience of ~18 year olds, I don't know whether this is a Wikipedia rule, but it is a reasonable working hypothesis. We also must assume a minimum of interest in mathematics (otherwise, why read the article?). In Apostol's time (1960s) set theory was unknown in most high schools. Nowadays this has changed, and Apostol's formal definition on p. 53 is perfectly accessible to that audience. After all, the first paragraph you quoted (from p. 50) assumes the reader knows about sets. The formal definition has the extra advantage of also appearing in other textbooks (e.g. Flett), and is less prone to the misconceptions caused by prematurely mentioning the set Y (hence the warning by Flett). So I think your suggestion to follow Apostol's path is worth pursuing. Selectivity is important. Boute (talk) 09:05, 2 March 2024 (UTC)[reply]
In other words, we should skip the gentle explanatory prose and cut straight to something unmotivated and inscrutable, so as to maximize novice readers' confusion? No thanks. –jacobolus (t) 09:40, 2 March 2024 (UTC)[reply]
"In other words"? Logic violation alert! Motivation is essential for any definition (even for an advanced audience, perhaps more). It must be done carefully, based on a lot of experience with and thought about how various different people think about mathematics. Boute (talk) 11:43, 2 March 2024 (UTC)[reply]
Sorry, that comment of mine was more dismissive than necessary, but let me try to be precise: I don't think we can transplant Apostol's discussion directly, but for his context of a calculus book I like the way he leads off with (1) a very brief history of the word (2) a mention that a function can be thought of as a formula, a machine, or a pairing, (3) some discussion of notation setting up common letters used later in the book, (4) a comment that functions might involve any objects but in calculus are usually real numbers, (5) [not quoted above] a couple of pages of concrete examples before trying to make the "formal" definition. These features let a reader who is not too familiar with functions ease into the idea.
It seems to me that you want to skip Apostol's 3 pages of leading context and jump straight to the "formal definition" part. That seems like a big mistake to me. –jacobolus (t) 16:14, 2 March 2024 (UTC)[reply]
This looks like a good plan, which most people will endorse. Apt considerations on the importance of justifying definitions can be found in Rogaway's paper [1]. I'm sorry for not being able to contribute anything to this article for several months (as explained after Lazard's post below). The resources and references under the "green slab" at the start of this talk page may suffice for now, but if any additional resources seem useful I can be reached by email. Boute (talk) 17:24, 2 March 2024 (UTC)[reply]
Chiming in as an outsider - this article is incredibly hard to read, and really serves no one but the maths elites.
I think the first thing that should be addressed is explaining "functions" in simple terms, without assuming people know what "of a set x to a set y" even means. This reads like mathematicians trying to one-up each other, not like an encyclopedia that is useful for anyone.
Here's my basic attempt, as a math-hating programmer : "A function is an equation that transforms a value (x) into another value (y), or describes X's relation to Y. A function of x {f(x)} is an equation including X, which can be assigned a value and solved. The solution to that equation, for a given x value, is often considered Y."
It may lack nuance that people with mathematics degrees want, but should the intro really be written to appease them? They already know what functions are. 47.55.178.193 (talk) 23:51, 22 March 2024 (UTC)[reply]
If it were true "serves no one but the maths elites". It definitely does not. Believe me. It is an embarrassment of an article. The article has a really really hard time defining precisely "of a set x to a set y". In my opinion, one reason why it is hard to read, is because it does not define this as explicitly as possible. Instead, the article makes one, two, three failed attempts at definition, that are not definitions, before it finally reaches a definition that is okay. No wonder it is hard to read. Nothing more confusing than an explanation that meanders on and on and on before getting to the point and missing it. Thatwhichislearnt (talk) 11:31, 23 March 2024 (UTC)[reply]

Keep up the good work, Jacobolus. I have nothing to add today, but two things have become clear. 1) Your views are the standard, referenced views. And 2) The people pushing their own views will argue 'til the cows come home. Rick Norwood (talk) 10:59, 2 March 2024 (UTC)[reply]

Fully agree, that's why I always insist on definitions that are literally traceable to reliable sources. Boute (talk) 11:46, 2 March 2024 (UTC)[reply]

I agree also with Jacobulus. As Wikipedia is not a text book, we must follow the dominant practice in mathematics and not the pedagogical simplifications that appear in some textbooks. Moreover, the ambiguity of the term "range of a function" motivated its replacement with "image of a function" and "codomain". We must not go back to the old ambiguity, which is induced when the codomain is not included in the definition of a function, at least because this would imply the rewrite of many Wikipedia articles. However, there are two cases where one considers functions whose domain (and codomain) are not well defined. The presentation of these two cases requires to be improved.

  • A subsection "Partial functions" of § Definition must be added, which should be a short summary of Partial function, and must say that in some contexts, typically calculus, "function" is commonly used for "partial function". Otherwise, reader may believe that the multiplicative inverse of the real funtion would not be a function.
  • A section must be added on the definitions of a function that are not based on set theory. These definitions are mainly used in computability theory and in constructive mathematics, and do not include the domain and the codomain because the concept of a set is lacking. Examples of such definitions are lambda calculus and general recursive functions. Personally, I do not know how functions are defined in constructive mathematics. The addition of such a section would imply to rewrite several sections of the article.

D.Lazard (talk) 12:22, 2 March 2024 (UTC)[reply]

In Bishop's masterpiece Constructive Analysis, a function from A to B is defined as a rule assigning to each a in A a unique f(a) in B, with the extra (constructivist) condition that "the rule must afford an explicit, finite, mechanical reduction from the procedure for constructing f(a) to the procedure for constructing a." The quoted part might be streamlined with the terminology from algorithmics. Boute (talk) 12:44, 2 March 2024 (UTC)[reply]
Since another deadline is coming up and I already exceeded the time I allotted myself for Wikipedia, Il sign off now, and will not be giving "replies" or input for several months. At this time I have nothing significant to add to the collection of resources and references I compiled a year ago at the start of this talk page. I wish everyone good progress in editing this article. Boute (talk) 17:02, 2 March 2024 (UTC)[reply]

Formal definition - the structure of a triple[edit]

Based on the statement by @Jacobolus I would skip the business about ordered triples of sets, which is a bit of set-theory bookkeeping not necessary for describing the concept from the thread "Formal definition - why not use the literature", I would like to address the aspect of defining a function consisting of domain X, codomain Y, and graph G - in literature, one can encounter two main approaches:

  • the classic Bourbaki: a function is an ordered triple f=(X,Y,G)
  • modified: function f is "something" containing X, Y, and G

At point 2, I wrote "modified" because it seems that before Bourbaki, the literature did not consider functions as three elements X, Y, G, and it was he who introduced the use of this. Later, some other authors allowed themselves to bypass the structure of the ordered triple - nevertheless, I have not encountered a justification anywhere (but this may be because I have not come across the right sources - so if someone has an article/book from before Bourbaki where X, Y, G are used, please quote it).

An ordered triple defined as an e.g. appropriate Kuratowski pair, for example, f=(X,Y,G)= ((X,Y),G)= {...} allows us to treat the function as a set - here are the advantages of such a construction:

  • the function becomes an ordinary set, a well-known primitive concept (we do not multiply entities without necessity - Occam's Razor)
  • the definition of the function becomes precise and unambiguous
  • completeness - the triple is a sufficient structure to capture the concept of function - no need for more complex structures
  • the set f can be directly applied with the well-known and developed apparatus/formalism known from set theory
  • ease of working with functions at the definition level (we can use well-known operations on sets)


I would like to emphasize that the introduction of the triple structure by Bourbaki is not merely "bookkeeping" within set theory, but is a well-thought-out structure. A similar approach is applied in the formal definitions of other important mathematical concepts such as:: group, topological space, graph, etc.

However, with authors who did not use the triple structure, but define the function as "something" a separate entity, having domain, codomain, and graph, I have not found an explanation.

So, I pose this question: What advantages does the introduction of functions as entities, distinct from sets, bring? What does it contribute?

PS1: If it turns out that it does not contribute much, I would suggest using the structure of the triple in the article first (i.e., using the Bourbaki definition) and only secondly adding information that some authors use a definition in which the function is not a set but a separate entity containing X,Y,G (with citations). In this way, we communicate to the reader that there are different definitions based on the three elements: X,Y,G.

PS2: I assume that in the "Formal definition" section we will use Zermelo–Fraenkel set theory because it is the most popular, so the above considerations are only within this system. Though of course in another section of the article one can go beyond that. Kamil Kielczewski (talk) 06:52, 20 March 2024 (UTC)[reply]

The short answer to your question is WP:TECHNICAL. The long answer, is you have been going on and on and on about this and we have answered it over and over and over and it is time to WP:DROPTHESTICK. —David Eppstein (talk) 17:03, 23 March 2024 (UTC)[reply]
Good luck with that. Work badly done will keep bringing people complaining about it. As early as 2012 one can find people complaining about the same problem. The reason is as simple: A student finds a book where functions have codomains, and a book where they don't. Comes to Wikipedia to check which is which, and finds an article written so badly that does not clarify that both are used in the literature and it doesn't clearly state either one of the definitions.
And your "short answer" is disingenuous. Just a moment ago you were saying that claiming that "a set theory definition doesn't convey the dynamical nature of functions" is a phrase that belongs in this article. This claim is demonstrably false, when taken within the context and needs of this article, and extremely technical to properly justify. So much that even those who brough up the quote didn't have the tiniest idea what the quote was really talking about. Thatwhichislearnt (talk) 14:50, 24 March 2024 (UTC)[reply]
@David Eppstein I do not see an answer to the question asked either in the WP:TECHNICAL or in the comments. If you want to prove otherwise, please indicate the relevant quote and explain.
As for the definition of the tripe f=(X,Y,G), it is commonly used in literature (what has been noticed e.g. here p. 1158), so omitting it in the article would be a serious mistake. Doubts about this seem to have been mostly dispelled in the previous thread. In this thread, I just wanted to more broadly explain certain misunderstandings that arose in the course of that discussion. Kamil Kielczewski (talk) 06:52, 20 March 2024 (UTC)[reply]

Function evaluation[edit]

A mini edit war has started about the paragraph on function evaluation. This paragraph was confusely written, and I rewrote it boldy for clarifiation. Nevertheless, some problems remain, for which I am not sure of the best solution.

  • Although very sketchy, this paragraph is too long for the lead. I am not sure of the part of it that belong to the lead and of the best place for details.
  • Function evaluation redirects here. This deserves more than two lines in the lead. Maybe a specific article?
  • Very often, "function evaluation" refers more properly to "expression evaluation". The confusion between these two concepts is the cause of many errors by beginners in the use of computer algebra systems. Expression evaluation is a redirect to Expression (mathematics)#evaluation that I created recently. Nevertheless, the treatment of evaluation (mathematics) remains insufficient and confusing in Wikipedia.
  • Although very common, the vertical-bar notation for evaluation is not clearly defined in Wikipedia. I added recently a description of it at Expression evaluation, but this is still insufficient. This vertical bar notation, is a particular case of a restriction, if one consider as an abbreviation of Maybe, a description of the vertical-bar notation for evaluation could be added at Restriction.

In summary, fixing this paragraph of the lead requires more work and more discussion, for which the tag {{cn}} is of no help. D.Lazard (talk) 17:39, 24 March 2024 (UTC)[reply]

The lead section of this article seems like an inappropriate place for the only discussion of this "vertical bar notation" which is not used anywhere else in the article. It's confusing, distracting, and only tangentially relevant. It should be put somewhere else in the article or in another article. Readers aren't going to look for it here, and readers who come across it here aren't going to find it valuable in context. –jacobolus (t) 17:43, 24 March 2024 (UTC)[reply]
One problem with this vertical bar notation is that it's hard to find clear sources describing its history/use. My guess is that it evolved out of the related notation for the bounds of a definite integral, as found in introductory calculus books/courses. There's a discussion of the earliest use (under "bar notation") in https://jeff560.tripod.com/calculus.htmljacobolus (t) 18:20, 24 March 2024 (UTC)[reply]
The use of "often" and "commonly" are unsourced and unnecessary. The second sentence has not one, but two parenthetical clauses. Yikes! The third sentence, unnecessarily restricts itself to talk about function evaluation to the case when the expression "depends on x". This, "depends on x", is ambiguous as an intuitive notion and it hasn't been defined in the article as a formal concept. Thatwhichislearnt (talk) 13:35, 25 March 2024 (UTC)[reply]
I agree that {{cn}} is not sufficient to elaborate on the vertical bar and evaluation, however, I consider(ed) is necessary - I apologize for my part of the "mini edit war" (I didn't intend to fight). I also agree that the vertical bar needn't be adressed in the lead, or even shouldn't be adressed there. However, it should be explained somewhere (not sure whether inside this article). And I, too, have seen the notation only in computations of definite integral [and in the recent versions of this article's lead].
Defining the vertical bar based on restriction appears to be one possibility, which also nicely motivates the notation. Another possibility would be to define it based on substitution (logic), i.e. means the substitution application , or the evaluation of it. I'm not sure about an explanation of "expression evaluation". Maybe it should be based on (item "Functions" at) First-order_logic#Evaluation_of_truth_values, which defines evaluation of an expression in terms of evaluation of its constituent functions. (First-order logic doesn't care about how to obtain a function's result value for given inputs. If a function is defined by an expression in turn, its constituent functions (usually ) need to be evaluated, which leads to the standard arithmetical algorithms. However, a function may well be non-computable, and it may be impossible to obtain its result value. — In computer science, term rewriting systems are capable of defining every computable function. A subclass of them, the canonical term rewrite systems, guarantee that every function defined by them can be evaluated in finitely many steps to a unique normal form, i.e. a term that can't be rewritten any further; such terms are considered "values" in this setting. Arithmetical algorithms, for example, can be written as term rewriting systems that are canonical when applied to variable-free inputs, cf. "ground confluent".) - Jochen Burghardt (talk) 20:33, 25 March 2024 (UTC)[reply]

The redirect Overriding (mathematics) has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2024 April 26 § Overriding (mathematics) until a consensus is reached. Tea2min (talk) 11:59, 26 April 2024 (UTC)[reply]

Function is Overloaded in definition and meaning, this article should be a survey[edit]

The function as relation or mapping in the single and multiple-valued and in classical functions, continuous functions, smooth functions, and about the language of functions, and domains and ranges and images and codomains, is very overloaded. This article is picking a course of opinion which does not represent its wide and varied usage, function the term. Over time, as other aspects of mathematics solidified, it's "function" the term that is most loosely thrown about, then as with regards to relations that are admitted to various sub-fields, each claiming their own definition of function has those are each distinct and different ant not compatible. This article, which could be called "mappings" instead as that's largely what it defines, does not from the outset affect to describe the development of the definition over time, nor does it very well reflect the most usual sort of arithmetic definition with which most people are familiar, or as with regards to domain and range. Mathematics is not merely differential geometry, and the definition of function is among the very most general and general throughout. So, this article should largely start explaining that "function theory" is its own sort of world, and a history and survey of "this is what is called a function historically or in these various settings", then with regards to an opinion of "this is a function today and in the most usual setting", which it is largely arguable that this article does not reflect, instead expect.

It reminds one of "graph", "chart", and "plot", about diagrams of functions, drawing a function.

Functions are modern, and Cartesian thus including the multi-valued, and not just classical functions, smooth classical continuous functions that are single-valued, and not just differential geometry's functions with neither vertical nor horizontal tangent, "functions" in mathematics are very general, and sub-fields that restrict the definition for their own purpose are presumptious that their definition is implicit, where it is not.


This article is opinionated and needs context in itself why the definition of function is so broad that it's about its own sub-field of mathematics, in matters of relation.

This article needs a brief survey of the development of the term over time, and to point to the many different intended interpretations of the term.

This article needs a thorough introduction detailing the survey of the meaning of the term "function" over time as mathematics has grown, and, specifically not removing what has become its fuller definition, in the interest of su-fields that would restrict its meaning for their own purposes in notation, where instead they should declare their own regions of syntax, because general usage does not agree.

This article has problems and hides them. 97.113.179.80 (talk) 15:03, 19 May 2024 (UTC)[reply]

Are you volunteering to track down a pile of sources and write that draft? –jacobolus (t) 21:01, 19 May 2024 (UTC)[reply]
Keeping in mind the goal of simultaneously being readable to middle-schoolers and providing pointers to current research-level mathematics... —David Eppstein (talk) 21:03, 19 May 2024 (UTC)[reply]

Why Set Theory?[edit]

As noted somewhere above, the intent was to introduce something that is usable in schools mathematics courses. Ok, nice. But why not mention it explicitly? Why not say right away (I guess it was before) that this definition is specific for set theories.

Or we could add a section dedicated to the history of the term an the notion. Leibnitz, Newton, Cauchy had no clue about functions being their graphs ("pairs of values").

To me, it's a shame to promote just one specific view of things, the school-level mathematics. It's so XX century, the century were everything was "defined" as sets. These days mathematicians must be familiar with model theory, and see clearly that functions as "sets of pairs of sets" is just a model (in sets).

Vlad Patryshev (talk) 00:38, 17 June 2024 (UTC)[reply]