TITLE: Why study integrality?
QUESTION [9 upvotes]: Here are a few of the basic definitions related to integrality.

(1) A polynomial in $R[x]$ is monic if its leading coefficient is $1$.
(2) An element is integral over a ring $R$ if it satisfies a monic polynomial in $R[x]$.

The above were easy to understand, and the problems I've done so far have yielded equivalent conditions with no more than a few straightforward manipulations. But, who cares if an element is integral?  Where does that get us?

(3) An extension $L$ of $R$ is integral if every element of $L$ is integral over $R$.
(4) Given an ideal $I$ of $R$, the integral closure of $I$ in $R$ is the set of elements of $R$ that are integral over $I$.

In the same vein, what is the point of studying integral extensions? Intuitively, how do they fit into the structure of the ring? What are some motivating examples of interesting or unexpected integral closures?
Note: I realize this is several questions compounded into one; however, I believe a good answer would require answering the other four, so I have asked them all in one place.

REPLY [7 votes]: Here's a nice piece of intuition I lifted from Dino Lorenzini's amazing book An Invitation to Arithmetic Geometry.
Let's suppose that you have some number field $K$ (a finite extension of $\mathbb{Q}$). For whatever reason (the solutions to Diophantine equations, say), you wanted to study some of the particular properties of $K$, or some subset of $K$. After working for a bit, you start to realize that you missed $\mathbb{Z}$. In particular, having some distinguished ring $\mathbb{Z}$ sitting inside $\mathbb{Q}$, whose fraction field was the full ring, made questions purely about $\mathbb{Q}$ easier to answer. Thus, you want some analogue of $\mathbb{Z}$ inside of $K$, call it $\mathcal{O}_K$.
So, you start to think to yourself "what properties should this $\mathcal{O}_K$ satisfy?" Well, first and foremost, the first thing we'd want (considering what we're after is)

$\text{Frac}(\mathcal{O}_K)=K$

Second we'd hope that we've chosen our 'integers' consistently so that if $L\supseteq K$, then $\mathcal{O}_K=K\cap\mathcal{O}_L$. In particular, since $\mathcal{O}_\mathbb{Q}$ should be $\mathbb{Z}$, we'd want:

$\mathcal{O}_K\cap\mathbb{Q}=\mathbb{Z}$

But, we'd want our choice of $\mathcal{O}_K$ to be canonical in some way. While there are many possibilities for what this could mean, there is one moderately obvious one. If $K/\mathbb{Q}$ is Galois, then if $R$ is any subring $R\subseteq K$ satisfying our first two conditions, then $\sigma(R)$ will be another such subring for $\sigma\in\text{Gal}(K/\mathbb{Q})$. Thus, if our choice of $\mathcal{O}_K$ should be canonical, we'd want that $\sigma(\mathcal{O}_K)=\mathcal{O}_K$ (setwise, not elementwise!) for all $\sigma$, so as to not generate other 'natural candidates' $\sigma(\mathcal{O}_K)$. So, we'd want

$\sigma(\mathcal{O}_K)=\mathcal{O}_K$ for all $\sigma\in\text{Gal}(K/\mathbb{Q})$

The last thing we'd want to require, for the same reasons of 'canonicalness', as the previous property is that:

$\mathcal{O}_K$ should be maximal with respect to these three properties

meaning that no subring of $K$ properly containing $\mathcal{O}_K$ should also satisfy these properties.
$\text{ }$
$\text{ }$
The amazing thing, is that if $K/\mathbb{Q}$ is Galois, then these four properties actually force $\mathcal{O}_K$ to be the integral closure of $\mathbb{Z}$ in $K$, which we'll call $R$. Indeed, let $\alpha\in\mathcal{O}_K$. Then, if we denote the Galois conjugates of $\alpha$ by $\alpha_1,\ldots,\alpha_n$, the minimal polynomial of $\alpha$ over $\mathbb{Q}$ is
$$\prod_{\sigma\in\text{Gal}(K/\mathbb{Q})}(T-\sigma(\alpha))=T^n+e_1(\alpha_1,\ldots,\alpha_n)T^{n-1}+\cdots+(-1)^n e_n(\alpha_1,\ldots,\alpha_n)$$
where $e_j$ is the $j^\text{th}$ elementary symmetric polynomial. In particular, using the fact that $\mathcal{O}_K$ is a ring, and the third property of $\mathcal{O}_K$, we see that the minimal polynomial for $\alpha$ has coefficients in $\mathcal{O}_K\cap$. But, the minimal polynomial over $\mathbb{Q}$ of anything has coefficients in $\mathbb{Q}$. Thus, the coefficients lie in $\mathcal{O}_K\cap\mathbb{Q}=\mathbb{Z}$. From this, we conclude that $\mathcal{O}_K$ is contained in $R$.
The first property of $\mathcal{O}_K$ forces $\mathcal{O}_K$ to be what is called an order inside of $R$. And then, the last condition forces $\mathcal{O}_K$ to be a maximal order inside of $R$ which, by some commutative algebra, must be $R$ itself. 
$\text{ }$
$\text{ }$
$\text{ }$
While this doesn't tell you why integral closure makes intuitive sense (this is best understood as a normalization procedure in algebraic geometry, as hinted at by oxeimon in their post), it does tell you why integral closure is forced upon you. Any reasonable theory of 'the integers' inside of a number field has to be, at least in the case of a Galois extension of $\mathbb{Q}$, the integral closure of $\mathbb{Z}$. 
In fact, if you demand more generally (than the second condition) that $\mathcal{O}_L\cap K=\mathcal{O}_K$, for $L\supseteq K$, then by embedding any extension in a Galois closure, you see that $\mathcal{O}_K$ must be the integral closure of $\mathbb{Z}$ in $K$ in general.
Of course, this discussion extends quite nicely to field extensions of things other than $\mathbb{Q}$.