Since $1\in S$, we clearly have $A\subseteq \bigcap_{\mathbf{m}\in\mathcal{M}}A_\mathbf{m}.$ On the other hand, let $a\in\bigcap_{\mathbf{m}\in\mathcal{M}}A_\mathbf{m}$ and define $I$ to be the ideal such that $a\frac{x}{1}=\frac{x'}{1}$, where $x$ and $x'$ are elements of $A$. Thus, $I$ consists of those elements which are denominators of $a$. We claim that $I=A$. Suppose not, then $I$ is a proper ideal, hence it is contained in a maximal ideal, say $\mathbf{m}^*$. Then, since $a\in\bigcap_{\mathbf{m}\in\mathcal{M}}A_\mathbf{m}$, we know $a\in A_{\mathbf{m}^*}$. This implies $a$ can be written in the form $\frac{p}{q}$ with $q\notin \mathbf{m}^*$, but clearly $\frac{p}{q}\cdot\frac{q}{1}=\frac{p}{1}$, hence $q\in I$. This is a contradiction to the fact that $I$ is contained in the maximal ideal, hence $I$ must not be proper, i.e., $I=A$.