# Showing equality of a certain ring and a field

Let $K \subset E$ be a field extension and $S \subset E$ then define $K[S]$ and $K(S)$ as the smallest subring and subfield of E respectively that contains K and S. I want to show the following equalities:

$K[S]$={$f(a_1,...,a_n)|f\in K[X_1,...,X_n], a_1,...,a_n\in S$}

$K(S)$={$f(a_1,...,a_n)/g(b_1,...,b_n)|f\in K[X_1,...,X_n], a_1,...,a_n,b_1,...,b_n\in S$}

One inclusion "$\subset$" is very easy. How to show the other one?

-

In both instances it should be straightforward to show that any element of the RHS is in the LHS. Next show that the RHS is a ring (field) containing $S$ and deduce that since its contained in the smallest ring (field) containing $S$ it must be $K[S]$ $(K(S))$.