LaTeX can break inline formulas after a relational or a binary symbol. If you don't want this to happen you can explicitly prevent it by setting:

```
\relpenalty=10000
\binoppenalty=10000
```

LaTeX will then always try to keep the `$...$`

within one line, but as a result you may end up with overfull hboxes if the paragraph doesn't have enough flexibility to allow for some acceptable line breaking. In that case xou then have to place an explicit linebreak (or an optional one) manually into the formula using `\linebreak`

(with or without an optional argument).

The alternative (as a one-time change) is that you place an explicit linebreak just before the formula (via `\linebreak`

) which will then force a linebreak at that point with a justified line in fron of the formula. Again this only works with enough flexibility in the paragraph.

The other possibility for a one-time change is to put the above parameter settings inside the `$...$`

in which case they only apply to that equation.

What you should not do (normally) is to surround the whole equation by, say an `\mbox`

. In practive this will also prevent LaTeX from breaking it over a line, but it has the additional effect of making the spacing within the formula rigid, i.e., the formula will not be queezed or spread in line with the rest of the paragraph material.

The only other alternative is to go for displayed formula as mentioned in the comment.

Enclose your formula in single `$`

, as follows:

Text text text `$ \some \math \commands $`

more text text text.

Note that if you use double `$$`

instead, the formula will appear in it's own line, and the text will continue below.

## Best Answer

Use

`cases`

environment