Recent Changes
Recent Changes · Search:
 

The LATEX Equations page illustrates inline mathematics and simple equations. This page illustrates how to group and align several equations. It uses the existing {$ ... $} equation markup.

This page broke under PmWiki 2.2.0 beta 65; now fixed. In 2.2, the rule for evaluating character entities moved nearer the start of the evaluation sequence. This caused equation markup to evaluate before equation array markup, instead of after, so the arrays were interpreted as individual equations.

The simplest unnumbered form just aligns to the relation symbol:

(a + b)^3 &= (a + b) (a + b)^2 \\
                  &= (a + b) (a^2 + 2ab + b^2) \\
                  &= a^3 + 3a^2b + 3ab^2 + b^3

Here is a group of aligned equations, with numbering (automatically set flush right):

1+1 &= 2 \\
 4   &= 2 \cdot 2 \nonumber \\
 a + b &\le c \\
 d + e &>   f \\
 \sin x &= x -\frac{x^{3}}{3!} + \frac{x^{5}}{5!} - \frac{x^{7}}{7!} +{} \nonumber \\
 &  {}+ \frac{x^{9}}{9!} - {}\cdots

Here is an unnumbered group of aligned equations (automatically centred):

x^2 + y^2 &= 1 \\
                x &= \sqrt{1-y^2}

Here is an unnumbered group of aligned equations, with 2 alignment positions, plus an intermediate line of text:

x       &= y        && \text{by hypothesis} \\
       x' &= y'        && \text{by extension}  \\
 & \intertext{And finally:} \\
 x + x' &= y + y' && \text{by Axiom 1}

As of Wikipublisher version 2.2.7, the markup lets authors define a subequation set. Note that in the web page view, it continues the numbering where the previous equation left off. However, if an author adds a new numbered equation above this one, the image numbering does not change, as the image is generated once and stored.

(5)f &= g  \\
    f' &= g' \\
  \mathcal{L}f &= \mathcal{L}g

References to aligned subequations are supported and it correctly counts the preceding aligned equation numbers: Equation (5) shows this.

In line with recommended LATEX practice, the recipe wraps the equations in the align environment, rather than using eqnarray.

Page last modified on 07 January 2016 at 03:08 PM