MediaWiki User Guide/Mathematics

From Wikibooks, open books for an open world
< MediaWiki User Guide
Jump to: navigation, search

You can enter mathematical formulas into a wiki, using a math tag, such as:

<math>\sqrt{2}</math>

The formulas are marked up in the TeX markup, the markup of a complex typesetting system specialized on mathematics.

Before you start writing formulas in this markup, you can consider writing the simpler ones in HTML and wiki markup, such as:

f(x) = b + c / d

which is marked up as

 ''f''(x) = ''b'' + ''c'' / ''d''

Examples[edit]

To get started, follow the examples below.

Examples of mathematical markup
No. Desired Effect Markup
1. \alpha\,\! <math>\alpha\,\!</math>
2. \sqrt{2} <math>\sqrt{2}</math>
3. \sqrt{1-e^2} <math>\sqrt{1-e^2}</math>
4. \frac{2}{4}=0.5 <math>\frac{2}{4}=0.5</math>
5. \sum_{k=1}^N k^2 <math>\sum_{k=1}^N k^2</math>
6. \int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx <math>\int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx</math>
7. \begin{bmatrix}
  0      & \cdots & 0      \\
  \vdots & \ddots & \vdots \\ 
  0      & \cdots & 0
\end{bmatrix}
<math>\begin{bmatrix}
  0      & \cdots & 0      \\
  \vdots & \ddots & \vdots \\ 
  0      & \cdots & 0
\end{bmatrix}</math>
8. \begin{pmatrix}
  x & y \\
  z & v 
\end{pmatrix}
<math>\begin{pmatrix}
  x & y \\
  z & v 
\end{pmatrix}</math>

Greek and symbols[edit]

There is a way of marking up Greek characters and special symbols, as the following table shows.

Markup of Greek alphabet and some symbols
Desired Effect Markup

α β γ δ ε ζ
η θ ι κ λ μ ν
ξ ο π ρ σ ς
τ υ φ χ ψ ω
Γ Δ Θ Λ Ξ Π
Σ Φ Ψ Ω

&alpha; &beta; &gamma; &delta; &epsilon; &zeta;
&eta; &theta; &iota; &kappa; &lambda; &mu; &nu;
&xi; &omicron; &pi; &rho;  &sigma; &sigmaf;
&tau; &upsilon; &phi; &chi; &psi; &omega;
&Gamma; &Delta; &Theta; &Lambda; &Xi; &Pi;
&Sigma; &Phi; &Psi; &Omega;
∫ ∑ ∏ √ − ± ∞
≈ ∝ = ≡ ≠ ≤ ≥
× · ÷ ∂ ′ ″
∇ ‰ ° ∴ Ø ø
∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇
¬ ∧ ∨ ∃ ∀
⇒ ⇔ → ↔ ↑
ℵ - – —
&int; &sum; &prod; &radic; &minus; &plusmn; &infin;
&asymp; &prop; {{=}} &equiv; &ne; &le; &ge; 
&times; &middot; &divide; &part; &prime; &Prime;
&nabla; &permil; &deg; &there4; &oslash; &oslash;
&isin; &notin; 
&cap; &cup; &sub; &sup; &sube; &supe;
&not; &and; &or; &exist; &forall; 
&rArr; &hArr; &rarr; &harr; &uarr; 
&alefsym; - &ndash; &mdash; 

Bibliography[edit]