Overview
MathJax makes it incredibly easy to typeset mathematics on a web page: Simply include
the following script tags on your page and then enter Tex language markup between
either the \( ... \) delimiters for inline, or the $$ ... $$ delimiters for
block display.
Note: When using Markdown, you must escape the backslashes —
\\(...\\)
CDN Includes Version 3
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
CDN Includes Version 4
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script>
Below are several examples that demonstrate how to markup the most common
types of mathematical expressions.
The most common symbols are defined in the sidebar and there are links to more info in the sidebar as well.
Also note that anyplace where MathJax is used on a web page, you can
right click on the expression to pull up the context menu shown to
the right. This is particularly handy for seeing how a particular expression
is formed.
Expressions
| Expression | Inline: \(...\) | Block: $$...$$ |
|---|---|---|
| ~ tilde | adds whitespace | |
| \\\\ 2 backslashes | new line | |
| x_2 subscript | \(x_2\) | $$x_2$$ |
| x^2 superscript | \(x^2\) | $$x^2$$ |
| {(x_{i+1}+1)}^{2\omega} {} grouping | \({(x_{i+1}+1)}^{2\omega}\) | $${(x_{i+1}+1)}^{2\omega}$$ |
| \{x\in s\mid x\text{ is extra large}\} set definition | \(\{x\in s\mid x\text{ is extra large}\}\) | $$\{x\in s\mid x\text{ is extra large}\}$$ |
| \bigcup union | \(\bigcup\) | $$\bigcup$$ |
| \bigcap intersection | \(\bigcap\) | $$\bigcap$$ |
| \Biggl\{ big left bracket | \(\Biggl\{\) | $$\Biggl\{$$ |
| \Biggl(\biggl(\bigl( x \bigr) big left & right | \(\Biggl(\biggl(\bigl( x \bigr)\) | $$\Biggl(\biggl(\bigl( x \bigr)$$ |
| \Biggl\{\biggl(\bigl[ x \bigr] big left & right | \(\Biggl\{\biggl(\bigl[ (x) \bigr]\) | $$\Biggl\{\biggl(\bigl[ (x) \bigr]$$ |
| \Biggl|( x - 1 )^3 \Biggr|^2 | \(\Biggl|( x - 1 )^3 \Biggr|^2\) | $$\Biggl|( x - 1 )^3 \Biggr|^2$$ |
| \alpha~\beta greeks | \(\alpha~\beta\) | $$\alpha~\beta$$ |
| \gamma~\Gamma greek cases | \(\gamma~\Gamma\) | $$\gamma~\Gamma$$ |
| \omega~\Omega greek cases | \(\omega~\Omega\) | $$\omega~\Omega$$ |
| \pi r^2 | \(\pi r^2\) | $$\pi r^2$$ |
| \frac{numerator}{denominator} fraction | \(\frac{numerator}{denominator}\) | $$\frac{numerator}{denominator}$$ |
| \frac{(n++1)n}{2} | \(\frac{(n++1)n}{2}\) | $$\frac{(n++1)n}{2}$$ |
| \int integral | \(\int\) | $$\int$$ |
| \int_0^\infty integral | \(\int_0^\infty\) | $$\int_0^\infty$$ |
| \sum summation | \(\sum\) | $$\sum$$ |
| \sum_i^n | \(\sum_i^n\) | $$\sum_i^n$$ |
| \sum_{i=0}^{n^3} | \(\sum_{i=0}^{n^3}\) | $$\sum_{i=0}^{n^3}$$ |
| \prod_{i=0}^{n^3} product | \(\prod_{i=0}^{n^3}\) | $$\prod_{i=0}^{n^3}$$ |
| \sqrt {25} = 5 square root | \(\sqrt {25} = 5\) | $$\sqrt {25} = 5$$ |
| \left (\frac{\sqrt x}{y} \right) | \(\left (\frac{\sqrt x}{y} \right)\) | $$\left (\frac{\sqrt x}{y} \right)$$ |
| \sqrt[3]{\frac xy} cube root of fraction | \(\sqrt[3]{\frac xy}\) | $$\sqrt[3]{\frac xy}$$ |
| \\begin{bmatrix}a\\b\end{bmatrix} matrix | \(\begin{bmatrix}a\\b\end{bmatrix}\) | $$\begin{bmatrix}a\\b\end{bmatrix}$$ |
| \lVert v \rVert_2^2 Normed vector space | \(\lVert v \rVert_2^2\) | $$\lVert v \rVert_2^2$$ |