[Tex/LaTex] the difference between split, multline, align, breqn for breaking an equation into multiple lines


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?

Best Answer

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.

enter image description here




Align, from amsmath package:
numbered equations aligned at points marked
with \verb|&| usually just before a relation.
a_1& =b_1+c_1\\
a_2& =b_2+c_2-d_2+e_2

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.
a& =b+c-d\\
 & \quad +e-f\\
 & =g+h\\
 & =i

multline, from amsmath
for lonq expressions taking more than one line,
with no specifed alignment points.

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.
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}