LaTeX: equation in several lines - how it works
With a normal line break you cannot write equations in LaTeX over several lines. We'll show you how you can still format the equation environment appropriately.
LaTex: Format equation with split
With the split environment you can clearly present longer equations. The first part of the equation is separated from the rest of the formula. When creating a new line, be sure to put a [&] in front of the comparison operator. You end a line with [\\\\]. You need the amsmath package for this feature.
- \ Begin {equation}
- \ Begin {split}
- a ^ 2 & = b ^ 2 + c ^ 2 \\\
- &> b ^ 2
- \ End {split}
- \ End {equation}
LaTeX: Long equation in several lines
If you use the multline environment instead of the equation, you can work with line breaks as usual. Use [\\\\] to insert a line break at the desired position in your equation. The amsmath package is also required here.
- \ Begin {mult line}
- d ^ 2 = a ^ 2 + b ^ 2 + c ^ 2 \ geq a ^ 2 + b ^ 2 = a ^ 2 + b ^ 2 + 2ab - 2ab = (a + b) ^ 2 - 2ab \\\ \ geq -2ab
- \ End {mult line}
In another practical tip, we will show you how to insert images into your LaTeX document.