How can I have linebreaks in my long LaTeX equations?

I would question if you really want to do that. Multi-line equations will be very difficult to read. Is it possible to break up your equation into multiple (shorter) equations?

Commented May 18, 2010 at 18:58 Use \notag \\ Check relevant answers here: tex.stackexchange.com/questions/74819/… Commented Oct 16, 2020 at 10:23

13 Answers 13

If your equation does not fit on a single line, then the multline (note that that's multline without an "i", not "multiline") environment probably is what you need:

\begin first part of the equation \\ = second part of the equation \end

If you also need some alignment respect to the first part, you can use split :

\begin \begin first part &= second part #1 \\ &= second part #2 \end \end

Both environments require the amsmath package.

See also aligned as pointed out in an answer below.

21 7 7 bronze badges answered May 18, 2010 at 21:42 Alessandro Cuttin Alessandro Cuttin 4,002 1 1 gold badge 31 31 silver badges 36 36 bronze badges In my experience there can't be a newline inside multline en equation environments Commented Dec 5, 2015 at 9:18 ! Package amsmath Error: \begin allowed only in paragraph mode. Commented Aug 24, 2022 at 12:16 @Welgriv are you putting the multline environment inside the equation environment Commented Jun 20, 2023 at 8:57

Not yet mentioned here, another choice is environment aligned , again from package amsmath :

\documentclass \usepackage \begin \begin \begin A & = B + C\\ & = D + E + F\\ & = G \end \end \end

screenshot of output (detail)

answered Jun 30, 2018 at 17:01 MattAllegro MattAllegro 7,169 5 5 gold badges 49 49 silver badges 56 56 bronze badges

Without configuring your math environment to clip, you could force a new line with two backslashes in a sequence like this:

Bla Bla \\ Bla Bla in another line 

The problem with this is that you will need to determine where a line is likely to end and force to always have a line break there. With equations, rather than text, I prefer this manual way.

You could also use \\* to prevent a new page from being started.

answered May 18, 2010 at 18:57 89.4k 51 51 gold badges 225 225 silver badges 322 322 bronze badges

If it is inline equation, then use \allowbreak . Use it like:

$x_1,x_2,x_3,\allowbreak x_4,x_5$. 

Latex will break equation in this place only if necessary.

7,169 5 5 gold badges 49 49 silver badges 56 56 bronze badges answered Dec 23, 2020 at 22:05 144 1 1 silver badge 8 8 bronze badges that didn't work for me Commented Nov 8, 2022 at 20:04

I used the \begin

\begin \begin line_1 \\ line_2 \\ line_3 \end \end
answered Aug 8, 2016 at 18:44 Paulo Ferreira Paulo Ferreira 91 1 1 silver badge 2 2 bronze badges

There are a couple ways you can deal with this. First, and perhaps best, is to rework your equation so that it is not so long; it is likely unreadable if it is that long.

If it must be so, check out the AMS Short Math Guide for some ways to handle it. (on the second page)

Personally, I'd use an align environment, so that the breaking and alignment can be precisely controlled. e.g.

\begin x&+y+\dots+\dots+x_100000000\\ &+x_100000001+\dots+\dots \end

which would line up the first plus signs of each line. but obviously, you can set the alignments wherever you like.