Inline math
Wraps the equation within the text flow. By default, MathJax uses \( ...equation here... \).
Example
The equation is \( E = mc^2 \) is displayed as
The equation is \( E = mc^2 \).
Display math
Centers the equation on a new, standalone line. By default, MathJax uses $$ ... $$ or \[ ... \]
Example
$$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$ is displayed as
$$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
Superscripts & Subscripts
Use ^ for exponents and _ for subscripts.
\(x^2_i\) renders as \( x^2_i \)
Use curly brackets {} for multi-character groups: \(10^{25}\) renders as \(10^{25}\).
Fractions
Use \frac{numerator}{denominator}
\(\frac{1}{x}\) renders as \(\frac{1}{x}\)
Roots
Use \sqrt{} or \sqrt[root]{}
\(\sqrt[3]{x}\) renders as \(\sqrt[3]{x}\)
Greek letters
Type a backslash before the letter name.
\(\alpha\) converts to \(\alpha\)
\(\beta\) converts to \(\beta\)
\(\pi\) converts to \(\pi\)
\(\Sigma\) converts to \(\Sigma\)
Creating Multi-line Equations (Matrices & Alignment)
For complex equations or systems, MathJax supports standard LaTeX environments. You do not need outer $$ delimiters when using \begin and \end block structures.
Equation alignment
Use the align environment to line up equations at the ampersand (&) symbol. Use double backslashes (\\) to break lines.
\begin{align}
y &= (x + 3)^2 \\
y &= x^2 + 6x + 9
\end{align}
\begin{align}
y &= (x + 3)^2 \\
y &= x^2 + 6x + 9
\end{align}
Matrices
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}