Wikipedia:Manual of Style (mathematics)

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.

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.

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.

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 = x**n = 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 &mdash; things which come close to satisfying the definition but do not &mdash; in order to refine the reader's intuition more precisely.

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.

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.

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 &mdash; an encyclopedic tone can make advanced mathematical topics more difficult to learn &mdash; 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 &forall; and &exist; 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.

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 WikiProject Mathematics/Proofs.

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 cite sources article has more information on this and also several examples for how the cited literature should look.

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

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.

Very simple formulas
If you enter a very simple formula using the mathematical notations like $$L^p$$ 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. Compare:

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.
 * align="right"| LaTeX rendered as HTML:
 * Lp
 * align="right"| Regular HTML:
 * Lp
 * }
 * Lp
 * }

However, still try to avoid in-line PNG images. Even if you use  throughout the article, use   to get L∞ rather than using the LaTeX-based   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.

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

Variables
To start with, we generally use italic text for variables (but never for numbers or symbols). Most editors prefer to use  in the edit box to refer to the variable x. Some prefer using the HTML "variable" tag,, 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:



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  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.

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).

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


 * A = {x : x > 0}

would be written:



Greek letters
Greek letters are not commonly italicized, so that one writes, for example,, 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 ).

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   tag for bolding.

Superscripts and subscripts
Subscripts and superscripts should be wrapped in  and   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



Special symbols
There is a table of mathematical symbols and a list of the codes at 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 "x ∈ Y".

Less-than sign
Although the MediaWiki markup engine is fairly smart about differentiating between unescaped "&lt;" 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  when writing the less-than sign, just like in HTML and XML. For example, to write x &lt; 3, use



not

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.

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: "&times;", coded as  in HTML. For example:


 * When dividing 26 by 4, 6 is the quotient and 2 is the remainder, because 26 = 6 &times; 4 + 2.
 * &minus;42 = 9 &times; (&minus;5) + 3

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

However, do not use the letter x.

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  and   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.

Choice of type style
In mathematics notation, the names of trigonometric functions, logarithms, etc., should always be in an upright font, for example,
 * $$\sin x \,\!$$ &emsp; (typeset as &lt;math&gt;\sin x&lt;/math&gt;)

rather than
 * $$sin x \,\!$$ &emsp; (typeset as &lt;math&gt;sin x&lt;/math&gt;).

Some operator names do not have a pre-defined abbreviation; for these we may use \operatorname:
 * $$ \operatorname{Tr}(M) \,\!$$ &emsp; (typeset as &lt;math&gt;\operatorname{Tr}(M)&lt;/math&gt;).

Similar consideration applies to text used as subscripted labels, such as
 * $$ x_{\text{this one}} = y_{\text{that one}} \,\!$$ &emsp; (typeset as &lt;math&gt;x_{\text{this one}} = y_{\text{that one}}&lt;/math&gt;).

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, \,\!$$ &emsp; (typeset as &lt;math&gt;\int_{0}^{\pi} \sin x \, dx&lt;/math&gt;)
 * $$x+iy, \,\!$$ &emsp; (typeset as &lt;math&gt;x+iy&lt;/math&gt;)
 * $$e^{i\theta} . \,\!$$ &emsp; (typeset as &lt;math&gt;e^{i\theta}&lt;/math&gt;)

(Also, note the thin space before the dx.) Some authors prefer to use an upright (Roman) font for dx, and Roman boldface for i. What is important is to be consistent within an article, with deference to previous editors. (This is much the same as the colour/color spelling choice.) Also, it is considered inappropriate for an editor to go through articles doing mass changes from one style to another.