[Tex/LaTex] formula transfer to a new line

equationsline-breaking

How I can make a transfer of a long math equation in a new line? I suppose there are at least two methods: manually by hands and adjust math container to do that automatically. Can you show me, please this two methods.

Best Answer

If you want to make an equation centered on its own line, put it inside \[...\].

If you want to break a long equation across many lines, the align environment from the amsmath package is a great tool.

Here is a basic example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent Here is an equation centered on its own line:
\[ ax + by + cz = 2x + 3y + 4z \]
And here is an equation broken across multiple lines:
\begin{align*}
ax + by + cz
& = 2x + 3y + 4z \\
& = z \left( 2\frac{x}{z} + 3\frac{y}{z} + 4 \right)
\quad \text{(as long as $z \neq 0$)} \\
& = 0
\end{align*}
\end{document}

enter image description here