Text following subequations is slightly indented if a label is used

subequations only plays around with the equation number and does nothing else. Therefore, placing it as the surrounding environment for gather actually sets it in text mode and leaves a spurious space if you don't end a line with %.

Solution: Insert % at the end of the \label: \label{...}%


Put a % after \label{eqn:test}.

\begin{subequations}
    \begin{gather*}
        a = b\\
        b = c
    \end{gather*}
    \label{eqn:test}%             %%<---here
\end{subequations}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua \ref{eqn:test}.

Actually the label should be written before the begin{gather*}. Then the Lorem... will start as a new para as in

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{subequations}
    \label{eqn:test}%
    \begin{gather*}
        a = b\\
        b = c
    \end{gather*}
\end{subequations}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua \ref{eqn:test}.
\end{document}

Note: Using \label to a un-numbered equations doesn't mean anything (starred version does not produce equation number and hence referring to that equation!.....). Use gather instead.


The \label is to subequations, so

\begin{subequations}\label{eqn:test}
    \begin{gather}
        a = b\\
        b = c
    \end{gather}
\end{subequations}

won't have spurious spaces. Notice that using subequations with gather* is meaningless: there will be no equation number to reference. You probably mean gather, without *, so each equation in the alignment will receive a subnumber.