Q:

Formatting equations in LaTeX

When I include an equation in LaTeX that is enumerated, i.e.
{\begin{equation}
$$
$$ ... \end{equation}
}

The line above the equation (blank space between the text preceeding it and the equation) is huge. How do I make it smaller?

A:

Your code it's a little bit messy. If you want to write math in your LaTeX code there are mainly three ways:
Inline math: include your math code between two $ (like $\pi=3,141$); your equation or symbols will be displayed on the current line.
Displayed, unnumbered math: include your math code between \[ and \] in the following way:
some text
\[
\pi=3.141
\]
some text

The equation will be displayed, but without a number for referencing it.
Displayed, numbered math: use the equation environment:
some text
\begin{equation}
\pi=3.141
\end{equation}
some text

The equation will be displayed and numbered.
If you have troubles with space before and after your equations, be sure of leaving no blank lines before or after the environment (as shown in the examples). Last remark: use of $$ for displayed math is deprecated.

