[Tex/LaTex] Labels in aligned environment

alignamsmathequationsmath-mode

I need to use the aligned environment to nicely format an equation but I am unable to set a label and a number to one of the equations. How could I achieve this?

\begin{align}
    \begin{aligned}
        &&  \text{MSD}  &= 4D \cdot t                  \nonumber \\
        &\Rightarrow    &\frac{\text{MSD}}{t}   &= 4D  \label{eq:diffusion}
    \end{aligned}
\end{align}

enter image description here

Many thanks in advance!

Best Answer

There is no need for alignat unless you need more than one point of alignment (without spaces). In your case, it suffices to use align:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
                              \text{MSD} &= 4D \cdot t    \nonumber \\
  \Rightarrow \quad \frac{\text{MSD}}{t} &= 4D \label{eq:diffusion}
\end{align}

\end{document}