Examples of Class Group I am trying to better understand how unique factorization of algebraic integers in an algebraic number ring implies that the class number of that number ring is 1.
I am asking for some examples of this to get me started.  
 A: $\rm PID\:$s are precisely the $\rm UFD\:$s having dimension $\le 1\ $ (i.e. every nonzero prime ideal is maximal). Therefore $\rm UFD $ Dedekind domains are $\rm PID\:,$ so they have trivial class group. Here's the key result:
THEOREM $\rm\ \ \ TFAE\ $ for a $\rm UFD\ D$ 
$1)\ $ prime ideals are maximal if nonzero
$2)\ $ prime ideals are principal
$3)\ $ maximal ideals are principal
$4)\ \rm\ gcd(a,b) = 1\ \Rightarrow\ (a,b) = 1$ 
$5)\ $ $\rm D$ is Bezout
$6)\ $ $\rm D$ is a $\rm PID$  
Proof $\ $ (sketch of $1 \Rightarrow 2 \Rightarrow 3 \Rightarrow 4 \Rightarrow 5 \Rightarrow 6 \Rightarrow 1$)
$1\Rightarrow 2)$ $\rm\ \ P\supset (p)\ \Rightarrow\ P = (p)$ 
$2\Rightarrow 3)$ $\ \: $ Clear.
$3\Rightarrow 4)$ $\ \ \rm (a,b) \subsetneq P = (p)\ $ so $\rm\ (a,b) = 1$ 
$4\Rightarrow 5)$ $\ \ \rm c = \gcd(a,b)\ \Rightarrow\ (a,b) = c\ (a/c,b/c) = (c)$ 
$5\Rightarrow 6)$ $\ \ \rm 0 \ne I \subset D\:$ Bezout is generated by an elt with the least number of prime factors
$6\Rightarrow 1)$ $\ \ \rm P \supset (p),\ a \not\in (p)\ \Rightarrow\ (a,p) = (1)\ \Rightarrow\ P = (p)$
A: I'm not sure what you mean by giving you examples... the abstract argument seems simple enough to me:
Every principal ideal that is generated by a prime element is a prime ideal: suppose $ab\in (p)$; then $p|ab$, and since $p$ is prime, $p|a$ or $p|b$, so $a\in (p)$ or $b\in (p)$. Conversely, a nonzero principal ideal is prime if and only if the generator is a prime element.
Suppose $\mathfrak{M}$ is a maximal ideal of the number ring; let $a\in\mathfrak{M}$. Then $a = p_1\cdots p_k$ for some primes $p_i$ by unique factorization into primes, hence $(a) = (p_1\cdots p_k) = (p_1)(p_2)\cdots(p_k)\subseteq \mathfrak{M}$. Since $\mathfrak{M}$ is maximal, it is prime, so there exists $i$ such that $(p_i)\subseteq \mathfrak{M}$. But since $p_i$ is a prime element, then $(p_i)$ is a prime ideal, and in a number ring every nonzero prime ideal is maximal; hence $\mathfrak{M}=(p_i)$. Therefore, every maximal ideal is principal; in particular, every nonzero prime ideal is principal, since nonzero prime ideals are maximal. 
Now let $\mathfrak{I}$ be any ideal; if $\mathfrak{I}=(0)$, then it is principal. Otherwise, $\mathfrak{I}$ is a product of prime ideals by the Fundamental Theorem of Dedekind Domains, so $\mathfrak{I}=(p_1)\cdots (p_k)$ with $p_i$ a prime element (since primes are maximal, which are principal, and therefore generated by prime elements); but $(p_1)\cdots(p_k) = (p_1\cdots p_k)$ is principal, so $\mathfrak{I}$ is principal. Thus, if you have unique factorization, then every ideal is principal, and therefore the class number is $1$: given any two nonzero ideals $\mathfrak{I}$ and $\mathfrak{J}$, we can find elements $a$ and $b$ such that $\mathfrak{I}=(a)$ and $\mathfrak{J}=(b)$, and therefore we have that $b\mathfrak{I}=a\mathfrak{J}$, hence $\mathfrak{I}\sim \mathfrak{J}$ in the ideal class group. Since this holds for any two nonzero ideals, the ideal class group consists of exactly one class. 

The key really is that you have unique factorization into prime ideals and that nonzero primes are maximal; without that, you would be out of luck. One problem with the simplest examples ($\mathbb{Z}[i]$, $\mathbb{Z}[\sqrt{-2}]$, for instance) is that are also Euclidean domains, so that's really how you get the unique factorization (as a further consequence, a prior one already being that it is a PID). I think the smallest imaginary quadratic which is a PID but not Euclidean is $\mathbb{Z}[(1+\sqrt{-19})/2]$, and I'm not sure I would want to try to work out explicitly the argument above with specific elements of that ring.
A: This is actually a frequently used (e.g. in the theory of divisors) fact of commutative algebra. A noetherian domain $A$ is a UFD if and only if every prime ideal of height one (by Krull's principal ideal theorem, this is the same thing as being minimal over a nonzero element) is principal (which corresponds, with a little work, to the statement that the Weil divisor class group of a normal ring is trivial iff it is factorial). In the case of a Dedekind domain (of which a ring of integers in a number field is a paradigm example), this means that every prime ideal is principal (as $(0)$ obviously is).
In a Dedekind domain, every ideal is a product of prime ideals. So if every prime ideal is principal, so is every ideal. This is the statement that the class number is one.
So this answers your question by reducing it to another result. You can find the proof and discussion of this result as Theorem 18.6 in 
http://people.fas.harvard.edu/~amathew/CAnotes.pdf
