LaTeX workshop - Displayed and inline formulae

Mathematical formulae can be “inline” (i.e., be part of the paragraph) or “displayed” (i.e., be centered and typeset on a line on its own).

Mathematical equations within a paragraph are entered between dollar signs $. Usually the “inline” style is used for typesetting short formulas or mathematical symbols as a part of the text, for example

The functions $f \colon X \to Y$ and $g \colon Y \to Z$ can be composed by first applying $f$ to an
argument $x$ to obtain $y=f(x)$ and then applying $g$ to obtain $z=g(y)$. The composite function formed in this way
form functions $f$ and $f$ is denoted as $g \circ f \colon X \to Z$.

In case of typesetting larger and more cumbersome formulae it is preferable to display them in a separate line. To do this you enclose them either between \begin{equation} and \end{equation} (if we want to have an equation number in the margin) or \begin{equation*} and \end{equation*} (if we do not want any number). Instead of \begin{equation*} and \end{equation*} }} you can use {{{\[ and \]. Here are some examples:

Consider the function
\begin{equation*}
g(z)=\frac{z^2}{z^2+2z+2}.
\end{equation*}
Observe that we can rewrite $g$ as follows:
\[
 g(z)=\frac{z^2}{(z+1-i)(z+1-i)}.
\]
Hence, applying the Cauchy's integral formula to the function $g$, we obtain
\begin{equation}
 \int_{C}\frac{z^2}{z^2+2z+2}\textup{d}z = -4\pi i,
\end{equation}
where $C$ denotes the circle with center at the origin and radius $2$. 

Finally, note the difference in typesetting between “inline” and “displayed” style: this is the “inline” style: [Error: dvipng binary and convert binary not found at /usr/bin/dvipng or ], whereas this is the “displayed” style: [Error: dvipng binary and convert binary not found at /usr/bin/dvipng or ].