Sorry, if this question sounds a bit amateurish, but I haven't been able to find a good summary about the differences between these four environments for multi-lining an equation. Where do they differ and which one should I choose under different circumstances?
Asked
Active
Viewed 1.6e+01k times
72
1 Answers
61
As noted in comments the amsmath and breqn documentation have several good examples, also the mathtools package has extended versions of several of the amsmath alignments. But the usual style here is to answer inline rather than refer to manuals, so this is a document giving the basic usage of the environments you mention.

\documentclass{article}
\usepackage{amsmath}
\usepackage{breqn}
\begin{document}
Align, from amsmath package:
numbered equations aligned at points marked
with \verb|&| usually just before a relation.
\begin{align}
a_1& =b_1+c_1\\
a_2& =b_2+c_2-d_2+e_2
\end{align}
split, also from amsmath,
similar alignment to align, but the whole construct fits within
equation (or other display math) and is numbered as a unit.
\begin{equation}\label{xx}
\begin{split}
a& =b+c-d\\
& \quad +e-f\\
& =g+h\\
& =i
\end{split}
\end{equation}
multline, from amsmath
for lonq expressions taking more than one line,
with no specifed alignment points.
\begin{multline}
a+b+c+d+e+f+g+h+i+j+k+\\
l+m+n+o+p+q+r+s+t+w+x+y+z
\end{multline}
breqn is not part of the amsmath collection and is a highly experimental
package that tries to automate the line breaking.
Here it automatically spots the relations and adds
the line breaks and alignment points.
It also automatically handles the trailing full stop after the display.
\begin{dmath}
T(n) \hiderel{\leq} T(2^{\lceil\lg n\rceil})
\leq c(3^{\lceil\lg n\rceil}
-2^{\lceil\lg n\rceil})
<3c\cdot3^{\lg n}
=3c\,n^{\lg3}
\end{dmath}.
\end{document}
David Carlisle
- 757,742
-
How you solve the same problem with parenthesis like \left[ and \right]? – Alejandro Sazo Sep 15 '16 at 18:50
-
1@AlejandroSazo ? sorry I can't guess what problem you mean. Perhaps you should ask a question on the site. – David Carlisle Sep 15 '16 at 19:58
-
Sorry I just found that there is no problem with left and right parenthesis while breaking an equation. – Alejandro Sazo Sep 16 '16 at 02:38
-
is \quad convential use in this case to align the content on the right hand side of the equal sign? – Xaser Sep 17 '18 at 16:39
-
1@Xaser no, perhaps I should have used
\qquadthe apparent alignment there was accidental and unintended – David Carlisle Sep 17 '18 at 17:19 -
@DavidCarlisle thank you. If you say that \qquad may have been better, what are the conventions on the indentation of the second line (where not new = is involved)? – Xaser Sep 17 '18 at 17:22
-
1@Xaser I don't know of any formal convention but the styles are normally to just wrap so not indented at all, but if you choose to indent it's better if it's obviously indented and not looking like it's aligned with something.
\quadand\qquadare available for that use but I wouldn't say theer are really any conventions. – David Carlisle Sep 17 '18 at 17:25 -
2@Xaser, here some notes about spacing in math mode: https://www.overleaf.com/learn/latex/Spacing_in_math_mode. I wanted to align a letter
n(not a+), and what worked for me was something like&\quad\;.\quadfor the space of the=that I am not putting in that line, and\;for the standard space after the=operator. – Carlos H. Mendoza-Cardenas Jun 12 '19 at 15:24 -
-
@peter if you want to align after the = rather than before you need
={}&to get the correct relation spacing. – David Carlisle Jun 12 '21 at 09:00 -
yes, i forgot. is there a reason for this or could we maybe just redefine & so its rel-friendly from both sides? – peter Jun 12 '21 at 09:08
split,multline, andalignenvironments do, I recommend reading section 3, "Displayed equations", of the user guide of the amsmath package. It may be loaded by typingtexdoc amsmathat a command prompt. Similarly, to bring up the user guide of thebreqnpackage, typetexdoc breqnat a command prompt. – Mico Apr 18 '15 at 10:40texdoc mathmodeis a good source. – egreg Apr 18 '15 at 13:52