# For $A\to B$ and $B$ an $A$-module, $B\otimes_A M \cong B^e\otimes_{A^e} M$

Let $f:A\to B$ be a morphism of commutative algebras over a commutative ring $k$. Let $M$ be an $A$-module. Consider the extension of scalars $B\otimes_A M$: consider it as a symmetric $B$-bimodule, and so as a $B^e$-module. Here $B^e=B\otimes_k B$.

We can also consider $M$ as a $B^e$-module in a similar fashion. Now consider the $B^e$-module $B^e\otimes_{A^e}M$. I get the impression that $$B\otimes_A M \cong B^e\otimes_{A^e} M$$ in $B^e$-modules, but I can't seem to get a proof. There are reasonable candidates for maps from one way to the other, but I can't prove that they work (i.e. they preserve the $B^e$-action and are inverses) unless I assume that $f$ is surjective. The maps are

$b\otimes m \mapsto b\otimes 1 \otimes m$ and $b\otimes b'\otimes m\mapsto bb'\otimes m$.

I also tried with the Yoneda lemma, but I have the same problem (i.e. that I need $f$ to be surjective). Is the result true in general? If not, under what hypotheses (other than $f$ surjective) is it true?

The result is not true in general. Let $A = k$ and $B = k[x]$. Then $A^e \simeq k$ and $B^e \simeq k[x, y]$ so $B \otimes_A M \simeq M[x]$ and $B^e \otimes_{A^e} M \simeq M[x, y]$.
Other than $f$ being surjective I know of no general conditions which imply those modules are isomorphic.