Proving tensor product over modules is commutative and associative 
Normally I'd work with vector spaces and try something with the coordinates. But in my book, $A\otimes B$ is actually defined as:
By a tensor product (over $R$) of the modules $A$ and $B$, we mean a module $T$ over $R$ together with a bilinear function $f:A\times B \to T$ such that, for every bilinear function $g:A\times B\to X$, there exists a unique homomorphism $h:T\to X$ of the module $T$ into the module $X$ which satisfies the commutativity relation $h\circ f = g$ in the following triangle:

This module $T$ is usually denoted by the symbol $A\otimes B$ and $f$ by $\tau$
So how do I exhibit an isomorphism between $A\otimes B$ and $B\otimes A$ using this? And how about the associativity? It's not clear what should I do.
Or maybe I should just say that there is a correspondence between $A\times B$ and $B\times A$?
 A: Let's define a homomorphism $g:A \otimes B \rightarrow B \otimes A$.  The map
$$A \times B \rightarrow B \otimes A$$
$$(a,b) \mapsto b \otimes a$$
is clearly $R$-bilinear, so the universal property of $A \otimes B$ gives you a well defined homomorphism $g: A \otimes B \rightarrow B \otimes A$ defined on generators by $g(a \otimes b ) = b \otimes a$.  
Reversing the roles of $A$ and $B$, there is a well defined homomorphism $h: B \otimes A \rightarrow A \otimes B$ defined on generators by $h(b \otimes a) = a \otimes b$.  
The composition $h \circ g: A \otimes B \rightarrow A \otimes B$ is a homomorphism which sends each generator $a \otimes b$ to itself.  Hence it is the identity homomorphism.  In particular, $h$ is surjective and $g$ is injective.  Looking also at the composition $g \circ h$, you see that $g$ is surjective and $h$ is injective.  Thus $g$ and $h$ are isomorphisms which are inverse to each other.
Associativity is a little trickier.  The other answer gives a hint.
A: In your definition take $X=B\otimes A$ and $g$ the bilinear map
$(a,b)\mapsto b\otimes a$. This ensures the existence of a map
$A\otimes B\to B\otimes A$ with $a\otimes b\mapsto b\otimes a$.
Similarly there's a map the other way round, and their composition
is the identity.
For the associativity, we need to define a bilinear map
from $(A\otimes B)\times C$ to $X=A\otimes(B\otimes C)$. This is in effect
a map from $A\otimes B$ to $\text{Hom}(C,A\otimes(B\otimes C))$, and
so a bilinear map from $A\times B$ to $\text{Hom}(C,A\otimes(B\otimes C))$. This in effect is a trilinear map from $A\times B\times C$
to  $A\otimes(B\otimes C)$. This trilinear map is $(a,b,c)\mapsto
a\otimes (b\otimes c)$. This means there's a map from
$(A\otimes B)\otimes C$ to $A\otimes(B\otimes C)$ taking $(a\otimes b)\otimes c$ to $a\otimes (b\otimes c)$. Similarly there's a map
the other way, which is its inverse.
But the more natural way to think about this is categorical: both
$A\otimes B$ and $B\otimes A$ represent the functor on modules
defined by $F(M)$ is the set of bilinear maps from $A\times B$ to $M$.
Therefore $A\otimes B\cong\otimes A$ on categorical grounds.
Similarly $A\otimes(B\otimes C)$ and $(A\otimes B)\otimes C$
represent the functor of trilinear maps from $A\times B\times C$.
