## Breaking Equations in LaTeX

LaTeX is a great document creation software, which has been used by many academics and professional writers to create technical books, thesis, dissertations, and articles.

With LaTeX, one can easily write equations, without the need for a complicated user interface -- which is the case with most graphical applications such as Microsoft Word.

One of the things that LaTeX does very well is typesetting equations. For example, LaTex is the easiest way to create professional looking formulas with a vast array of mathematical symbols.

Equation Breaking

One of the common things one may want to do with LaTeX is to break equations at specific points. This can be done with a number of ways.

The first way is to use the eqnarray environment. This environment provides a way for users to break a long equation and align these parts as necessary. Here is an example:

\begin{eqnarray}
f(x) &=& x + 2 \\
&+& x^2 + x^3
\end{eqnarray}


Notice the positioning of the = and + characters. They are enclosed in a pair of ampersands, which indicate that this is an alignment point. The break is performed by the double slash characters at the end of the first line.

Using AMS math

A second way to add a breaking to a long equation is to use the AMS math package. This package, which is available in all modern LaTeX distribution, provides several utitlities to simplify the creation of equations as well as other mathematical elements.

To use the AMS path package one needs to use the following declaration:

\usepackage{amsmath}


Then, one can use very similar code as show above to break equations, but with the align environment instead of eqnarray:

\begin{align}
f(x) &=& x + 2 \\
&+& x^2 + x^3
\end{align}


The advantage of using the align environment is that it does a better job of respecting proper mathematical alignment of operators and other elements in the equation.

Tags: breaking, equations, latex
Article created on 2012-07-14 08:28:43