# How to break a long equation?

I have a long equation but long enough to occupy two lines. I want to break it to improve readability. How can I break it?

$$F = \{F_{x} \in F_{c} : (|S| > |C|) \cap (minPixels < |S| < maxPixels) \cap (|S_{conected}| > |S| - \epsilon) \}$$


I wan to break it in 3 lines after \cap. But \\ or \n didn't work

-

Use split environment provided by amsmath package.

$$\begin{split} F = \{F_{x} \in F_{c} &: (|S| > |C|) \\ &\quad \cap (\text{minPixels} < |S| < \text{maxPixels}) \\ &\quad \cap (|S_{\text{conected}}| > |S| - \epsilon) \} \end{split}$$

-
And it would look even nicer with a \mathrm{minPixels} and \mathrm{maxPixels} and \mathrm{connected}. –  Bruno Le Floch Jan 14 '11 at 12:12
@Bruno: I agree. I edited the answer to use \text. –  Leo Liu Jan 14 '11 at 15:44
Be aware that \text inherits formatting from the surrounding text (which might be italic in a theorem environment). –  Caramdir Jan 14 '11 at 16:58
When using \right( and \left) or similar, one should be careful. The \left. and \right. should be used in order to avoid splitting of brackets pairs. For example a line should have the form \left( \ldots \right. \ when it involves this kind of brackets. –  Dror Jan 9 '12 at 11:15

For simple multi-line equations without alignment, use the multline environment:

\begin{multline}
F = \{F_{x} \in  F_{c} : (|S| > |C|) \cap
(minPixels  < |S| < maxPixels) \\ \cap
(|S_{conected}| > |S| - \epsilon)
\}
\end{multline}

-
But you would want alignment here, wouldn't you? –  Marc van Dongen Jan 2 '13 at 8:41

The mathtools package provides the multlined environment.

$$\begin{multlined} F = \{F_{x} \in F_{c} : (|S| > |C|) \\ \shoveleft[1cm]{\cap (\mathrm{minPixels} < |S| < \mathrm{maxPixels})} \\ \cap (|S_{\mathrm{connected}}| > |S| - \epsilon) \} \end{multlined}$$

-
\begin{eqnarray}

Don't use {eqnarray}: eqnarray vs align –  cgnieder Mar 3 '13 at 12:50