Computing the norm of a principal ideal in a quadratic number field The norm of an ideal $\mathfrak{a}\unlhd \mathcal{O}_K$ in a number field $K$ is defined by $N(\mathfrak{a}):=(\mathcal{O}_K:\mathfrak{a})$. One justifies this definition by the observation that 
$$
N\big((\alpha)\big)=|N_{K/\mathbb{Q}}(\alpha)|.
$$
(See Neukirch's 'Algebraic Number Theory', page 35.) I'm having some trouble computing a should-be-easy example of this 'justification' for non-integer values of $\alpha$. In what follows, let's take $K=\mathbb{Q}(i).$ 
Example that I understand: If $\alpha=5$ then we know from looking at the characterization of $N_{K/\mathbb{Q}}$ in terms of embeddings into $\overline{\mathbb{Q}}$ that $N_{K/\mathbb{Q}}(5)=25$. To compute the ideal norm, we know $\mathcal{O}_K=\mathbb{Z}[i]$ has integral bases $1,i$ and so $(5)$ has $\mathbb{Z}$-basis $5,5i$. So $\mathcal{O}_K=\mathbb{Z}+i\mathbb{Z}\cong \mathbb{Z}^2$ and $(5)=5\mathcal{O}_K\cong 5\mathbb{Z}^2$. Since
$$
\frac{\mathcal{O}_K}{5\mathcal{O}_K}\cong\frac{\mathbb{Z}\oplus \mathbb{Z}}{5\mathbb{Z}\oplus 5\mathbb{Z}}\cong \mathbb{Z}/5\mathbb{Z}\oplus \mathbb{Z}/5\mathbb{Z}\
$$
we get $N\big((\alpha)\big)=25$ as well. 
Example where I need help: 
Now let's take $\alpha=2+i$. In this case, $$N_{K/\mathbb{Q}}(\alpha)=(2+i)(2-i)=5,$$ but I can't seem to show that $N\big((\alpha)\big)=5$. The issue is that I can't seem to get a nice $\mathbb{Z}$-basis for $\mathbb{Z}[i]$ so that the basis elements for $(\alpha)$ are just integer multiples of the basis for $\mathbb{Z}[i]$, as in the previous example. More clearly, I'd like some integral basis $v_1,v_2\in \mathbb{Z}[i]$ so that $\alpha v_i=d_iv_i$, $i=1,2$. If I can find such a basis then 
$$
(\alpha)=\alpha\mathcal{O}_K=\mathbb{Z} \alpha_1v_1+\mathbb{Z} \alpha_2v_2=\mathbb{Z} d_1v_1+\mathbb{Z} d_2v_2,
$$
in which case it would follow that 
$$
\frac{\mathcal{O}_K}{\alpha\mathcal{O}_K}\cong \frac{\mathbb{Z}\oplus \mathbb{Z}}{d_1\mathbb{Z}\oplus d_2\mathbb{Z}},
$$
which would allow me to compute the ideal norm easily (it would just be the determinant $d_1d_2$, which I know has to be 5). At this point, I feel like it should be an easy linear algebra problem (Smith normal form??), but I can't get it to work. I would appreciate a refresher of how these types of computations work, particularly the linear algebra details. 
 A: First, here's a quicker way to compute the norm of $(2 + i)$. Since $\mathbb{Z}[i] \cong \frac{\mathbb{Z}[x]}{(x^2+1)}$, then the Third Isomorphism Theorem implies
\begin{align*}
\frac{\mathbb{Z}[i]}{(2+i)} &\cong \frac{\mathbb{Z}[x]/(x^2+1)}{(2 + x, x^2+1)/(x^2+1)} \cong \frac{\mathbb{Z}[x]}{(2+x, x^2 + 1)} \cong \frac{\mathbb{Z}[-2]}{((-2)^2 + 1)} = \frac{\mathbb{Z}}{(5)} \, .
\end{align*}
One can certainly compute the norm as you have suggested. As you indicated,
$$
(2 + i)\mathbb{Z}[i] = (2+i) (\mathbb{Z} \oplus i \mathbb{Z}) = (2+i) \mathbb{Z} \oplus (-1+2i) \mathbb{Z}
$$
as $\mathbb{Z}$-modules. Since
$$
2 + i = \begin{pmatrix} 2 & 1 \end{pmatrix} \begin{pmatrix} 1\\ i \end{pmatrix} \quad \text{and} \quad -1 + 2i = \begin{pmatrix} -1 & 2 \end{pmatrix} \begin{pmatrix} 1\\ i \end{pmatrix}
$$
then the ideal $(2+i)$ is represented by the matrix
$$
A = 
\begin{pmatrix}
2 & 1\\
-1 & 2
\end{pmatrix}
$$
with respect to the basis $1,i$. You are correct that the Smith normal form $D$ of this matrix $A$ will allows us to see the structure of the quotient. We can compute this by using row and column operations, and if we augment $A$ with identity matrices we can simultaneously obtain the change of basis matrices $P, Q$ such that $PAQ = D$.
\begin{align*}
\left(\begin{array}{rr|rr}
1 & 0 & 2 & 1 \\
0 & 1 & -1 & 2 \\ \hline
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{array}\right)
&\leadsto       
\left(\begin{array}{rr|rr}
1 & 1 & 1 & 3 \\
0 & 1 & -1 & 2 \\ \hline
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{array}\right)
\leadsto
\left(\begin{array}{rr|rr}
1 & 1 & 1 & 0 \\
0 & 1 & -1 & 5 \\ \hline
0 & 0 & 1 & -3 \\
0 & 0 & 0 & 1
\end{array}\right)\\
&\leadsto
\left(\begin{array}{rr|rr}
1 & 1 & 1 & 0 \\
1 & 2 & 0 & 5 \\ \hline
0 & 0 & 1 & -3 \\
0 & 0 & 0 & 1
\end{array}\right)
\end{align*}
From this we can already see that
$$
\frac{\mathbb{Z}[i]}{(2+i)} \cong \frac{\mathbb{Z} \oplus \mathbb{Z}}{\mathbb{Z} \oplus 5 \mathbb{Z}} \cong \frac{\mathbb{Z}}{5\mathbb{Z}}
$$
as $\mathbb{Z}$-modules. Moreover, $P^{-1}$ gives us a basis $v_1, v_2$ for $\mathbb{Z}[i]$ such that $(2+i) = \mathbb{Z} v_1 \oplus \mathbb{Z} 5 v_2$. (For more details, see this post.) Since
$$
P^{-1} =
\left(\begin{array}{rr}
2 & -1 \\
-1 & 1
\end{array}\right)
$$
we find that $v_1 = 2 - i$ and $v_2 = -1 + i$.
For more on Smith normal form, I recommend this note by Keith Conrad, and this post.
