# Alignment of equations with implies and equals to

In amsmath package, the following doesn't get aligned properly. Here is the code.

\begin{alignat*}{2}
& 0 &= \dfrac{1}{4}(2(-1)+1)+C\mathrm{e}^{2(-1)}\\
& \implies 0 &= \dfrac{-1}{4}+C\mathrm{e}^{-2}\\
& \implies \dfrac{1}{4}\mathrm{e}^2 &= C\\
& \implies C &= \dfrac{1}{4}\mathrm{e}^2
\end{alignat*}


How to resolve it?

• You can also use align. – Werner Jan 24 at 16:08
• You should understand that 2 alignment points per row require 3 &, not 2. – Bernard Jan 24 at 18:20

Do you mean something like this?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
&& 0 &= \dfrac{1}{4}(2(-1)+1)+C\mathrm{e}^{2(-1)}\\
& \implies& 0 &= \dfrac{-1}{4}+C\mathrm{e}^{-2}\\
& \implies& \dfrac{1}{4}\mathrm{e}^2 &= C\\
& \implies& C &= \dfrac{1}{4}\mathrm{e}^2
\end{alignat*}
\end{document}