Explain why the determinant of $A$ is the index of the subring? Let $a$ be an algebraic number, whose minimal polynomial has integral coefficients. Let $K = \Bbb Q(a)$ be an algebraic number field. Let $\mathcal O_K$ be the ring of integers in this algebraic number field. Fix an basis for $\mathcal O_K$ and $\Bbb Z[a]$. Let $A$ be the matrix whose column vectors express the basis elements of $\Bbb Z[a]$ as a $Z$-linear combination of the basis for $\mathcal O_K$. Then
$\det(A) = [\mathcal O_K : \Bbb Z[a]]$
I have no idea why this is the case. Can someone explain this to me? 
 A: Expanding the comments to an answer.
As Rene pointed out this fact is a special case of a general result. Assume that $N\subseteq M$ are free abelian groups of the same rank $n$. Let $\mathcal{B}=\{x_1,x_2,\ldots,x_n\}$ be a basis of $M$,
and $\mathcal{C}=\{y_1,y_2,\ldots,y_n\}$ be a basis of $N$. As $N\subset M$ we have that 
$$
y_i=\sum_{j=1}^na_{ij}x_j
$$
for some integer matrix $A=(a_{ij})$. Everything follows from finding the Smith normal form of $A$. What that says is that there exists integer matrices $P$ and $Q$ such that
their determinants are $\pm1$ and
$$
PAQ=\left(\begin{array}{ccccc}d_1&0&0&\cdots&0\\
0&d_2&0&\cdots&0\\
0&0&d_3&\cdots&0\\
\vdots&\vdots&\vdots&\ddots&\vdots\\
0&\cdots&0&0&d_n
\end{array}\right)
$$
for some positive integers $d_i, i=1,2,\ldots,n$.
Furthermore, here $d_{i+1}\mid d_i$ for all $i$.
What this means is that if we replace $\mathcal{B}$ with $\mathcal{B}'=Q^{-1}\mathcal{B}$,
and $\mathcal{C}$ with $\mathcal{C}'=P\mathcal{C}$, the resulting bases
$\mathcal{B}'=\{x_1',x_2,\ldots,x_n'\}$ and $\mathcal{C}'=\{y_1',y_2',\ldots,y_n'\}$ are stacked, IOW $y_i'=d_ix_i'$ for all $i$.
This implies immediately that
$$
M/N\cong \Bbb{Z}_{d_1}\oplus\Bbb{Z}_{d_2}\oplus\cdots\oplus\Bbb{Z}_{d_n}.
$$
Note that as $\det P=\pm1$ and $\det Q=\pm1$, it follows that
$$
|\det(A)|=d_1d_2\cdots d_n.
$$
Your claim follows from this.
A: This is a standard argument from group theory. Let $G$ be a free abelian group on $n$ generators $x_1, \ldots ,x_n$, and $H$ a subgroup generated by $y_i=\sum a_{ij}x_j$ then the index of $H$ is the determinant of $(a_{ij})$. This can be proved by chosing a basis for $H$ which is upper diagonal. First look at all $a_1$ such that for some $a_i$, 
$a_1x_1+a_2x_2+\cdots \in H$ amongst all such ther is a least positive and chose that element of $H$ as the first element of a basis.
To elaborate on this last sentence.
let 
$$I=\{ a_1 | \exists a_2, \ldots ,a_n \in \mathbb{Z}  \ \ \text{such that } \ a_1x_1+a_2x_2+\cdots +a_nx_n \in H\}$$
$I$ is an ideal in $\mathbb{Z}$ and since every ideal in $\mathbb{Z}$ is principal
$I=(b_1)$ for some $b_1$, which we chose without loss to be positive. 
Then we see that $b_1$
 divides the first or $a_1$ coefficient of all elements of $H$.
By induction we get a basis whose $k$ th element is of the form
$b_kx_k +\cdots$ where $x_1, \ldots x_{k-1}$ do not occur.
The discriminant of this basis is $b_1b_2 \cdots b_n$ and now one can prove that the elements of the form
$$c_1x_1+c_2x_2 +\cdots +c_nx_n$$ where 
$$0\leq c_k < b_k$$ form a complete residue system. 
A: This is a heuristic argument, but it can be made rigorous without a lot of fuss.
We can think of both $\mathbb{Z}[a]$ and $\mathcal{O}_K$ as lattices in $\mathbb{Q}^n$.  The index $c=[\mathcal{O}_K : \mathbb{Z}[a]]$ measures the relative density of the lattices, that is, if we pick an element of $\mathcal{O}_K$ at random, it has a $1/c$ chance of belonging to $\mathbb{Z}[a]$.
On the other hand, $d=|\det (A)|$ (note the absolute values) measures the volume scaling of a change of basis.  That is, if we have a figure of volume $V$, and apply the change of basis matrix $A$, the new figure will have volume $d\cdot V$.
But if $A$ scales volume by a factor of $d$, it must also stretch a given lattice to one of relative density $1/d$.  In other words, $1/c=1/d$, so $c=d$.
