# Why is the determinant equal to the index?

Let $A \subset B$ be integral domains and assume $B$ is a free $A$-module of rank $m$. Define the discriminant of $m$ elements $b_1,\dots,b_m\in B$ as $D(b_1,\dots,b_m)=\det(\operatorname{Tr}_{B/A}(b_ib_j))$. A standard result says that if $c_j=\sum a_{ji}b_i$ then $$D(c_1,\dots,c_m)=\det(a_{ij})^2 D(b_1,\dots,b_m).$$ However, there's a result I don't understand. Milne states that if $A=\mathbb{Z}$, then the elements $\gamma_1,\dots, \gamma_m$ generate a submodule $N$ of finite index if and only if $D(\gamma_1, \dots, \gamma_m)\neq 0$. So far so good. However, he then claims that $$D(\gamma_1,\dots, \gamma_n)=(B:N)^2 \operatorname{disc}(B/\mathbb{Z}).$$ I don't see how the determinant of a change-of-basis matrix relates to the index of a submodule. Could someone explain this?

Thanks. (NB: This is from page 28 in Milne's notes)

-
For a self-contained proof of this theorem, see theorem 1.17 in Stewart & Tall's Algebraic Number Theory (3rd. ed). –  lentic catachresis Apr 21 '13 at 23:44

$\newcommand\ZZ{\mathbb{Z}}$Suppose $\Gamma\subseteq\ZZ^n$ is a subgroup of finite index, so that it is in fact the image of some linear map $\ZZ^n\to\ZZ^n$ which is, in turn, given by multiplication by a matrix $A\in M_n(\ZZ)$.
According to the theory of the Smith normal form, there exist $P$, $Q\in\mathrm{GL}_n(\ZZ)$ such that $D=PAQ$ is diagonal. It is easy to see that the index of $\Gamma=A\ZZ^n$ is the same as the index of $D\ZZ^n$, which is easily seen to be the absolute value of the product of the diagonal entries in $D$, which is the same as $|\det D|$. Since $P$ and $Q$ have determinant $\pm1$, we conclude that the index of $\Gamma$ is $|\det A|$.