# How to divide this equation into two lines?

I'm making a beamer presentation and I can't divide this equation into two lines, because it is too long. Can somebody help me?

\documentclass[xcolor=table]{beamer}

\begin{document}

\begin{frame}

$$\Lambda_{t}\left[1+\phi\left(\frac{K_{t+1}}{K_{t}}-g\right)\right]=\beta E_{t}\Lambda_{t+1}\left[1-\delta+\alpha a_{t+1}\left(\frac{K_{t+1}}{X_{t+1}h_{t+1}}\right)^{\alpha-1}+\phi\frac{K_{t+2}}{K_{t+1}}\left(\frac{K_{t+2}}{K_{t+1}}-g\right)-\frac{\phi}{2}\left(\frac{K_{t+2}}{K_{t+1}}-g\right)^{2}\right]$$

\end{frame}

\end{document}

• Package amsmath provides many environments for splitting equations, e.g. split inside the equation or multline as standalone equation environment. – Heiko Oberdiek Sep 13 '15 at 11:33
• And by the way, you should rather use $ and $ than the deprecated  – Philipp Imhof Sep 13 '15 at 11:49 ## 3 Answers With the aligned environment. Btw, don't use  … , which is plain TeX syntax, and can produce incorrect vertical spacing, use $…$ instead. \documentclass[xcolor=table]{beamer} \usepackage{mathtools} \geometry{showframe} \begin{document} \begin{frame} \begin{aligned} \Lambda_{t}\left[1+\phi\left(\frac{K_{t+1}}{K_{t}}-g\right)\right] & =\beta E_{t}\Lambda_{t+1}\left[1-\delta+\alpha a_{t+1}\left(\frac{K_{t+1}}{X_{t+1}h_{t+1}}\right)^{\!\!\alpha-1}\right. \\ & \!\left.{}+\phi\frac{K_{t+2}}{K_{t+1}} \left(\frac{K_{t+2}}{K_{t+1}}-g\right)-\frac{\phi}{2}\left(\frac{K_{t+2}}{K_{t+1}}-g\right)^{\!\!2}\right] \end{aligned} \end{frame} \end{document}  You should never use  in LaTeX, see Why is $...$ preferable to $$...$$?

I suggest using multline*, but with three lines, which makes a bit clearer the structure of the equation.

\documentclass[xcolor=table]{beamer}

\begin{document}

\begin{frame}

\begin{multline*}
\Lambda_{t}\biggl[1+\phi\biggl(\frac{K_{t+1}}{K_{t}}-g\biggr)\biggr]=\\
\beta E_{t}\Lambda_{t+1}\biggl[1-\delta+\alpha a_{t+1}
\biggl(\frac{K_{t+1}}{X_{t+1}h_{t+1}}\biggr)^{\!\alpha-1}+{}\\
\phi\frac{K_{t+2}}{K_{t+1}}\biggl(\frac{K_{t+2}}{K_{t+1}}-g\biggr)-
\frac{\phi}{2}\biggl(\frac{K_{t+2}}{K_{t+1}}-g\biggr)^{\!2}\,\biggr]
\end{multline*}

\end{frame}

\end{document}


I prefer to size manually the fences; note also \! in the exponents near to large closing parentheses and \, before the last ], so it will be slightly moved farther from the exponent.

You may want to have the relation and operation signs in the continuation lines; just be consistent across your document. In this case the input should be

\begin{multline*}
\Lambda_{t}\biggl[1+\phi\biggl(\frac{K_{t+1}}{K_{t}}-g\biggr)\biggr]\\
=\beta E_{t}\Lambda_{t+1}\biggl[1-\delta+\alpha a_{t+1}
\biggl(\frac{K_{t+1}}{X_{t+1}h_{t+1}}\biggr)^{\!\alpha-1}\\
{}+\phi\frac{K_{t+2}}{K_{t+1}}\biggl(\frac{K_{t+2}}{K_{t+1}}-g\biggr)-
\frac{\phi}{2}\biggl(\frac{K_{t+2}}{K_{t+1}}-g\biggr)^{\!2}\,\biggr]
\end{multline*}


that will produce

Note the {} preceding + in the continuation line (or +{} if you prefer to have it at the end of a line), which ensures correct spacing of the symbol.

Don't worry if this occupies more space than a two line approach; cramming as much as possible in a slide is wrong to begin with.

You could use a multline* environment, and insert a linebreak instruction. Note that you can't use a \left[...\right] pair of fences for the outermost square brackets, since they span a line break. Use \Biggl[...\Biggr] instead.

\documentclass[xcolor=table]{beamer}
\begin{document}
\begin{frame}

\begin{multline*}
\Lambda_{t}\left[1+\phi\left(\frac{K_{t+1}}{K_{t}}-g\right)\right]
=\beta E_{t}\Lambda_{t+1}\Biggl[1-\delta+\alpha a_{t+1}\left(\frac{K_{t+1}}{X_{t+1}h_{t+1}}\right)^{\!\alpha-1}
\\
+\phi\frac{K_{t+2}}{K_{t+1}}\left(\frac{K_{t+2}}{K_{t+1}}-g\right)-\frac{\phi}{2}\left(\frac{K_{t+2}}{K_{t+1}}-g\right)^{\!2}\,\Biggr]
\end{multline*}

\end{frame}
\end{document}