Wikipedia:Manual of Style (mathematics)

From Wikipedia, the free encyclopedia

✔ This guideline is a part of the English Wikipedia's Manual of Style. Editors should follow it, except where common sense and the occasional exception will improve an article. Before editing this page, please make sure that your revision reflects consensus.
Shortcut:
WP:MSM
Style and formatting
Manual of Style and its subpages
Related policies and guidelines
Other advice, including essays and proposals
Related to specific cultures

This manual contains some suggestions intended to contribute to writing clear, pleasant looking, and interesting Mathematics articles. This guide is meant not as a substitute for but as a complement to the Wikipedia manual of style, which has much useful information for a Wikipedia editor.

Contents

[edit] Suggested structure of a mathematics article

Probably the hardest part of writing a mathematical article (actually, any article) is the difficulty of addressing the level of mathematical knowledge on the part of the reader. For example, when writing about a field, do we assume that the reader already knows group theory? A general approach is to start simple, then move toward more abstract and technical statements as the article proceeds.

[edit] Article introduction

The article should start with an introductory paragraph (or two), which describes the subject in general terms. Name the field(s) of mathematics this concept belongs to and describe the mathematical context in which the term appears. Write the article title in bold. Include the historical motivation, provide some names and dates, etc. Here is an example.

In topology and related branches of mathematics, a continuous function is, loosely speaking, a function from one topological space to another that preserves open sets. Originally, the idea of continuity was a generalization of the informal idea of smoothness, or lack of discontinuity. The first statement of the idea of continuity was by Euler in 1784, relating to plane curves. Other mathematicians, including Bolzano and Cauchy, then refined and extended the idea of continuity. Continuous functions are the raison d'être of topology itself.

It is a good idea to also have an informal introduction to the topic, without rigor, suitable for a high school student or a first-year undergraduate, as appropriate. For example,

In the case of real numbers, a continuous function corresponds to a graph that you can draw without lifting your pen from the paper; that is, without any gaps or jumps.

The informal introduction should clearly state that it is informal, and that it is only stated to introduce the formal and correct approach. If a physical or geometric analogy or diagram will help, use one: many of the readers may be non-mathematical scientists.

It is quite helpful to have a section for motivation or applications, which can illuminate the use of the mathematical idea and its connections to other areas of mathematics.

[edit] Article body

If you want to introduce some notation, it should be in its own section. You should remember that not everyone understands that, for example, x^n or x**n mean xn; so it is good to use standard notation if you can. If you need to use non-standard notations, or if you introduce new notations, define them in your article.

There should be an exact definition, in mathematical terms; often in a Definition(s) section, for example:

Let S and T be topological spaces, and let f be a function from S to T. Then f is called continuous if, for every open set O in T, the preimage f −1(O) is an open set in S.

Using the term formal definition may seem rather empty to a mathematician (a formal definition is a mathematician's definition, as a formal proof is just a proof); but it may help to flag up where the actual definition is to be found, after some sections of motivation. (Cf. rigged Hilbert space.)

Some representative examples would be nice to have, in a separate section, which could serve to both expand on the definition, and also provide some context as to why one might want to use the defined entity. You might also want to list non-examples — things which come close to satisfying the definition but do not — in order to refine the reader's intuition more precisely. It is important to remember when composing examples, however, that the purpose of an encyclopedia is to inform rather than instruct (see WP:NOT#TEXTBOOK). Examples should therefore strive to maintain an encyclopedic tone, and should be informative rather than merely instructional.

A picture is a great way of bringing a point home, and often it could even precede the mathematical discussion of a concept. How to create graphs for Wikipedia articles has some hints on how to create graphs and other pictures, and how to include them in articles.

A person editing a mathematics article should not fall into temptation that "this formula says it all". A non-mathematical reader will skip the formulas in most cases, and often a mathematician reading outside her or his research area will do the same. Careful thought should be given to each formula included, and words should be used instead if possible. In particular, the English words "for all", "exists", and "in" should be preferred to the ∀, ∃, and ∈ symbols. Similarly, highlight definitions with words such as "is defined by" in the text.

If not included in the introductory paragraph, a section about the history of the concept is often useful and can provide additional insight and motivation.

[edit] Concluding matters

Most mathematical ideas are amenable to some form of generalization. If appropriate, such material can be put under a Generalizations section. As an example, multiplication of the rational numbers can be generalized to other fields, etc.

It is good to have a see also section, which connects to related subjects, or to pages which could provide more insight into the contents of the current article.

Lastly, a well-written and complete article should have a references section. This topic will be discussed in detail below.

[edit] Writing style in mathematics

There are several issues of writing style that are particularly relevant in mathematical writing.

  • In the interest of clarity, sentences should not begin with a symbol. Here are some examples of what not to do:
  • Suppose that G is a group. G can be decomposed into cosets, as follows.
  • Let H be the corresponding subgroup of G. H is then finite.
Instead, one could write this:
  • If G is a group, then G may be decomposed into cosets as follows.
  • Let H be the corresponding subgroup of G. Then H must be finite.
  • Mathematics articles are often written in a conversational style, as if a lecture is being presented to the reader, and the article is taking the place of the lecturer's whiteboard. However, an article that "speaks" to the reader runs counter to the ideal encyclopedic tone of most Wikipedia articles. Article authors should avoid referring to "we" or addressing the reader directly. While opinions vary on how far this guideline should be taken in mathematics articles — an encyclopedic tone can make advanced mathematical topics more difficult to learn — authors should try to strike a balance between simply presenting facts and formulas, and relying too much on directing the reader or using such clichés as
    • "Note that…" / "It should be noted that…"
    • "It must be mentioned that…" / "It must be emphasized that…"
    • "Consider that…"
    • "We see that…"
and so on. Such introductory phrases are often unnecessary and can be omitted without affecting semantics. Rather than repeatedly attempting to draw the reader's attention to crucial pieces of information that have been appended almost as an afterthought, try to reorganize and rephrase the material such that crucial information comes first. There also should be no doubt as to the reader's willingness to continue reading and taking note of whatever information is presented; the reader does not need to be implored to take note of each thing being pointed out.
  • Avoid, as far as possible, using phrases such as
    • "It is easily seen that..."
    • "Clearly..."
    • "Obviously..."
The reader might not find what you write obvious. This kind of statement does not add new information and thus detracts from the clarity of the article. Consider, even when some reassurance may be useful, using:
  • "There follows directly..."
  • "By straightforward, if lengthy, algebra..."
or the like.
  • When lecturing using a blackboard, it is common to use abbreviations including wrt (with regard to) and wlog (without loss of generality), and to use quantifier symbols ∀ and ∃ instead of for all and there exists in prose. Some authors, including Paul Halmos, use the abbreviation iff for if and only if in print. On Wikipedia, all such abbreviations should be avoided. In addition to compromising the formal tone expected of an encyclopedia, these abbreviations are a form of jargon that may be unfamiliar to the reader.

[edit] Proofs

This is an encyclopedia, not a collection of mathematical texts; but we often want to include proofs, as a way of really exposing the meaning of some theorem, definition, etc. A downside of including proofs is that they may interrupt the flow of the article, whose goal is usually expository. Use your judgement; as a rule of thumb, include proofs when they expose or illuminate the concept or idea; don't include them when they serve only to establish the correctness of result.

Since many readers will want to skip proofs, it is a good idea to set them apart in some way, for instance by giving them a separate section. Additional discussion and guidelines can be found at Wikipedia:WikiProject Mathematics/Proofs.

[edit] Including literature and references

It is quite important for an article to have a well-chosen list of references and pointers to the literature. Some reasons for this are the following:

  • Wikipedia articles cannot be a substitute for a textbook (that is what Wikibooks is for). Also, often one might want to find out more details (like the proof of a theorem stated in the article).
  • Some notions are defined differently depending on context or author. Articles should contain some references that support the given usage.
  • Important theorems should cite historical papers as an additional information (not necessarily for looking them up).
  • Today many research papers or even books are freely available online and thus virtually just one click away from Wikipedia. Newcomers would greatly profit from having an immediate connection to further discussions of a topic.
  • Providing further reading enables other editors to verify and to extend the given information, as well as to discuss the quality of a particular source.

The Wikipedia:cite sources article has more information on this and also several examples for how the cited literature should look.

[edit] Typesetting of mathematical formulas

[edit] Using LaTeX markup

Wikipedia allows editors to typeset mathematical formulas in (a subset of) LaTeX markup (see also TeX); the formulas are normally translated into PNG images, but may be rendered as HTML or MathML, depending on user preferences. For more details on this, see meta:Help:Formula.

The LaTeX formulas can be displayed in-line (like this: \mathbf{x}\in\mathbb{R}^2), as well as on their own line:

\int_0^\infty e^{-x^2}\!dx

Having LaTeX-based formulas in-line which render as PNG under the default user settings, as above, is generally discouraged, for the following reasons.

  • The font size is larger than that of the surrounding text on some browsers, making text containing in-line formulas hard to read.
  • Misalignment can result. For example, instead of ex, with "e" at the same level as the surrounding text and the x in superscript, one may see the e lowered to put the vertical center of the whole "ex" at the same level as the center of the surrounding text.
  • The download speed of a page is negatively affected if it contains many images.
  • HTML (as described below) is adequate for most simple in-line formulas and better for text-only browsers.

When displaying formulas on their own line, one should indent the line with one or more colons (:); the above was typeset as

:<math>\int_0^\infty e^{-x^2}\,dx</math>

If you find an article which indents lines with spaces in order to achieve some formula layout effect, you should convert the formula to LaTeX markup.

If you plan on editing LaTeX formulas, it is helpful if you leave your preference settings (link in the upper right corner of this page, underneath your user name) in the "rendering math" section at the default "HTML if very simple or else PNG"; that way, you'll see the page like most users will see it.

[edit] Very simple formulas

If you enter a very simple formula using the mathematical notations like <math>L^p</math> this will (in the default used by most users) not be displayed using a PNG image but using HTML, like this: Lp. This is different from typesetting it as ''L''<sup>''p''</sup>. Compare:

LaTeX rendered as HTML: Lp
Regular HTML: Lp

Either form is acceptable, but do not change one form to the other in other people's writing. They are likely to get annoyed since this seems to be a highly emotional issue. Changing to make an entire article consistent is acceptable.

However, still try to avoid in-line PNG images. Even if you use <math>L^p</math> throughout the article, use ''L''<sup>&infin;</sup> to get L rather than using the LaTeX-based <math>L^\infty</math> to get L^\infty, which doesn't always look good.

If you want to force an image output for a simple formula, put, for example, a \, (one quarter space in LaTeX) at the end of the formula.

[edit] Using HTML

The following sections cover the way of presenting simple in-line formulas in HTML, instead of using LaTeX.

[edit] Font formatting

[edit] Variables

To start with, we generally use italic text for variables (but never for numbers or symbols). Most editors prefer to use ''x'' in the edit box to refer to the variable x. Some prefer using the HTML "variable" tag, <var>, since it provides semantic meaning to the text contained within. Which method you choose is entirely up to you, but in order to keep with convention, we recommend the wiki markup method of enclosing the variable name between repeated single quotes. Thus we write:

''x'' = (''y''<sup>2</sup> + 2)

which results in:

x = (y2 + 2)

While italicizing variables, things like parentheses, digits, equal and plus signs should be kept outside of the double-quoted sections. In particular, do not use double quotes as if they are <math> tags; they merely denote italics. Descriptive subscripts should not be in italics, because they are not variables. For example, mfoo is the mass of a foo. SI units are never italicized: x = 5 cm.

[edit] Functions

Names for standard functions, such as sin and cos, are not in italic font, but we use italic names such as f for functions in other cases; for example when we define the function as in f(x) = sin(x) cos(x).

[edit] Sets

Sets are usually written in upper case italics; for example:

A = {x : x > 0}

would be written:

''A'' = {''x'' : ''x'' > 0}

[edit] Greek letters

Greek letters are not commonly italicized, so that one writes, for example, &lambda; + ''y'' = &pi; ''r''<sup>2</sup>, for the expression λ + y = π r2. However, the TeX font for Greek letters is an italic style, and some editors italicize Greek letters when they are variables (in line with the general advice to italicize variables): the example expression would then be typeset as λ + y = π r2 (by writing ''&lambda;'' + ''y'' = &pi; ''r''<sup>2</sup>).

[edit] Common sets of numbers

Commonly used sets of numbers are typeset in boldface, as in the set of real numbers R; see blackboard bold for the types in use. Again, typically we use wiki markup: three single quotes (''') rather than the HTML <b> tag for bolding.

[edit] Superscripts and subscripts

Subscripts and superscripts should be wrapped in <sub> and <sup> tags, respectively, with no other formatting info. Font sizes and such should be entrusted to be handled with stylesheets. For example, to write c3+5, use

''c''<sub>3+5</sub>.

Do not use special characters like ² (&sup2;) for squares. This does not combine well with other powers, as the following comparison shows:

1 + x + x² + x3 + x4 (with &sup2;) versus
1 + x + x2 + x3 + x4 (with <sup>2</sup>).

Moreover, the TeX engine used on Wikipedia may format simple superscripts using <sup>...</sup> depending on user preferences. Thus, instead of the image x^2\,, many users see x2. Formulas formatted without using TeX should use the same syntax to maintain the same appearance.

[edit] Special symbols

There is a table of mathematical symbols and a list of the codes at Wikipedia:Mathematical symbols that may be useful when editing mathematics articles. One should keep in mind though, that not all of the symbols in these lists are displayed correctly on all browsers. It is generally better to be rather conservative with the use of symbols in order to reach a larger audience, for example by writing "x in Y" rather than "xY".

[edit] Less-than sign

Although the MediaWiki markup engine is fairly smart about differentiating between unescaped "<" characters that are used to denote the start of an embedded HTML or HTML-like tag and those that are just being used as literal less-than symbols, it is ideal to use &lt; when writing the less-than sign, just like in HTML and XML. For example, to write x < 3, use

''x'' &lt; 3,

not

''x'' < 3.

[edit] Multiplication sign

Standard algebraic notation is best for formulas, so two variables q and d being multiplied are best written as qd when presented in a formula. That is, when citing a formula, don't use &times;.

However, when explaining, for a general audience (not just mathematicians), the formula or giving examples of its application, it is prudent to use the multiplication sign: "×", coded as &times; in HTML. For example:

  • When dividing 26 by 4, 6 is the quotient and 2 is the remainder, because 26 = 6 × 4 + 2.
  • −42 = 9 × (−5) + 3

Another alternative to the &times; markup is &middot;, which will produce a center dot: " · ".

However, do not use the letter x.

[edit] Punctuation

Just as in mathematics publications, a sentence which ends with a formula must have a period at the end of the formula. If the formula is written in LaTeX, that is, surrounded by the <math> and </math> tags, then the period needs to also be inside the tags, because otherwise it can be displayed on a new line if the formula is at the edge of the browser window.

[edit] Choice of type style

In mathematics notation, functions that have multi-letter names should always be in an upright font. The most well-known functions—trigonometric functions, logarithms, etc.—have no parentheses. For example:

\sin x \,\!   (correct—typeset as <math>\sin x</math>)

but not

sin x \,\!   (incorrect—typeset as <math>sin x</math>).

Some operator (function) names do not have a pre-defined abbreviation; for these we may use \operatorname:

 \operatorname{Tr}(M) \,\!   (typeset as <math>\operatorname{Tr}(M)</math>).

Special care is needed with subscripted labels to distinguish the purpose of the subscript (as this is a common error): variables and constants in subscripts should be italic, while textual labels should be in normal text font (Roman, upright). For example:

 x_{\text{this one}} = y_{\text{that one}} \,\!   (correct—typeset as <math>x_{\text{this one}} = y_{\text{that one}}</math>)
\sum_{i=1}^{n}{ y_i^2 }\!   (correct—typeset as <math>\sum_{i=1}^{n}{ y_i^2 }</math>)

but not

r = xpredictedxobserved   (incorrect—typeset as <math>r = x_{predicted} - x_{observed}</math>).

On the other hand, for the differential, imaginary unit, and Euler's number, Wikipedia articles usually use an italic font, so one writes

\int_{0}^{\pi} \sin x \, dx , \,\!   (typeset as <math>\int_{0}^{\pi} \sin x \, dx</math>—note the thin space (\,) before the dx)
x+iy, \,\!   (typeset as <math>x+iy</math>)
e^{i\theta} . \,\!   (typeset as <math>e^{i\theta}</math>)

Some authors prefer to use an upright (Roman) font for dx, and Roman boldface for i. Both forms are correct; what is most important is to consistency within an article, with deference to previous editors. It is considered inappropriate for an editor to go through articles doing mass changes from one style to another. This is much the same principle as the guidelines in the Manual of style for the colour/color spelling choice, etc.

[edit] See also

[edit] Help for those writing a formula

[edit] General information

[edit] Further reading

A style guide specifically written for mathematics:

More style guidance:

  • Halmos, P.R. (1970), “How to Write Mathematics”, Enseignements Mathématiques 16: 123–152 .

Some finer points of typography are discussed in: