User:Merge/Drafts/Plaintext mathematics

From Wikipedia, the free encyclopedia

Rendering Mathematical Expressions in Plain Text[edit]

Classical mathematical notation makes use of a wide variety of symbols and typographical conventions which often have no clear counterpart in plain text. The communication of mathematical expressions through plaintext media such as email, Usenet and IRC can therefore be a tricky matter prone to ambiguity and confusion. This article presents a list of simple guidelines that greatly ease mathematical communication over plaintext media, and a table of conventions for plain text versions of commonly used mathematical symbols and expressions.

Guidelines for Plain Text Mathematical Communication[edit]

  1. Define your notation. If your communication involves textual notation that is not standard or obvious, state your conventions explicitly beforehand. For example,

    Let n denote set intersection and let z* denote the complex conjugate of z. Then {z : z = z*} n {x + iy : y =/= 0} = {}.

  2. Parenthesise to avoid ambiguity. In particular, be aware of the standard precedence for arithmetical operations: a - b / c ^ d * e means a - (b*e)/(c^d) (but the second version is much clearer). Powers bind most tightly, followed by multiplication and division, followed by addition and subtraction.
  3. Use spacing intelligently. Good spacing often makes the difference between a clear expression and an unintelligible one. Do not insert spaces arbitrarily, as in ( a +b)/ (c^2+d ) or f( x ) = ( x + ( 1/( x+1 ) ) ). Spacing in arithmetical expressions should complement the precedence of operators: a*b + (c-d)/e reinforces the tight binding of * and / and the looser binding of + and -. Extra spacing can also be used in sentences containing both English and mathematical notation to distinguish variables from words and to set off expressions clearly from surrounding text:  Let  a  and  b  be real numbers and let  z = a + ib. Then  T  is injective if  T(z) = 0  only when  a = b = 0. Above all, be consistent in your use of spacing.
  4. Multiplication can be written in several ways, but it's often clearer to leave out an explicit * symbol: ab is almost always better than a*b. If the variables are more than one character long, separate them by a space: a_1 x_1 + a_2 x_2.
  5. Logarithms and trigonometric functions deserve special care because of the number of different notational conventions used to express the same things. See the table below for good conventions.
  6. Use English when in doubt. Simply writing an expression out in English may well be clearer than using a forest of complex or unusual plaintext notation.

The logarithm function is defined by log x = the definite integral from 1 to x of 1/t dt.

Plain Text Conventions for Common Expressions[edit]

Most of the conventions in the table below will be immediately clear to those experienced in plaintext communication of mathematics. For the less common cases, though, it is still a good idea to state the convention first before using it. As a general rule, if the notation either is not obvious (such as |x| or gcd(a,b)) or is not listed below, it should be defined explicitly before being used.

Notation Plain Text
< <= > >=
=/=, !=, <>
x +/- y
for {all, every, each} x there exists a y
P => Q, P <=> Q
~Q => ~P
x^n, x^(2n+1)
x_n, x_(2n+1)
a_n x^n + a_(n-1) x^(n-1) + ... + a_1 x + a_0
e^(i pi) + 1 = 0
sqrt(x)
x^(1/n)
(natural logarithm)
log x, ln x
(logarithm to base b)
log_b x
(exponential function)
exp x, e^x
(trigonometric functions)
sin x, cos x, tan x
(inverse trigonometric functions)

(note: do not use notation for these functions!)
arcsin x, arccos x, arctan x
sin^2 x + cos^2 x = 1 or (sin x)^2 + (cos x)^2 = 1
(Cartesian n-tuple)
(x_1, ..., x_n)
sum(n=1..p, f(n)), sum(n=0..oo, r^n)
sum(t in T, f(t))
prod(n=1..oo, 1/n^p)
lim(x->a, f(x)), lim(n->oo, a_n)
(real intervals)
(a,b) [a,b] [a,b) (a,b]
(suprema and infima)
sup A, inf B
Re(z), Im(z)
(complex conjugate)
z*, conj(z)
f'(x), df(x)/dx
f^(k)(x)
D_x f(x,y,z)
D_xy f(x,y,z) = D_yx f(x,y,z)
D_i F(x_1, ..., x_n)
D_12 F(x_1, ..., x_n) = D_21 F(x_1, ..., x_n)
int(f), int(f(x) dx)
int(a..b, f)
int(a..b, f(x) dx)
int(-oo..oo, e^(-x^2) dx) = sqrt(pi)
int(C, x dx + y dy)
(row and column vectors)
[x_1, ..., x_n], [x_1, ..., x_n]^t
[a, b; c, d]
(matrix transpose)
A^t
(dual space)
V*
(orthogonal complement)
W^(perp)
(annihilator)
W^o
det A, dim V, ker f, range f
(dot product, inner product)
v.w, <v,w>
(wedge product)
v ^ w, wedge(i=1..n, V_i)
(direct sum, tensor product)
V (+) W, V (X) W
dsum(i=1..n, V_i), tprod(i=1..n, W_i)
a|b, a divides b
a = b (mod p)
(set builder notation)
{x + iy : x,y in R}
(empty set)
{}
x (is) in A
(set complement)
A'
A is a subset of B
A contains B
A u B, A n B
union(n=1..oo, A_n), intersect(n=1..oo, B_n)
(Cartesian product of sets)
A x B
(set difference)
A - B, A \ B
(transfinite cardinals)
Aleph_n
f: A -> B
f: x -> x^2
x |-> x^2
f o g
X ~ Y
X ~~ Y
X ~= Y