Localizing a ring of invariants 
Let $A$ be a domain and $G$ a finite group of automorphisms of $A$. I define $$A^G=\{a\in A\mid\sigma(a)=a ,\forall\sigma\in G\}.$$ Furthermore let $S\subset A$ be multiplicatively closed such that $\sigma(S)\subset S$ for all $\sigma\in G$ and we write $S^G=S\cap A^G$. I want to show that $$(S^G)^{-1}A^G\cong(S^{-1}A)^G.$$ (Atiyah and Macdonald, Introduction to Commutative Algebra, Exercise 12, Chapter 5.)

First off, I'm not really sure what is meant by $(S^{-1}A)^G$ here, so it would be nice if somebody could try to guess what would be the most natural interpretation of this.
Regarding the general procedure: I only know that $A$ is integral over $A^G$, which would give me $(S^G)^{-1}A$ being integral over $(S^G)^{-1}A^G$, though I'm not sure if this would be helpful even if I knew what $(S^{-1}A)^G$ was. So depending on this, maybe a little hint would also be nice.
Thanks in advance.
 A: The following works without demanding that $A$ is a domain. There is a trick using the finiteness of $G$ that reminds one of the norm in Galois theory: Take $\frac{a}{s} \in (S^{-1}A)^{G}$, i.e., $$\frac{a}{s} = \sigma\left(\frac{a}{s}\right) = \frac{\sigma(a)}{\sigma(s)}$$ for all $\sigma \in G$. We can write $$\frac{a}{s} = \frac{a \prod_{\sigma \in G \setminus \{\rm id\}} \sigma(s)}{\prod_{\sigma \in G} \sigma(s)},$$ having the advantage of the denominator $s'$ being $G$-invariant. Let $a'$ be the numerator. Since now $$\frac{a'}{s'} = \frac{\sigma(a')}{s'}$$ for all $\sigma \in G$, for each $\sigma$ there is some $u_{\sigma} \in S$ such that $$u_{\sigma} s' (a' - \sigma(a')) = 0,$$ and multiplying all those $u_{\sigma}$ gives a $u \in S$ working for all $\sigma \in G$ simultaneously, $$u s' (a'-\sigma(a')) = 0.$$ Finally, using the same trick again, let $u' := \prod_{\sigma \in G} \sigma(u)$. Then $u' \in S^{G}$ and $$u's'(a'-\sigma(a')) = 0$$ for all $\sigma \in G$. Setting $\overline{a} := u's'a'$, for all $\sigma$ we have $$\sigma(\overline{a}) = \sigma(u')\sigma(s')\sigma(a') = u's'\sigma(a') = \overline{a},$$ so $\overline{a} \in A^G$ and hence $$\frac{a}{s} = \frac{a'}{s'} = \frac{u's'a'}{u's'^2} = \frac{\overline{a}}{u's'^2} \in (S^G)^{-1}A^G,$$ as desired.
The injectivity of the canonical map $(S^G)^{-1}A^G \rightarrow (S^{-1}A)^G$ can also be dealt with using this "norm trick".
A: There is a natural injection $(S^G)^{-1} A^G \hookrightarrow (S^{-1}A)^G$. To show that this is an isomorphism, you must show that every invariant fraction is a fraction of invariants.
Here are some hints.
So assume $\sigma \cdot \frac{a}{s}= \frac{a}{s}$. This is equivalent to $s \sigma (a) = a \sigma (s)$.
Since $G$ is a finite group, there is some $n$ such that $\sigma^n=id$. Then note that
$$
\frac{a}{s} = \frac{\sigma^{n-1}(s) \sigma^{n-2}(s)\ldots \sigma(s)a }{\sigma^{n-1}(s) \sigma^{n-2}(s)\ldots \sigma(s)s} = \frac{\sigma^{n-1}(s) \sigma^{n-2}(s)\ldots \sigma(a)s }{\sigma^{n-1}(s) \sigma^{n-2}(s)\ldots \sigma(s)s}
$$
By induction one can show that the numerator is $\sigma^{n-1}(a)\sigma^{n-2}(s) \ldots \sigma(s) s$.
Now its not difficult to see that both the numerator and denominator are invariant.
