# Atiyah-Macdonald p.108

I don't understand the following lines on p.108 (chapter 10) in Atiyah-Macdonald:

Since we have a natural homomorphism $f:A\to \hat{A}$ we can regard $\hat{A}$ as an $A$-algebra and so for any $A$-module $M$ we can form an $\hat{A}$-module $\hat{A}\otimes_A M$. It is natural to ask how this compares with the $\hat{A}$-module $\hat{M}$. Now the $A$-module homomorphism $g:M\to \hat{M}$ defines an $\hat{A}$-module homomorphism $$\hat{A}\otimes_A M\to \hat{A}\otimes_A \hat{M}\to \hat{A}\otimes_\hat{A} \hat{M}=\hat{M}.$$

Well, we can define an $A$-module stucture on $\hat{A}$ in the following way: Let $\hat{a}\in\hat{A}$ and $a\in A$. Then define $a\cdot\hat{a}:=f(a)\,\hat{a}$. But why is the tensor product $\hat{A}\otimes_A M$ an $\hat{A}$-module? And how are the homomorphisms in the last line defined?

If $B$ is an $A$-algebra then the tensor product $B \otimes_A M$ is what we mean when we say extend scalars to $B$. It is a $B$-module where the action is given by multiplying into the left factor, so $b \cdot (b' \otimes m) = (bb') \otimes m$.
For the homomorphisms, the first one in the last line is easy. It's just $\mathrm{id} \otimes g$ where $g$ is the natural map $g\colon M \to \hat M$. So $a \otimes m \mapsto a \otimes g(m)$.
For the second homomorphism let $B$ be an $A$-algebra and assume $M$ and $N$ are $B$-modules. Then they are also $A$-modules so both tensor products $M \otimes_A N$ and $M \otimes_B N$ are well defined. If you go back to the definition of the tensor product you'll see that $M \otimes_B N$ is the same thing as $M \otimes_A N$ except we now allow elements of $B$ to cross the tensor symbol, not just elements of $A$. In other words, the relations that we quotient out by in forming $M \otimes_A N$ are properly contained in the relations that we quotient out by to form $M \otimes_B N$. This means $M \otimes_B N$ is a quotient of $M \otimes_A N$ and therefore there's a natural map $$M \otimes_A N \to M \otimes_B N$$ If all that was a little confusing here's another way to get that map. It's defined by $m \otimes n \mapsto m \otimes n$ so just check that this satisfies the bilinearity relations and hence gives a well defined map. Then it's obvious that it's surjective because it hits all the simple tensors.
Making $\widehat{A}\otimes_A M$ into an $\widehat{A}$-module:
I'll say something in greater generality, because it makes things simpler. Suppose $M$ is an $(L,S)$ bimodule (that is, it has a left action by $L$ and a right action by $S$). Also let $N$ be an $(S,R)$ bimodule. Then: $$M\otimes_S N\text{ is an (L,R)-bimodule, via }l(m\otimes n)r:=(lm)\otimes (nr)$$ Specializing to your case, everything is commutative so we don't have to worry about left/right multiplication. Thus we define $$\widehat{a}_1(\widehat{a}_2\otimes m)=(\widehat{a}_1\widehat{a}_2)\otimes m.$$