I was looking at the case when you go from the monoid of natural numbers to the group of integers by means of a suitable equivalence relation. The key here was to find inverses for each natural and I was wondering how it could be generalized. I mean:
Given any monoid, when can I find inverses for your elements?
In other words, can I always go from a monoid to a group? If not, when is it? When do not?
If you could tell me where I can find information about this (a book or paper) it would be very helpful. Thank you.
Yes, you can always obtain a group from a monoid, through a process that is called group completion.
In general, the completion is a process very similar to the one you cited: going from $(\mathbb N,+)$ to $(\mathbb Z,+)$ is the standard, classic example; another one is going from the monoid $(\mathbb N^\ast,\cdot)$ to its group completion $(\mathbb Q_{>0},\cdot)$.
The "easy" case is when your monoid $(M,+)$ is commutative; its group completion, sometimes called Grothendieck group (for its ties with algebraic K-theory, if I'm not mistaken), can be defined as a quotient of $M\times M$ (with coordinate-wise operation, $(m,m')+(n,n'):=(m+n,m'+n')$) by the equivalence relation described as follows: $$ (m,m')\sim(n,n') \iff \exists\;k\in M:\;m+n'+k=m'+n+k $$ Sometimes (i.e. when the cancellation law holds in $M$) the term $k$ is not necessary (you can just choose the identity of your monoid as $k$). In your original example, you have that the group completion of $(\mathbb N,+)$ is made of equivalence classes of $(m,m')\in\mathbb N^2$, where $(m,m')\sim(n,n')\iff m+n'=m'+n$, hence you can see that "$(m,m')$ basically means $m-m'$".
Notice that this procedure is very reminiscent of the construction of rational numbers! In fact, as we mentioned before, if you take as $M$ the monoid of positive integers with multiplication $(\mathbb N^\ast,\cdot)$, you get as its group completion elements of $\mathbb N^*\times \mathbb N^*$ modulo the relation: $$ (m,m')\sim(n,n') \iff m\cdot n'=m'\cdot n,$$ so $(m,m')$ is basically what we're used to denote as $\frac{m}{m'}$.
The most important application of this construction I know of is, as I mentioned early, K-groups in K-theory; for instance, real/complex vector bundles over a "nice" (e.g., compact Hausdorff) topological space, and finitely generated projective modules over a ring, up to isomorphisms, form a monoid $(M,\oplus)$ with the direct sum, and then $K_0$ is defined as the group completion of $M$.