In the Latex begin{displaymath} all spaces are ignored, e.g. this code
\begin{displaymath}
Y=\{ B_i \subseteq Z : i \in X \}, where X \subseteq \mathbb{N}
\end{displaymath}
will look after compile: ...,whereX...
To avoid this situation there is a list of commands to deal with this:
- \, (thinspace)
- \; (thickspace)
- \quad (quadspace)
- \qquad (double quadspace)
- \! (negative thinspace)
More info can be found here