Writing style for modular arithmetic with multiple equivalences in a single line or split between multiple lines

59 Views Asked by At

Is this a valid notation in modular arithmetic?

$$ 2 \equiv 12 \equiv 22 \equiv 32 \pmod{10}. $$

If I want to split this into multiple lines (say, I have got expressions that are very long), then what is the right way to write this? Is this okay?

\begin{align*} 2 & \equiv 12 \\ & \equiv 22 \\ & \equiv 32 \pmod{10}. \end{align*}

Or do I need to write it like this?

\begin{align*} 2 & \equiv 12 \pmod{10} \\ & \equiv 22 \pmod{10} \\ & \equiv 32 \pmod{10}. \end{align*}