Possible Duplicate:
How to correctly format (and align) a LaTeX proof?
In my proofs I would like to have justifications of each step to the side of the numerical manipulation. For instance consider what I have been doing:
\begin{align*}
\lvert p-q \rvert &= \sqrt{(p-q)^2} \text{ by definition of square root}\\
&=\sqrt{p^2 -2pq +q^2}\text{ by multiplication}\\
&=\sqrt{p^2-2pq+q^2 +2pq -2pq} \text{by the additive identity}\\
&=\sqrt{p^2+2pq+q^2 -4pq}\text{ by grouping like terms}\\
&=\sqrt{(p+q)^2 -4n}\text{ by the distributive law}
\end{align*}
This is messy and more time consuming.
- How can I achieve my justifications in some kind of defined format?
- What are other best practices?
