How do I add a line break in display math mode?
The \[...\]
is used to typeset a single equation, not multiple equations.
You need to use an environment that allows for multiple equations. One way is to use gather
, but I normally use align
, both from the amsmath
package:
Notes:
- With display math environments if you leave blank lines in between you get additional vertical spacing and the possibility of a page break between a paragraph and following display.
- If you don't want the equations numbered use the starred versions of the environments:
gather*
andalign*
. - A really good reference is Herbert Voss's comprehensive review of mathematics in (La)TeX.
Code:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
a + b = c \\
a = c - b
\end{gather}
%
With the align environment you can align equations:
%
\begin{align}
a + b &= c \\
a &= c - b
\end{align}
\end{document}
In case gather
is not an option, for example, an imported command where everything is in math mode, consider make them a single-columned matrix without showing the symbol, then you can use \\
.
Code:
\[
\begin{array}{c}
a + b = c \\ % just use \\
a = c - b
\end{array}
\]