Confused about the splitting of 2 in $\mathbb{Q}(i).$

That's because it's a ramifying ideal, not a splitting ideal. Any time you have $\langle p \rangle = \mathfrak P^2$ in $\textbf Q(\sqrt d)$, the ideal is ramifying rather than splitting.

This is easier to see when $\gcd(p, d) > 1$. For example, consider $\langle 13 \rangle$ in $\textbf Z[\sqrt{-13}]$. Obviously $(-1)(\sqrt{-13})^2 = 13$ and so $\langle 13 \rangle = \langle \sqrt{-13} \rangle^2$.

It is much less obvious that $\langle 2 \rangle = \langle 2, 1 + \sqrt{-13} \rangle^2$. Since $(1 - \sqrt{-13})(1 + \sqrt{-13}) = 14$, one might think that $\langle 2 \rangle$ splits. However, since $\langle 2, 1 + \sqrt{-13} \rangle$ consists of all numbers of the form $2x + (y + y \sqrt{-13})$, where both $x$ and $y$ are arbitrary numbers in $\textbf Z[\sqrt{-13}]$, it follows that $\langle 1 - \sqrt{-13} \rangle \subset \langle 2, 1 + \sqrt{-13} \rangle$ since $2(-\sqrt{-13}) + (1 + \sqrt{-13}) = 1 - \sqrt{-13}$, thus confirming that $\langle 2 \rangle = \langle 2, 1 + \sqrt{-13} \rangle^2$. We could just as easily express it as $\langle 2 \rangle = \langle 2, 1 - \sqrt{-13} \rangle^2$ if we want.

Of course $\textbf Z[\sqrt{-1}]$ "enjoys" unique factorization (a silly choice of word), vastly simplifying things for us. Since $(1 - i)(1 + i) = 2$ rather than some larger even composite number...

I guess I better stop there, since I'd just be repeating Robert's answer. Except for this point about ramifying and splitting, I think Robert's answer and David's comment pretty much cover everything. (David's no relation to me). Well, there is one point that's still missing...


$\langle 1 - i \rangle$ is in fact a maximal ideal. Do notice that $\langle 1 - i \rangle \subseteq \langle 1 + i \rangle$ since $$\frac{1 - i}{1 + i} = -i.$$ Wait, did I get dyslexic? $$\frac{1 + i}{1 - i} = i.$$ So in fact $\langle 1 - i \rangle = \langle 1 + i \rangle$.

Furthermore, this ideal contains every Gaussian integer of even norm, but no Gaussian integer of odd norm.

Add 1 to any Gaussian integer of even norm and you get a Gaussian integer of odd norm. Add 1 again and you have another Gaussian integer of even norm.

Therefore, $\langle 1 - i \rangle$ is as large as it can possibly be without being the whole ring. Textbook maximal ideal.