A calculation of the norm of an ideal Let $L$ be a number field of degree $n$ over $\mathbb{Q}$ and $\mathfrak{a}$ a non-zero ideal of the ring of integers $\mathcal{O}_L$. Suppose that $X=\{x_1,...,x_n\}$ is a $\mathbb{Z}$-basis of $\mathcal{O}_L$, and $Y=\{y_1,...y_n\}$ is a $\mathbb{Z}$-basis of $\mathfrak{a}$.
How can one show that the norm of $\mathfrak{a}$ is equal to the absolute value of the determinant of the change of basis matrix $M=(m_{ij})$ from $Y$ to $X$? 
I can show this in the special case of a simultaneous basis, but I'm having trouble with the general case. The problem is trying to show that $$\vert\frac{\oplus_{i=1}^{n}\mathbb{Z}x_{i}}{\oplus_{i=1}^n\mathbb{Z}y_i}\vert=det(M)$$
where $y_i=\sum_{j}m_{ji}x_j$. 
Many thanks for your answers.
 A: So you're trying to show this?

Theorem. Let $G$ be a free abelian group of rank $r$, $H\le G$. Then $G/H$ is finite if and only if $G$ and $H$ are of the same rank. In this case, given two $\mathbb{Z}$-bases $X$ and $Y$ for $G$ and $H$ respectively, we can write $Y=SX$ for some invertible matrix $S$, and $|G/H|=|\text{det}(S)|$.

Let $G$ and $H$ have rank $r$ and $s$ respectively. Then we can choose $\mathbb{Z}$-bases $u_1,\dots,u_r$ of $G$ and $v_1,\dots,v_s$ of $H$ with $v_i=\alpha_iu_i$. Clearly $G/H$ is the direct product of finite cyclic groups of orders $\alpha_1,\dots,\alpha_s$, and $r-s$ infinite cyclic groups. Hence $G/H$ is finite if and only if $r=s$, and in that case $|G/H|=\alpha_1\cdots\alpha_r$.
Now
$$
\begin{align*}
u_i&=\sum b_{ij}x_j, & v_i&=\sum c_{ij}u_j, & y_i&=\sum d_{ij}v_j
\end{align*}
$$
and the matrices $B=(b_{ij})$ and $D=(d_{ij})$ are unimodular. Now $C=(c_{ij})$ is the diagonal matrix with the $\alpha_i$ down the diagonal. So $S=BCD$, and taking determinants the result follows.
