\numberwithin{equation}{subsection} is in the preamble of an article.
Equations in sections before subsection 1 of that section begin numbering as x.0.y+1, where "y" is the number of the last equation of the last subsection of the previous section. (Numbers are OK in subsections, as 2.1.1, etc.) I can't see how such behavior would ever be desirable. Example:
\documentclass[12pt]{article}
\usepackage{amsmath}
\numberwithin{equation}{subsection}
\begin{document}
\section{1}
\begin{equation}
1
\end{equation}
\subsection{1}
\begin{equation}
1
\end{equation}
\subsection{1}
\begin{equation}
1
\end{equation}
\begin{equation}
1
\end{equation}
\section{1}
\begin{equation}
1
\end{equation}
\subsection{1}
\begin{equation}
1
\end{equation}
\section{1}
\begin{equation}
1
\end{equation}
\subsection{1}
\begin{equation}
1
\end{equation}
\end{document}
produces equations numbered (1.0.1), (1.1.1), (1.2.1), (1.2.2), (2.0.3), (2.1.1), (3.0.2), (3.1.1).


0of course. – May 20 '15 at 12:07