The kernel and stabilizers of a group action are subgroups

Let $G$ be a group acting on a set $A$. Show that the following sets are subgroups of $G$.

1. The set $K = \{ g \in G \ |\ g \cdot a = a\ \mathrm{for\ all}\ a \in A \}$ (Called the kernel of the action
2. For a fixed $a \in A$, the set $S = \{ g \in G \ |\ g \cdot a = a \}$ (Called the stabilizer of $a$)

By a previous exercise, for each of these sets we need to show that the identity belongs to the set and that each is closed under multiplication and inversion.

1. Note that $1 \in K$ since $1 \cdot a = a$ for all $a \in A$. Now suppose $k_1, k_2 \in K$, and let $a \in A$. Then $(k_1 k_2) \cdot a = k_1 \cdot (k_2 \cdot a)$ $= k_1 \cdot a = a$, so that $k_1 k_2 \in K$. Now let $k \in K$ and $a \in A$; then $k^{-1} \cdot a = k^{-1} \cdot (k \cdot a) = (k^{-1} k) \cdot a$ $= 1 \cdot a = a$, so that $k^{-1} \in K$. Thus $K$ is a subgroup of $G$.
2. We have $1 \in S$ since $1 \cdot a = a$. Now suppose $s_1, s_2 \in S$; then we have $(s_1 s_2) \cdot a = s_1 \cdot (s_2 \cdot a)$ $= s_1 \cdot a = a$, so that $s_1 s_2 \in S$. Now let $s \in S$; we have $s^{-1} \cdot a = s^{-1} \cdot (s \cdot a)$ $= (s^{-1} s) \cdot a = a$, so that $s^{-1} \in S$. Thus $S$ is a subgroup of $G$.