Maybe you've heard about the norm of an element in Galois theory. In a typical course of Field theory and Galois theory one studies field extensions like $\Bbb{Q}(\sqrt{2})/\Bbb{Q}$. Between the different kinds of field extensions we have the finite galoisian extensions. Well this kind of extensions are very useful because they have nice properties. Associated with a finite galoisian extension $F/K$ we have the Galois group $Gal(F/K)$ wich is the group of all the $K-$automorphisms of $F$, i.e., $Gal(F/K)=\{\sigma\in Aut(F):\sigma(\theta)=\theta,\;\forall\, \theta\in K\}$.
Now for a finite galoisian extension $F/K$ with Galois group $G=\{\sigma_1,\ldots, \sigma_n\}$ we can define the norm of an element $\alpha\in F$ as $$N(\alpha)=\prod_{\sigma\in G}\sigma(\alpha)=\sigma_1(\alpha)\cdots \sigma_n (\alpha).$$
From the above formula it's easy to prove that $N$ is multiplicative. The "nice" expresion that we've got it's a particular definition of the norm because we can define it for finite but not necessarily galosian extensions, see for example here.
On the other hand we have the quadratic fields $\Bbb{Q}[\sqrt{k}]$. We call them quadratic because the degree of the extension of $\Bbb{Q}[\sqrt{k}]/\Bbb{Q}$ is $2$, so this extension is finite, and it turn out to be a galoisian extension too. Moreover, we can determine the Galois group of $\Bbb{Q}[\sqrt{k}]/\Bbb{Q}$ and it's $G=\{\text{id}, \text{conj}\}$, where $\text{id}$ is the identity morphism and $\text{conj}$ is the conjugation, namely $\text{conj}(a+b\sqrt{k})=a-b\sqrt{k}$.
Then appying the above formula we deduce that for $\alpha=a+b\sqrt{k}\in \Bbb{Q}[\sqrt{k}]$: $$N(a+b\sqrt{k})=\text{id}(a +b\sqrt{k})\text{conj}(a+b\sqrt{k})=(a+b\sqrt{k})(a-b\sqrt{k})=a^2-kb^2.$$
This formula works in particular for the subring $\Bbb{Z}[\sqrt{k}]$ of $\Bbb{Q}[\sqrt{k}]$.