unramified quadratic extension of number field I try to understand the following statement
There are only finitely many quadratic unramified extension of a number field $K$
I know by Kummer theory that such extensions are of the form $K(\sqrt{a})$ for some $a \in K$ such that $a$ generates $K^*/(K^*)^2$. But I can't figure out how to use this to show the claim.
 A: One can prove this directly:
Firstly, as noted by the OP, Kummer theory says that a quad. ext. is of the form $K(\sqrt{a})$ for $a \in K^{\times}/(K^{\times})^2.$
However, the condition for this extension to be unram. is mis-stated.
If $\mathfrak p$ is a prime of odd residue characteristic, then $K(\sqrt{a})$ is unramified at $\mathfrak p$ if and only if $v_{\mathfrak p}(a)$ is even.
If $\mathfrak p$ has even residue characteristic, then the condition that 
$v_{\mathfrak p}(a)$ be even is necessary, but not sufficient, for $K(\sqrt{a})$ to be unramified at $a$.
One way to exploit this information is as follows:
There is a natural map
$$K^{\times}/(K^{\times})^2 \to \oplus_{\mathfrak p} \mathbb Z/2\mathbb Z$$
(the sum begin taken over all primes)
given by $a \mapsto (v_{\mathfrak p}(a) \bmod 2)$, and the $a$ we are interested in lie in the kernel of this morphism.  Thus, if we can show this kernel is finite, we'll be done.
To analyze this kernel, let's begin with a basic exact sequence:
$$ 1 \to \mathcal O_K^{\times} \to K^{\times} \to \oplus_{\mathfrak p} \mathbb Z \to \mathrm{Cl}_K \to 0.$$
Note that $\oplus_{\mathfrak p} \mathbb Z$ is just another way of describing the group of fractional ideals, and so the maps here are the obvious ones: the inclusion of $\mathcal O_K^{\times}$ into $K^{\times}$, the map sending an element of $K^{\times}$ to the corresponding fractional ideal, and the map sending a fractional ideal to the corresponding ideal class.
First, if $\mathrm{Cl}_K$ were trivial, we would see (by tensoring this exact sequence with $\mathbb Z/2\mathbb Z$) that
$\mathcal O_K^{\times}/(\mathcal O_K^{\times})^2$ surjects onto the kernel we're interested in.  But this quotient is finite (as $\mathcal O_K^{\times}$ is f.g.), and hence so is the kernel we're interested in.
In general, $\mathrm{Cl}_K$ is finite, and so a little bit of homological argumentation shows that the cokernel of the induced map from
$\mathcal O_K^{\times}/(\mathcal O_K^{\times})^2$ to the kernel of interest is finite.  This again implies that the kernel of interest is finite.

This argument illustrates in a special case the Kummer theory arguments that appear in the proofs of class field theory.
A: Here is a proof similar to tracing's but phrased in slightly different language, and which shows that, in fact, $K$ has only finitely many quadratic extensions unramified outside of primes over $2$. 
Namely, let $U$ be $\mathrm{Spec}(\mathcal{O}_K)-S$, where $S$ is the set of primes lying over $2$. In other words, $U=D(2)$, and so is just $\mathrm{Spec}(\mathcal{O}_K[\frac{1}{2}])$. Note then that we have a surjection
$$\mathrm{Cl}(\mathcal{O}_K)\to \mathrm{Cl}(U)$$
and so $\mathrm{Cl}(U)$ is finite (this also just follows since it's a ring of $S$-integers, and so one can use the generalized version of the finiteness of the class number). In particular, we se that $\mathrm{Cl}(U)[2]$ is finite. 
So then, note that from Kummer theory we have a short exact sequence
$$1\to \mathbf{G}_m(U)/\mathbf{G}_m(U)^2\to \mathrm{Hom}_\mathrm{cont.}(\pi_1(U),\mathbb{Z}/2\mathbb{Z})\to \mathrm{Pic}(U)[2]\to 1$$
But, $\mathrm{Pic}(U)[2]=\mathrm{Cl}(U)[2]$ is finite, and $\mathbf{G}_m(U)/\mathbf{G}_m(U)^2$ is finite by the generalized version of Dirichlet's unit theorem (again, it's just a ring $S$-integers). 
Thus, we see that $\mathrm{Hom}_{\mathrm{cont.}}(\pi_1(U),\mathbb{Z}/2\mathbb{Z})$ is finite. But, this is precisely the set of quadratic extensions $L/K$ unramified outside of $S$ (i.e. unramified outside of primes dividing $2$). So, evidently the set of quadratic extensions unramified everywhere is finite. 
Of course, note that if $K\supseteq\mu_n(\overline{K})$ the above proof goes through to work for degree $n$ unramified abelian extensions.
