Localisation of a ring I’m not sure exactly about the conditions needed for a subset $S$ to localise a ring $R$. I know $S$ has to be multiplicative. But does $S$ also have to be a subset of the non-zero divisors of $R$ or does it have to be a subset of the group of units of $R$?
I can’t find a clear answer. 
 A: Localisation is defined for any commutative ring with identity $R$, and for any multiplicatively closed subset $S \subset R$: $1 \in S$ and $s,t \in S$ implies $st \in S$.
In fact the inclusion homomorphism $R \rightarrow S^{-1}R$ is injective if and only if $S$ contains no zero divisiors, and $S^{-1}R = 0$ if and only if $S$ contains $0$.
A: Classical localization can be extended to noncommutative rings using the Ore conditions.  They are a set of sufficient conditions to guarantee that the classical construction works, at least on one side.
That is if you have a subset $S$ of a ring $R$ that is


*

*Multiplicatively closed;

*satisfies $aS\cap sR\neq \emptyset$ for every $s\in S$ and $a\in R$;

*If $s\in S$ and $a\in R$ and $sa=0$, there exists a $u\in S$ such that $au=0$.


When $R$ is commutative the second and third conditions are automatically satisfied for any nonempty multiplicative set. 

does  also have to be a subset of the non-zero divisors of  

No, for example consider the ring $R=F[x,y]/(xy)$, for which the nonnegative powers of $x$ (in the quotient) form a multiplicative set entirely of zero divisors.  The thing is that some elements will collapse to zero: for example $y=\frac{y}{1}=\frac{xy}{x}=\frac 0 x=0$ ($x,y,1$ the images in $R$ of the original $x,y,1$ in $F[x,y]$.)  If you have two things that annihilate each other in the multiplicative set, then you have $0$ in there too and that makes everything collapse.
The thing is that the collection of (left and right) regular elements of a ring is automatically multiplicatively closed, so they make a convenient multiplicative subset.

or does it have to be a subset of the group of units of ?

You can, but it is more interesting to include things that aren't units in the multiplicative set, because they become units in the localization.
A: The only thing that is "forbidden" is that $0\in S$ or otherwise the localized ring is the $0$-ring. Also you better have $1\in S$ (or to be precise in the saturation of $S$) or else the canonical map
$$
\phi:A\longrightarrow S^{-1}A,\qquad \phi(a)=\frac a1
$$
is not defined.
Of course $S$ can contain zero-divisors, but be aware that when $A$ is not a domain the equivalence relation on $A\times S$ that leads to $S^{-1}A$ by taking quotient is
$$
(a,s)\sim(a',s')\Longleftrightarrow\text{$t(as'-a's)=0$ for some $t\in S$}.
$$
This is forced because if you ask just that $as'-a's=0$ (like when one constructs the field of fractions of a domain) you don't get a transitive relation.
It is now straightforward to check that if $t\in S$ is a zero-divisor then $\phi(t)=0$.
