Equivalence of elements in a ring of fractions Let $R$ be a commutative ring and $S \subseteq R$ its multiplicative subset. The equivalence relation on $R \times S$ used in the definition of the ring of fractions $RS^{-1}$ is defined as follows:
$(r,s) \sim (r',s')$ iff there exists $x \in S$ such that $(rs' - r's)x = 0$.
Why do I need the element $x$? Why it's not defined simply as "iff  $rs' - r's= 0$"?
 A: Let's try to prove that $\sim$ is transitive without the element $x$ in the definition:
$$(r_1,s_1)\sim(r_2,s_2),\quad (r_2,s_2)\sim(r_3,s_3)\iff r_1s_2-r_2s_1=0,\quad r_2s_3-r_3s_2=0$$
However, there's no way of manipulating these two equations to get $r_1s_3-r_3s_1=0$.
If we use the standard definition, we can use that
$$s_3(r_1s_2-r_2s_1)=0,\quad s_1(r_2s_3-r_3s_2)=0\implies s_2(r_1s_3-r_3s_1)=0$$
to conclude that $(r_1,s_1)\sim(r_3,s_3)$.
A: Question: "Can someone give me some motivation to why the relation is modified in this way?Also,I want to know what localization means geometrically in the context of algebraic geometry."
Answer: If $S \subseteq A$ is a multiplicative subset it follows the localized ring $S^{-1}A$ satisfies the following universal property: For any map of commutative rings $f:A \rightarrow B$ where
$$f(s)\text{ is a unit for all }s\in S,$$
$$f(a)=0\text{ it follows there is an element $s\in S$}as=0$$
$$\text{Every element $b\in B$ is of the form $f(a)f(s)^{-1}$}$$
there is a unique isomorphism of rings $F: S^{-1}A \rightarrow B$ such $F \circ p =f$ where $p: A \rightarrow S^{-1}A$ is the canonical map. This property characterize the localization up to isomorphism.
This enables you to localize rings that are not integral domains, and this agrees with your "topological intuition". If $\mathfrak{p} \in U \subseteq Y:=Spec(T)$ with $U$ an open set you get isomorphisms
$$\mathcal{O}_{Y, \mathfrak{p} } \cong \mathcal{O}_{U,\mathfrak{p} }$$
of local rings.
Example: Direct sums. The prime ideals in the direct sum $R:= A\oplus B$ are of the form $I:=\mathfrak{p}⊕B$ (or vice versa), and if you localize $R$ at $I$ you get
$$R_I≅A_{\mathfrak{p}}.$$
The isomorphism $R_I \cong A_{\mathfrak{p}}$ agrees with the intuition that the stalk at a point can be calculated using any open set containing the point: $X_1 \subsetneq X$ is an open subset and you may restrict to $X_1$ to calculate the local ring at $I$: There is an isomorphism
$$R_I \cong \mathcal{O}_{X,I} \cong \mathcal{O}_{X_1, \mathfrak{p}} \cong A_{\mathfrak{p}}.$$
