check TeX source
Right-click on one of the math tables below and choose Show Math As TeX Commands. This will show Mathjax source.

inline mode vs display mode

For inline formulas, enclose the formula in single dollar
These render differently. For example,  $e=mc^2$,, $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$  and $\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t$  is inline mode.
This is display mode $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$ 

$$\int_\Omega \nabla u \cdot \nabla v~dx = \int_\Omega fv~dx$$

Also check out this [LaTeX introduction](https://en.wikibooks.org/wiki/LaTeX/Mathematics).

Arrays and Matix

$$
\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}
$$

$$
\left[
\begin{array}{cc|c}
1&2&3\\
4&5&6
\end{array}
\right]
$$

$$
\begin{matrix}
1 & x & x^2 \\
1 & y & y^2 \\
1 & z & z^2 \\
\end{matrix}
$$

$$
\begin{pmatrix}
1 & a_1 & a_1^2 & \cdots & a_1^n \\
1 & a_2 & a_2^2 & \cdots & a_2^n \\
\vdots & \vdots& \vdots & \ddots & \vdots \\
1 & a_m & a_m^2 & \cdots & a_m^n
\end{pmatrix}
$$

$$
\left[\begin{array}{rrrr|r}
1 & 1 & 1 & 1 &1 \\
0 & 1 & 2 & 3 & 5 \\
0 & -2 & 0 & -2 & 2 \\
0 & 1 & -2 & 3 & 1 \\
\end{array}\right]
\rightarrow
\left[\begin{array}{rrrr|r}
1 & 0& -1 & -2 &-4 \\
0 & 1 & 2 & 3 & 5 \\
0 & 0 & 4 & 4 & 12 \\
0 & 0 & -4 & 0 & -4 \\
\end{array}\right]
\rightarrow[\frac{-1}{4}R_4]{\frac{1}{4}R_3}
\left[\begin{array}{rrrr|r}
1 & 0& -1 & -2 &-4 \\
0 & 1 & 2 & 3 & 5 \\
0 & 0 & 1 & 1 & 3 \\
0 & 0 & 1 & 0& 1 \\
\end{array}\right]
$$

Big braces
$$
f\left(
\left[
\frac{
1+\left\{x,y\right\}
}{
\left(
\frac{x}{y}+\frac{y}{x}
\right)
\left(u+1\right)
}+a
\right]^{3/2}
\right)
$$

If manual size adjustments are required: $\Biggl(\biggl(\Bigl(\bigl((x)\bigr)\Bigr)\biggr)\Biggr)$

Equation and System of equations

\begin{align*} \cos^2 x +\sin^ 2 x=1 \end{align*}

\begin{equation}
\sigma(z) = \frac{1}{1 + e^{-z}}
\end{equation}

$$\begin{cases}
a_1x+b_1y+c_1z=d_1 \\
a_2x+b_2y+c_2z=d_2 \\
a_3x+b_3y+c_3z=d_3
\end{cases}
$$

multi-line equation
$$\begin{equation}\begin{aligned}
a &= b + c \\
&= d + e + f + g \\
&= h + i
\end{aligned}\end{equation}\tag{2}\label{eq2}$$

aligned equations
$$
\begin{align}
\sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
& = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\
& = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
& = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\
& \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right)
\end{align}
$$

$$\begin{cases}
a_1x+b_1y+c_1z=\frac{p_1}{q_1} \\[2ex]
a_2x+b_2y+c_2z=\frac{p_1}{q_1} \\[2ex]
a_3x+b_3y+c_3z=\frac{p_1}{q_1}
\end{cases}
$$

vs
$$\begin{cases}
a_1x+b_1y+c_1z=\frac{p_1}{q_1} \\
a_2x+b_2y+c_2z=\frac{p_2}{q_2} \\
a_3x+b_3y+c_3z=\frac{p_3}{q_3}
\end{cases}
$$

colors

$$
\begin{array}{|rc|}
\hline
\verb+\color{black}{text}+ & \color{black}{text} \\
\verb+\color{gray}{text}+ & \color{gray}{text} \\
\verb+\color{silver}{text}+ & \color{silver}{text} \\
\verb+\color{white}{text}+ & \color{white}{text} \\
\hline
\verb+\color{maroon}{text}+ & \color{maroon}{text} \\
\verb+\color{red}{text}+ & \color{red}{text} \\
\verb+\color{yellow}{text}+ & \color{yellow}{text} \\
\verb+\color{lime}{text}+ & \color{lime}{text} \\
\verb+\color{olive}{text}+ & \color{olive}{text} \\
\verb+\color{green}{text}+ & \color{green}{text} \\
\verb+\color{teal}{text}+ & \color{teal}{text} \\
\verb+\color{aqua}{text}+ & \color{aqua}{text} \\
\verb+\color{blue}{text}+ & \color{blue}{text} \\
\verb+\color{navy}{text}+ & \color{navy}{text} \\
\verb+\color{purple}{text}+ & \color{purple}{text} \\
\verb+\color{fuchsia}{text}+ & \color{magenta}{text} \\
\hline
\end{array}
$$

Highlight
$$ \bbox[yellow]
{
e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
\qquad (1)
}
$$

Reference MathJax basic tutorial and quick reference

 


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *