Latex Equations

Math is inline or display:

$$y=f(x)$$ gives

$$y=f(x)$$

Greek

Superscripts use ^

Subscripts use _

Fractions

Sums and integrals

Special functions

Text in math

Special symbols

The big list of symbols

Bigness

Compare:

Spaces

Align equations

$$
\begin{align}
a + b + c &= d, \\
e &= f
\end{align}
$$
$$ \begin{align} a + b + c &= d, \nonumber \\\\ e &= f \nonumber \end{align} $$

Matrix

$$
A = 
\begin{bmatrix}
a_{1,1} & a_{1,2} & a_{1,3} \\
a_{2,1} & a_{2,2} & a_{2,3} \\
a_{3,1} & a_{3,2} & a_{3,3} \\
\end{bmatrix}
$$
$$ A = \begin{bmatrix} a_{1,1} & a_{1,2} & a_{1,3} \\\\ a_{2,1} & a_{2,2} & a_{2,3} \\\\ a_{3,1} & a_{3,2} & a_{3,3} \\\\ \end{bmatrix} $$

Fancy pants

\underbrace{\frac{\Delta t D}{\Delta x^2}}_{d}

$$\underbrace{\frac{\Delta t D}{\Delta x^2}}_{d}$$
$$
T = 
\begin{cases}
-P,            &\text{for } P < -2, \\
1-\frac{P}{2}, &\text{for } -2\le P\le 2, \\
0,             &\text{for } P > 2.
\end{cases}
$$gg
$$ T = \begin{cases} -P, &\text{for } P < -2, \\\\ 1-\frac{P}{2}, &\text{for } -2\le P\le 2, \\\\ 0, &\text{for } P > 2. \end{cases} $$

Color

\color{blue}h_0 + \int_{T_r}^{T} c_p(T)dT

$$\color{blue}h_0 + \int_{T_r}^{T} c_p(T)dT$$

{\color{blue}h_0} + \int_{T_r}^{T} c_p(T)dT

$${\color{blue}h_0} + \int_{T_r}^{T} c_p(T)dT$$