Relation between localization and colimit. I am trying to show that $S^{-1}R=\operatorname{colim}F(s)$, where $S$ is a multiplicative closed set in a commutative ring $R$ and $F$ is a functor from a filtered category $I$ to mod-$R$ and $I$ is constructed as follows: objects of $I$ are just the elements of $S$ and the morphisms are $$\operatorname{Hom}_{I}(s_{1},s_{2})=\{s \in S : s_{1}s=s_{2}\}$$
and $F$ is defined as follows: it takes $s$ to $F(s)=R$ and a morphism $s_{1}\rightarrow s_{2}$ to the multiplication by $s$ from $R\rightarrow R$.
I tried it to this way: firstly I showed that $S^{-1}R$ is co-cone with the morphism $F(s)\rightarrow S^{-1}R$ taking $1$ to $1/s$. Then I want to show that it satisfies universal property of colim. Which I am not getting.
Thanks in advance.
 A: Instead of proving the localization has the universal property of the colimit, we can do it the other way around.
I claim the canonical map $R\to \varinjlim_{s\in S}R[s^{-1}]$ induced by any principal localization $R\to R[s^{-1}]$ inverts the elements of $s$. This is a consequence of the fact the category structure you give to $S$ is filtered: each $s\in S$ is inverted by $R\to R[s^{-1}]$ and is therefore inverted "sufficiently far" down. Since all the colimit cocone maps are ring morphisms, they preserve invertibility. Thus $s$ is inverted in the colimit, and since it was arbitrary, so is all of $S$.
The universal property of $R\to R[S^{-1}]$ now defines a ring morphism $R[S^{-1}]\to \varinjlim_{s\in S}R[s^{-1}]$ making the triangle over $R$ commute (with the canonical map from the beginning of the first paragraph). Moreover - and this is crucial - the canonical maps from $R[s^{-1}]$ make the triangle commute (again by universal properties).
On the other hand, we have the canonical map $R[S^{-1}]\leftarrow \varinjlim_{s\in S}R[s^{-1}]$ induced by the universal property of the colimit from the maps $R[S^{-1}]\leftarrow R[s^{-1}]$ which are themselves induced by the universal property of the principal localizations.
Finally, we wish to prove the ring morphisms $R[S^{-1}]\leftrightarrows \varinjlim_{s\in S}R[s^{-1}]$ are mutually inverse. This also follows from universal properties. The universal property of the LHS ensures the composite giving its endomorphism is the identity (by the uniqueness part of the universal property). For the other composite (an endomorphism of the colimit), observe that all commutativity relations over principal localization ensure that composing it on the colimit cocone remains a cocone, so the uniqueness part of the universal property of the colimit ensures this composite is the identity.
We've shown both composites are identities, so the asserted maps are mutually inverse.
A: I've got a couple of solutions to this, but both use the construction of filtered colimits. I wasn't able to do this using universal properties alone. 
I'll show a little more generally that, if $M$ is a $R$-module, then $S^{-1}M = \mathrm{colim}_I F$, where $F$ is the functor from $I$ into $R$-modules such that $F(s)$ is $M$ for all $s \in I$ and the map $F(s) \to F(t)$ induced by some $u \in \mathrm{Hom}_I(s, t)$ is the multiplication by $u$ map on $M$. Recall that
$$ \mathrm{colim}_I F = \left( \coprod_{s \in I} M \right)/\sim $$
where if $(m, s) \in \coprod_{s \in I} M$, the equivalence relation identifies $(m,s)$ with $(um, us)$ for all $u \in S$. I think you've already managed to show that the maps $F(s) \to S^{-1}M$ given by $m \mapsto m/s$ define a co-cone over $F$ and therefore there is a naturally induced map $\phi : \mathrm{colim}_I F \to S^{-1} M$. It is given by mapping the equivalence class of $(m, s) \in \coprod_{s \in I} M$ in the colimit to $m/s \in S^{-1} M$. We want to show that this is an isomorphism.
Approach 1. We can show that $\phi$ is surjective and injective. From our formula for $\phi$ it is obvious that it is surjective. For injectivity, observe that if $(m, s) \in \mathrm{colim}_I F$ is such that $\phi(m, s) = m/s = 0$, then there exists $u \in S$ such that $um = 0$. But then $(m, s)$ is identified with $(um, us) = 0$ in the colimit, so this proves that the kernel of $\phi$ is trivial. 
Approach 2. We can use the universal property of $S^{-1}M$ to construct an inverse map. This universal property states that, given any morphism $\alpha : M \to N$ into an $R$-module $N$ such that multiplication by any $u \in S$ is an automorphism of $N$, there exists a unique map $\psi : S^{-1}M \to N$ such that $\psi \circ \sigma = \alpha$, where $\sigma : M \to S^{-1}M$ is the universal map $m \mapsto m/1$. Now we definitely have a map $\alpha : M \to \mathrm{colim}_I F$ given by $m \mapsto (m, 1)$. Also, observe that if $u \in S$, the multiplication by $u$ map $(m, s) \mapsto (um, s)$ is indeed an automorphism, whose inverse is the map $(m, s) \mapsto (m, us)$. So we get a unique morphism $\psi : S^{-1}M \to \mathrm{colim}_I F$ such that $\psi \circ \sigma = \alpha$. I think now you can check using the uniqueness assertions of the universal properties of $\mathrm{colim}_I F$ and of $S^{-1}M$ that we must have $\psi \circ \phi = 1$ and $\phi \circ \psi = 1$. Alternatively, more concretely, notice that $\psi$ is given by mapping $m/s \in S^{-1} M$ to the image of of $(m,1)$ under the inverse of the multiplication by $s$ map, which we saw above is exactly $(m, s)$. In other words, $\phi(m/s) = (m, s)$, and its obvious from this formula that $\phi$ and $\psi$ are inverse to one another. 
