I want to number and make a reference to just the last line of a multi-line equation in \align
. Here is an example:
\begin{align} z_1^2 &= \left( 2 e^{i \frac{\pi}{3}} \right) \left( 2 e^{i \frac{\pi}{3}} \right)\\ &= 4 e^{i \frac{2 \pi}{3}} \end{align}
I only want to number the &= 4 e^{i \frac{2 \pi}{3}}
part, rather than both lines of the \align
. How do I do this?
You can then use \cref{eq2,eq1,eq3,eq5,thm2,def1} in order to do it. Show activity on this post. The amsmath package introduces the subequations environment. The first label, 'all1', before the \begin{align} , creates a label for the complete set of equations (1, in this case).
If you want to refer to a numbered equation, you can put a \label{ } command between the \begin{equation} and the \end{equation} .
(1) LATEX doesn't break long equations to make them fit within the margins as it does with normal text. It is therefore up to you to format the equation appropriately (if they overrun the margin.) This typically requires some creative use of an eqnarray to get elements shifted to a new line to align nicely.
In general, the command \\ signifies a line break and within the correct math mode environment, it can start a new equation line. Try the example on the right which sets the same multiple equations in several ways.
From the amsmath documentatiom (amsldoc.pdf):
You can suppress the number on any particular line by putting \notag before the \\;
So your equation should look like this (some bits removed from your equation to make it shorter):
\begin{align} z_1^2 &= \left( ... \right) \left( ... \right)\notag\\ &= 4 e^{i \frac{2 \pi}{3}} \end{align}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With