Tensor product and localisation of integers I have this doubt about tensor products.
Let us fix $p$ a prime. Set $\mathbb{Z}[\frac{1}{p}]$ the localisation of $\mathbb Z$ in $p$ and $\mathbb{Z}_{(p)}$ the localisation at the prime ideal $(p)$.
Now my question is the following: 

Is the canonical morphism of $\mathbb Z$-algebras:
  $$\mathbb{Z}[\frac{1}{p}] \otimes_{\mathbb Z} \mathbb{Z}_{(p)}\rightarrow \mathbb Q$$
  induced by the multiplication $\mathbb{Z}[\frac{1}{p}] \times\mathbb{Z}_{(p)}\rightarrow \mathbb Q,\ (x,y) \mapsto xy$,
  an isomorphism?

My guess is yes for every rationnal $\frac{a}{b}$ can be factored in the form
$\prod_i p_i^{\alpha_i}$ with $\alpha_i\in\mathbb Z$, thus we can put every fraction $\frac{a}{b}$ under the form $\frac{m}{p^\alpha n}$ with $p \nmid n$ and $(m,n)=1$.
I then construct the map:
$$\frac{m}{p^\alpha n} \mapsto \frac{1}{p^\alpha}\otimes \frac{m}{n}$$
to be its inverse.
Is this a valid proof? Are ther any more elegant proofs?
 A: You have the right idea, but your proof is not complete.  You have shown that the multiplication map $f:\mathbb{Z}[1/p]\otimes_\mathbb{Z}\mathbb{Z}_{(p)}\to\mathbb{Q}$ is surjective, but you have not shown it is injective.  If you define $g:\mathbb{Q}\to \mathbb{Z}[1/p]\otimes_\mathbb{Z}\mathbb{Z}_{(p)}$ by $g(\frac{m}{p^\alpha n})=\frac{1}{p^\alpha}\otimes\frac{m}{n}$ as you suggest, then it is clear that $f\circ g$ is the identity, but it is not clear that $g\circ f$ is the identity or that $g$ is even a homomorphism.  It would suffice to prove that $f$ is injective.  You can prove this directly, but it is a bit messy.
Instead, I would suggest proving that the multiplication map $\mu:\mathbb{Z}[1/p]\times\mathbb{Z}_{(p)}\to\mathbb{Q}$ has the universal property of the tensor product.  Given a bilinear map $\nu:\mathbb{Z}[1/p]\times\mathbb{Z}_{(p)}\to A$ for some abelian group $A$, you can define $h:\mathbb{Q}\to A$ by $h(\frac{m}{p^\alpha n})=\nu(\frac{1}{p^\alpha},\frac{m}{n})$.  It is clear that this is the only possible map $h:\mathbb{Q}\to A$ such that $h\circ\mu=\nu$, so you just have to prove that $h\circ\mu=\nu$ is actually true and that $h$ is a homomorphism.  Try proving this using the bilinearity of $\nu$.
Alternatively, if you know that the tensor product of algebras is the coproduct in the category of algebras, you can prove that the inclusion maps $i:\mathbb{Z}[1/p]\to\mathbb{Q}$ and $j:\mathbb{Z}_{(p)}\to\mathbb{Q}$ make $\mathbb{Q}$ a coproduct of $\mathbb{Z}[1/p]$ and $\mathbb{Z}_{(p)}$ in the category of $\mathbb{Z}$-algebras.  That is, you want to prove that given $\mathbb{Z}$-algebra homomorphisms $a:\mathbb{Z}[1/p]\to A$ and $b:\mathbb{Z}_{(p)}\to A$, there is a unique extension of both $a$ and $b$ to a $\mathbb{Z}$-algebra homomorphism $c:\mathbb{Q}\to A$.  You can prove this using the universal property of localization, which tells you that the unique homomorphism $\mathbb{Z}\to A$ extends (uniquely) to $\mathbb{Z}[1/p]$ iff $p$ maps to a unit, extends (uniquely) to $\mathbb{Z}_{(p)}$ iff every integer not divisible by $p$ maps to a unit, and extends (uniquely) to $\mathbb{Q}$ iff every nonzero integer maps to a unit.  So you just have to prove that every nonzero integer is a unit in $A$ iff $p$ is a unit and every integer not divisible by $p$ is a unit in $A$.
