From the previous math post, the map from the unit group of a number field K of degree *n* over **Q** to the vector space **R**^*n* has an image with the structure of **Z**^*q* where *q* <= *n*. In fact, we can say more: if K has *r* real conjugates and 2*s* complex ones, then since the map sends the unit group to a subspace of **R**^*n* of dimension *r* + *s* – 1, we can say that *q* <= *r* + *s* – 1; this is because **Z**^*q* is a lattice.

In addition, take any set of units C mapping to an integral basis of **Z**^*q*, as well as the set of all roots of unity of K. These generate the group of units O(K)*, because if *u* is any unit, then *f*(*u*) can be written in terms of the integral basis, so that *u* has the same image as some product of elements of C, call it *t*. Then *u*/*t* has image 0, so it’s a root of unity *t’*, and *u* = *tt’*. There are only finitely many roots of unity in K, so O(K)* is finitely generated, which means it’s a product of cyclic groups.

Also, the group of roots of unity is cyclic, i.e. it has the structure of **Z**/*m***Z** for some *m*. To see why, note that it’s a product of cyclic groups, because it’s a finite abelian group. If *a* and *b* are coprime then **Z**/*ab***Z** is the same as **Z**/*a***Z** * **Z**/*b***Z** because (1, 1) generates the entire latter group; so in fact, the group of roots of unity is a product of cyclic groups of size *p*^*k* where *p* is prime. For some *p* we can’t have two groups of size *p*^*k*, because that means the group has a subgroup **Z**/*p***Z** * **Z**/*p***Z**, which means that there are *p*^2 > *p* different *p*th roots of unity, which contradicts the fact that there are at most *p* different roots of the polynomial *x*^*p* – 1. Then we can recombine all the cyclic groups and get one big cyclic group for the group of roots of unity.

Given that, it’s pretty straightforward to show that the structure of O(K)* is **Z**^*q* * W, where W is the group of roots of unity. The trick is now to show that *q* = *r* +* s* – 1. For that, let’s just look at the first *g* = *r* + *s* – 1 coordinates in **R**^*n*; the next one is determined by *x*1 + *x*2 + … + *x*(*r*) + 2*x*(*r*+1) + … + 2*x*(*r*+*s*) = 0, and the rest are determined by *x*(*r*+*s*+*k*) = *x*(*r*+*k*). For a start, I’ll only show that there exists one unit that’s not a root of unity when *g* > 0. The notation *g* has no special significance; I’m only using it here for convenience.

If *c*1, *c*2, …, *c*(*g*) are real constants not all of which are 0, then there exists at least one unit *u* such that F(*u*) = *c*1*log|*w*1(*u*)| + … + *c*(*g*)*log|*w*(*g*)(*u*)| is not 0. This unit can’t be a root of unity because then |*w*(*i*)(*u*)| would be 1 for all *i*, so F(*u*) would be 0.

We can always find positive constants *t*1, *t*2, …, *t*(*g*) such that *c*1log|*t*1| + … + *c*(*g*)log|*t*(*g*)| = 2*bh*, where *h* is some positive integer and *b* is a fixed constant large enough to be strictly bigger than log|*d*|*(|*c*1| + … + |*c*(*g*)|) (*d*^2 is the discriminant of K). Given these *t*(*i*)’s, we can find some *t*(*r*+*s*) that will make sure that *t*1*…**t*(*r*+2*s*) = |*d*| where *t*(*r*+*s*+*k*) = *t*(*r*+*k*). Then for each *h*, we can find some nonzero *y*(*h*) in O(K) whose *i*th conjugate is bounded by *t*(*i*), by the complex form of Minkowski’s linear forms theorem.

Now, for a fixed *h*, we have F(*y*) = *c*1*log|*w*1(*y*)| + … + *c*(*g*)*log|*w*(*g*)(*y*)|, so that |F(*y*) – 2*bh*| = |*c*1(log|*w*1(*y*)| – log|*t*1|) + … + *c*(*g*)(log|*w*(*g*)(*y*)| – log|*t*(*g*)|)| <= |*c*1|*log|(*w*1(*y*))/*t*1| + … + |*c*(*g*)|*log|(*w*(*g*)(*y*))/*t*(*g*)| <= (|*c*1| + … + |*c*(*g*)|)|*d*| < *b* because log|*w*(*i*)(*y*)/*t*(*i*)| <= log(1) = 0 < log|*d*| from *w*(*i*)(*y*) <= *t*(*i*) and -log|*d*| = log|1/*d*| = log|1/*t*1*…**t*(*n*)| <= log|1/*w*1(*y*)*…**w*(*i*-1)(*y*)**t*(*i*)**w*(*i*+1)(*y*)*…**w*(*n*)(*y*)| <= log|*w*(*i*)(*y*)/*t*(*i*)| since *w*1(*y*)*…**w*(*n*)(*y*) = N(*y*) >= 1.

What that monstrosity tells us is that F(*y*(*h*)) is within *b* units of 2*bh*, so that it’s between (2*h*-1)*b* and (2*h*+1)*b* noninclusive. In particular, the F(*y*(*h*))’s are all different. In K, at least one quotient *y*(*h*1)/*y*(*h*2) must be a unit: all *y*(*h*)’s have norm at most |*d*|, so they can only generate finitely many ideals in O(K), so that we must have *y*(*h*1) and *y*(*h*2) are associated for some *h*1 != *h*2 (since elements of a ring are associates iff they generate the same ideal). But F(*y*(*h*1)/*y*(*h*2)) = F(*y*(*h*1)) – F(*y*(*h*2)) != 0 since the F(*y*(*h*))’s are all different. That unit satisfies the conditions of the theorem.

Finally, we can inductively build more and more units until we have *g* different ones whose images under *f* are linearly independent. We already have a first unit, say for *c*1 = 1 and *c*2 = *c*3 = … = *c*(*g*) = 0. Given *k* units, the trick is to set *c*(*i*) to 0 for *i* > *k*+1 and to set the other *c*(*i*)’s in such a way that a nonzero sum will imply that the matrix representing the *k*+1 units has nonzero determinant. For example, if the first unit is *u*1, then the second could have *c*1 = -log|*w*2(*u*1)| and *c*2 = log|*w*1(*u*1)| so that the matrix [log|*w*1(*u*1)|, log|*w*1(*u*2)|; log|*w*2(*u*1)|, log|*w*2(*u*2)|] has nonzero determinant. This works as long as *k* < *g*, so there are *g* linearly independent units.

The nightmare above proves that the unit group of a ring of integers of a number field with *r* + 2*s* conjugates is W * **Z**^(*r*+*s*-1). Unfortunately, actually finding an integral basis for **Z**^(*r*+*s*-1) is annoyingly difficult. For some fields it’s easy – for example, it’s possible to prove that in **Z**[SQRT(2)], there’s no unit between 1 and 1 + SQRT(2) – but in general it’s not. It’s relatively easy given some constant depending only on K called the regulator. It turns out that the matrix corresponding to an integral basis of units always has the same determinant up to taking absolute values, so the absolute value of the determinant is given that special name. However, actually computing the regulator is, again, difficult.