Let $S$ be a multiplicative subset of a commutative ring $R$.
(i) If $I$ is an ideal in $R$, then $S^{-1}I = \{a/s \mid a\in I;s\in S\}$ is an ideal in $S^{-1}R$.
(ii) If $J$ is another ideal in $R$, then $$S^{-1}(I+J)=S^{-1}I+S^{-1}J;$$ $$S^{-1}(IJ)=(S^{-1}I)(S^{-1}J);$$ $$S^{-1}(I\cap J)=S^{-1}I\cap S^{-1}J.$$
Remarks: $S^{-1}I$ is called the extension of $I$ in $S^{-1}R$. Note that $r/s\in S^{-1}I$ need not imply that $r\in I$ since it is possible to have $a/s = r/s$ with $a\in I$, $r\notin I$.
Proof: Use the facts that in $S^{-1}R$, $$\sum_{i=1}^n(c_i/s)=(\sum_{i=1}^nc_i)/s;$$ $$\sum_{j=1}^m(a_jb_j/s)=\sum_{j=1}^m (a_j/s)(b_js/s);$$ and $$\sum_{i=1}^t(c_k/s_k)=\left(\sum_{k=1}^tc_ks_1s_2\cdots s_{k-1}s_{k+1}\cdots s_t\right)/s_1s_2\cdots s_t.$$
At first glance, this theorem seemed trivial until I read remark. It’s proof involve some subtlety. To be precise, addition and multiplication are well defined binary operations. I proved (i) and first two equality of (ii). For last equality, $S^{-1}(I\cap J)\subseteq S^{-1}I\cap S^{-1}J$ follows easily. I can’t prove inclusion in another direction ($\supseteq$). Let $r/s \in S^{-1}I \cap S^{-1}J$. Then $r/s=a/u=b/v$, for some $a\in I$, $b\in J$, and $u,v\in S$. My intuition says that I should write $r/s$ in the form $ab/w$, because $ab\in I\cap J$. I am unable to form desired equation.
Assume $x=\frac{a}{s}=\frac{b}{t}$ where $a\in I, b\in J$. By definition this means there is some $u\in S$ such that $u(at-bs)=0$. Then we get:
$atu=bsu.$
Note that this implies the element $atu$ belongs to $I\cap J$, because it is both a multiple of $a$ and a multiple of $b$. And since $tu\in S$, we can divide by $tu$. Thus:
$x=\frac{a}{s}=\frac{atu}{stu}\in S^{-1}(I\cap J).$