Wikipedia:Editing Math
Editing Math Expressions in Wikipedia
This page is about editing mathematical expressions in wikipedia. Wikipedia uses a subset of TeX for describing mathematical equations.
All math expressions are written between the <math> and </math> tags.
SuperScripts and SubScripts
The following is a series of examples to edit math equations in wikipedia. The code in second line gives the output shown above.
<math> x^2 + y^2 = z^2 </math>
<math> x_1 + x_2 = 2 </math>
<math>sin^2(\theta)+cos^2(\theta)=1 </math>
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/en.wikipedia.org/v1/":): {\displaystyle sec^2(\theta)-tan^2(\theta)=1}
<math> sec^2(\theta)-tan^2(\theta)=1 </math>
<math> cosec^2(\theta)-cotan^2(\theta)=1 </math>
This series of equations shown above illustrate the operations of exponentiation operator to be '^', and subscript operator to be '_'
Fractions
For fractions use the \frac{numerator}{denominator} commands. eg:
then
<math>\frac{a}{b}=\frac{c}{d} then \frac{a+b}{a-b}=\frac{c+d}{c-d}</math>
Square Root
Use the \sqrt{expression} syntax for square roots.
<math>\sqrt{\frac{c+d}{c-d}}</math>
Summation
We may use discrete summation of series by using this syntax
<math>\sum_{k=0}^{N}2^k=\frac{2^{N+1}-1}{2-1}</math>
Mathematical Symbols
Symbol Code | Symbol |
---|---|
<math> \forall </math> | |
<math> \hbar </math> | |
<math> \emptyset </math> | |
<math> \exists </math> | |
<math> \imath </math> | |
<math> \nabla </math> | |
<math> \neg </math> | |
<math> \flat </math> | |
<math> \ell </math> | |
<math> \top </math> | |
<math> \natural </math> | |
<math> \wp </math> | |
<math> \bot </math> | |
<math> \sharp </math> | |
<math> \Re </math> | |
<math> \| </math> | |
<math> \clubsuit </math> | |
<math> \Im </math> | |
<math> \angle </math> | |
<math> \diamondsuit </math> | |
<math> \partial </math> | |
<math> \triangle </math> | |
<math> \heartsuit </math> | |
<math> \infty </math> | |
<math> \backslash </math> |
Mathematical Functions
Function Symbol | Function |
---|---|
<math> \arccos </math> | |
<math> \cos </math> | |
<math> \csc </math> | Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/en.wikipedia.org/v1/":): {\displaystyle \csc } |
<math> \exp </math> | |
<math> \ker </math> | |
<math> \limsup </math> | |
<math> \min </math> | |
<math> \sinh </math> | |
<math> \arcsin </math> | |
<math> \cosh </math> | |
<math> \deg </math> | |
<math> \gcd </math> | |
<math> \lg </math> | |
<math> \ln </math> | |
<math> \Pr </math> | |
<math> \sup </math> | |
<math> \arctan </math> | |
<math> \cot </math> | |
<math> \det </math> | |
<math> \hom </math> | |
<math> \lim </math> | |
<math> \log </math> | |
<math> \sec </math> | |
<math> \tan </math> | |
<math> \arg </math> | |
<math> \coth </math> | |
<math> \dim </math> | |
<math> \inf </math> | |
<math> \liminf </math> | |
<math> \max </math> | |
<math> \sin </math> |