  Let $D$ be a square-free integer other than 1. Let $K$ be the quadratic field
${\mathbb Q}(\sqrt D)$. Let $\delta \in \{1,2\}$ with $\delta=2$ if $D\equiv 1
\pmod 4$. To each prime ideal $\mathcal P$ in $K$ that splits in $K/\mathbb Q$
we associate a binary quadratic form $f_{\mathcal P}$ and show that when $K$ is
imaginary then $\mathcal P$ is principal if and only if $f_{\mathcal P}$
represents $\delta^2$, and when $K$ is real then $\mathcal P$ is principal if
and only if $f_{\mathcal P}$ represents $\pm \delta^2$. As an application of
this result we obtain an elementary proof of the well-known theorem on the
imaginary quadratic fields with class number 1. The proof reveals some new
information regarding necessary conditions for an imaginary quadratic field to
have class number 1 when $D\equiv 1 \pmod 4$.
