MathJax

See also: Algebra | Index | Calculus

References

Example

When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are \[ x = {-b \pm \sqrt{b^2-4ac} \over 2a}. \]

Modes

In inline mode:\(\sum_{i=0}^n i^2=\frac{(n^2+n)(2n+1)}{6}\) becomes: \(\sum_{i=0}^n i^2=\frac{(n^2+n)(2n+1)}{6}\).
In display mode:\[\sum_{i=0}^n i^2=\frac{(n^2+n)(2n+1)}{6}\] becomes: $$\sum_{i=0}^n i^2=\frac{(n^2+n)(2n+1)}{6}$$

But the display style can be enforced with \displaystyle inside text and with \textstyle inside display mode:
\displaystyle \lim_{t \to 0} \int_t^1 f(t)\, dt versus \textstyle \lim_{t \to 0} \int_t^1 f(t)\, dt Compare \(\displaystyle \lim_{t \to 0} \int_t^1 f(t)\, dt\) versus \(\lim_{t \to 0} \int_t^1 f(t)\, dt\).

Syntax

Greek letters

\alpha \beta \Delta \Omega = \(\alpha \beta \Delta \Omega \).

Parentheses

(1) [2] \{3\} |x| \lvert{x}\rvert \lVert{x}\rVert = \( (1) [2] \{3\} |x| \lvert{x}\rvert \lVert{x}\rVert \).

\left( \right) = \(\left( \frac{x}{y} \right) \) \left[ \right] = \(\left[ \frac{x}{y} \right] \) \left\{ \right\} = \(\left\{ \frac{x}{y} \right\} \) \left| \right| = \(\left| \frac{x}{y} \right| \) \lvert \rvert = \(\lvert \frac{x}{y} \rvert \) \left\vert \right\vert = \(\left\vert \frac{x}{y} \right\vert \) \lVert \rVert = \(\lVert \frac{x}{y} \rVert \) \left\Vert \right\Vert = \(\left\Vert \frac{x}{y} \right\Vert \) \left\langle \right\rangle = \(\left\langle \frac{x}{y} \right\rangle \)

Invisible parentheses with .: \left. \right\} \(\left. \frac{x}{y} \right\} \)

Sums, integrals, etc

\sum_1^ni^2 \(\sum_1^ni^2\) \sum_{i=1}^\infty x^2 \(\sum_{i=1}^\infty x^2\) \iint_{i=1}^\infty x^2 \(\iint_{i=1}^\infty x^2\) \prod_{i=1}^n x^2 \(\prod_{i=1}^n x^2\)

Fractions

\frac ab \(\frac ab\) \frac{a+1}{b+1} \(\frac{a+1}{b+1}\) \sqrt[3] \frac{x^3}{b} \(\sqrt[3] \frac{x^3}{b}\) x^\frac 23 \(x^\frac 23\)

\lim_{x\to 0} \text{ is undefined} \(\lim_{x\to 0} \text{ is undefined}\) \[\lim_{x\to 0} \text{ is undefined}\]

\hat x \widehat {xy} \bar x \overline {xyz} \(\hat x \widehat {xy} \bar x \overline {xyz}\)

\vec x \overrightarrow {xy} \(\vec x \overrightarrow {xy}\) \lvert x \rvert \lVert x \rVert \(\lvert x \rvert \lVert x \rVert\) _5C_3 \(_5C_3\)

Matrices

matrix

\( \begin{matrix} 1 & x \\ 1 & y \end{matrix} \)
\( \begin{matrix} 1 & x \\ 1 & y \end{matrix} \)

pmatrix

\( \begin{pmatrix} 1 & x \\ 1 & y \end{pmatrix} \)
\( \begin{pmatrix} 1 & x \\ 1 & y \end{pmatrix} \)

bmatrix

\( \begin{bmatrix} 1 & x \\ 1 & y \end{bmatrix} \)

Bmatrix

\( \begin{Bmatrix} 1 & x \\ 1 & y \end{Bmatrix} \)

vmatrix

\( \begin{vmatrix} 1 & x \\ 1 & y \end{vmatrix} \)

Vmatrix

\( \begin{Vmatrix} 1 & x \\ 1 & y \end{Vmatrix} \)

Arrays

\left[ \begin{array}{cc|c} 1 & 2 & 3 \\ \hline 1 & x & y \\ \end{array} \right]

\( \left[ \begin{array}{cc|c} 1 & 2 & 3 \\ \hline 1 & x & y \\ \end{array} \right] \)

\bigl(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\bigr)

\( \bigl(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\bigr) \)

\begin{align} a^2-b^2 & = (a+b)(a-b) \\ &= a^2 + ab -ab +b^2 \end{align}

\( \begin{align} a^2-b^2 & = (a+b)(a-b) \\ &= a^2 + ab -ab +b^2 \end{align} \)

f(n) = \begin{cases} n/2, & \text{if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases}

\( f(n) = \begin{cases} n/2, & \text{if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases} \)

\begin{array}{c|lcr} n & \text{Left} & \text{Center} & \text{Right} \\ \hline 1 & 0.24 & 1 & 125 \\ 2 & -1 & 189 & -8 \\ 3 & -20 & 2000 & 1+10i \end{array}

\( \begin{array}{c|lcr} n & \text{Left} & \text{Center} & \text{Right} \\ \hline 1 & 0.24 & 1 & \color{red}{125} \\ 2 & -1 & 189 & -8 \\ 3 & -20 & 2000 & 1+10i \end{array} \)

$$ \bbox[yellow,5px,border:2px solid red] { e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n \qquad (1) } $$

\( \bbox[#ffe,5px,border:2px solid #fee] { e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n \qquad (1) } \)

\( \begin{array}{ |c|c|c| } \hline a & a^2 \pmod{5} & 2a^2 \pmod{5} \\ \hline 0 & 0 & 0 \\ 1 & 1 & 2 \\ 2 & 4 & 3 \\ \hline \end{array} \)

\( \begin{array}{ |c|c|c| } \hline a & a^2 \pmod{5} & 2a^2 \pmod{5} \\ \hline 0 & 0 & 0 \\ 1 & 1 & 2 \\ 2 & 4 & 3 \\ \hline \end{array} \)

\implies \( \implies \) \impliedby \( \impliedby \) \iff \( \iff \) \mapsto \( \mapsto \) \to \( \to \) \gets \( \gets \) \rightarrow \( \rightarrow \) \leftarrow \( \leftarrow \) \Rightarrow \( \Rightarrow \) \Leftarrow \( \Leftarrow \)

\|\mathbf{v}\| \( \|\mathbf{v}\| \)

\int_{a}^{b} \! f(x)\,\mathrm{d}x \( \int_{a}^{b} \! f(x)\,\mathrm{d}x \)

\binom nk \( \binom nk \)