Inline math like $E = mc^2$ and $a_i^2$ appears within text.

A display equation:
\[
  \int_0^1 x^2 \, dx = \frac{1}{3}
\]

And an aligned block:
\begin{align}
  f(x) &= x^2 + 2x + 1 \\
       &= (x + 1)^2
\end{align}
