Sometimes, your post will need some maths equations. This site has been set up with MathJax to let you use LaTex notation to generate arbitrary mathematical expressions.
MathJax lets you add maths formulae to your posts using the well established
Inline use
Equations can be placed inline with text for better flow like this:
More complex equations like this one,
All LaTex equations need to be enclosed within delimiters. Unfortunately the standards for these delimiters are not so well defined. In this implementation, inline equations must be placed between \(
and \)
delimiters like this:
Markdown | Render |
---|---|
...calculated as \( v=r\omega \) will be ... | …calculated as |
Separate Lines
It is often more convenient to have equations, or a series of equations, displayed in their own space on the page. You can do that with an inline style but in its own paragraph. By default, equations are use the display method and are centered on the page:
The delimiter for block equations is different – the equation should be placed between a pair of $$
delimiters. Thus this markdown
$$q=\frac{1+y}{1+2z^2}$$
produces:
because the block display mode puts the rendered equation in an image div centered on the layout, it is more tricky to put block equations into tables
Examples
You can get the Latex markup for any equation if you right-click and then select Show Math as TeX commands.
Markdown | Render |
---|---|
$$\int_0^\infty e^{-x^2} dx=\frac{\sqrt{\pi}}{2}$$ | |
$$\sum_{n=1}^{\infty} 2^{-n} = 1$$ | |
$$x=\frac{1+\kappa}{1+2\zeta^2}$$ | |
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$ | |
Matrix$$<br>\begin{matrix}<br>1 & x & x^2 \\<br>1 & y & y^2 \\<br>1 & z & z^2 \\<br>\end{matrix}<br>$$ | |
Matrix with brackets$$<br>\left[<br>\begin{matrix}<br>1 & x & x^2 \\<br>1 & y & y^2 \\<br>1 & z & z^2 \\<br>\end{matrix}<br>\right]<br>$$ | |
Conditional Equations$$<br>|x| = \left\{ \begin{array}{rl}<br>-x &\mbox{ if $x<0$} \\<br>x &\mbox{ otherwise}<br>\end{array} \right.<br>$$ | |
Another way to do conditional equations:$$<br>f(n) =<br>\begin{cases}<br>n/2, & \text{if $n$ is even} \\<br>3n+1, & \text{if $n$ is odd}<br>\end{cases}<br>$$ | |
Aligned Equations:$$<br>\begin{align}<br>\sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\<br>& = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\<br>& = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\<br>& = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\<br>& \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right)<br>\end{align}<br>$$ | |
Systems of Equations:$$<br>\left\{<br>\begin{aligned}<br>a_1x+b_1y+c_1z &=d_1+e_1 \\<br>a_2x+b_2y&=d_2 \\<br>a_3x+b_3y+c_3z &=d_3<br>\end{aligned}<br>\right.<br>$$ | |
Equations can be tagged (numbered). To refer to the equation later, use a label.
In equation
Equations can also be given some explanatory text:
More Inspiration
These sites will give you some examples. The opening and closing tags may differ slightly from those supported on these pages. Remember that MathJax only renders stuff from the math sections.
- Mathjax tutorial and quick reference
- Latex Mathematical Expressions
- LaTeX quick reference (PDF)
- LaTeX Cookbook
Further Information
MathJax is enable on this site using the Simple MathJax plugin for WordPress
The MathJax documentation should tell you pretty well everything you need to know: