Geometric interpretation of discriminant of a number field (and reference suggestion) I recently finished a good chunk of Vakil's Algebraic Geometry book (edit: at the time of writing this question I had finished up to chapter 19 and the answer is the content of chapter 21) and am now brushing up on number theory with Milne's Algebraic Number Theory book, trying to relate things back to geometry when I can.  I noticed something which I find pretty fascinating.
Let $\alpha$ be an algebraic integer with minimal polynomial $f$.  Then we have
$$
\mathbb{Z} \to \mathbb{Z}[y] \to \mathbb{Z}[\alpha]\left(\cong \mathbb{Z}[y]/(f)\right)
$$
We know $\operatorname{spec}\mathbb{Z}[y]$ is 2-dimensional, so we can pretend its a plane (I think).  Then we have $\operatorname{spec}\mathbb{Z}[\alpha]$ is a "plane curve" cut out by $f$ with a projection onto the "x-axis", $\operatorname{spec}\mathbb{Z}$.
Here is the analogy.  For an affine plane curve $C$ over $k$ cut out by a polynomial in two variables, we could consider $\left(\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}\right)$, which points normal to $C$ where it is non-singular.  In particular, $\frac{\partial f}{\partial y}$ vanishes at singularities of $C$ and points where the tangent line is vertical, that is, ramification points of the projection onto $\operatorname{spec}k[x]$.
Allow me to make some leaps and argue by analogy.  Let $\pi:\operatorname{spec}\mathbb{Z}[\alpha]\to\operatorname{spec}\mathbb{Z}$ be the original projection.  Even though $\operatorname{spec}\mathbb{Z}[y]$ doesn't have an "x-derivative", the y-direction still seems very much like a legitimate y-direction, with derivative $f'$, so we expect, for instance in the non-singular case where $\mathcal{O}_{\mathbb{Q}[\alpha]} = \mathbb{Z}[\alpha]$, that $\pi$ ramifies at precisely $\pi V(f'(\alpha))$.  But this is basically just the theorem that ramifying primes contain the discriminant!  Furthermore, in the singular (still planar) case where $\mathcal{O}_{\mathbb{Q}[\alpha]} = \mathbb{Z}[\frac{\alpha}{m}]$, its an easy exercise to show that primes dividing $m$ are below a singularity in $\operatorname{spec}\mathbb{Z}[\alpha]$.  By the formula relating the discriminant of subrings of the ring of integers, and the fact that the discriminant is generated by the norm of $f'(\alpha)$, we see that $\pi V(f'(\alpha))$ is precisely the ramifying points of $\pi$ plus the points with singularities in their preimage.  So by pretending that $f'$ is the derivative in the y-direction, we can say utter nonsense and end up with the right answer...
My questions, then:

*

*Can this nonsense be made into a proof?  Perhaps by passing to an actual field without lowering the dimension somehow?

*Is there a notion of $\frac{\partial f}{\partial x}$?

*Does this approach have a name?  Is there an introductory algebraic number theory textbook that takes this approach?

Thanks!
 A: Question: "Can this nonsense be made into a proof? Perhaps by passing to an actual field without lowering the dimension somehow?"
You find an "elementary" discussion of the tangent and cotangent space at this thread:
$aX + bY$ is an element of $M^2$ if and only if the line $aX + bY = 0$ is tangent to $W$ at $(0, 0)$
Example: A regular curve over a field $k$: If $C \subseteq \mathbb{A}^2_k$ is a plane regular curve over a algebraically closed field $k$ of characteristic zero, and if $p \in C$ is a point with maximal ideal $\mathfrak{m}_p:=(x-a,y-b)$ it follows the line
$$l(x,y):=u(x-a)+v(y-b)$$
is tangent to $C$ at $p$ iff $l(x,y) \in \mathfrak{m}_p^2$. A generator for the tangent line to $C$ at $p$ is the line defined by the polynomial
$$l_p(x,y):=F_x(p)(x-a)+F_y(p)(y-b)$$
where $F_x(p)$ is the partial derivative of $F(x,y)$ evaluated at $p$ etc. The curve $C$ is defined by the polynomial $F(x,y)$. Hence the line $l(x,y)$ is in $\mathfrak{m}_p^2$ iff $l(x,y)$ is a scalar mutiple of $l_p(x,y)$.
Example: Algebraic number theory: In your case of the ring of integers $\mathcal{O}:=\mathbb{Z}[i]$ in a number field $K:=\mathbb{Q}(i)$ you must check that $\mathfrak{m}_x:=(a+bi) \subseteq \mathcal{O}$  generate a maximal ideal and calculate the two $\kappa(x)$-vector spaces
$$Hom_{\kappa(x)}(\mathfrak{m}_x/\mathfrak{m}_x^2, \kappa(x)), \mathfrak{m}_x/\mathfrak{m}_x^2.$$
Note that if $\mathfrak{m}_x$ is prime ideal, it is maximal and there is a canonical isomorphism
$$\mathfrak{p}_x/\mathfrak{p}_x^2 \cong \mathfrak{m}_x/\mathfrak{m}_x^2$$
where $\mathfrak{p}_x:= \mathfrak{m}_x(\mathcal{O}_{\mathfrak{m}_x})$.
Note: In algebraic number theory, the "cotangent module" (the module of Kahler differentials) $\Omega^1:=\Omega^1_{\mathcal{O}/\mathbb{Z}}$ gives rise to the ramified primes. The different $\Delta_{L/K}$ is the annihilator ideal of the cotangent module $\Omega^1_{\mathcal{O}_L/\mathcal{O}_K}$, and the discriminant $\delta_{L/K}:=N_{L/K}(\Delta_{K/L})$ has the property that a prime ideal $\mathfrak{p} \subseteq \mathcal{O}_K$ is ramified iff $\mathfrak{p}\in Z:=V(\delta_{L/K})$. Hence the complement $$U:=Spec(\mathcal{O}_K) - V(\delta_{L/K})$$
is the open subscheme of unramified primes.
The canonical map
$$\pi: C:=Spec(\mathcal{O}) \rightarrow S:=Spec(\mathbb{Z})$$
is finite, and the closed  subscheme $Z\subseteq S$ with open complement $U:=S-Z$ has the property that the induced map
$$\pi_U:\pi^{-1}(U) \rightarrow U$$
is etale. This is one of the usages of the cotangent module in algebraic number theory. The cotangent module $\Omega^1$ contains information on which primes that ramify.
The tangent module
$$T:=(\Omega^1)^*$$
is the dual of the cotangent module, and when $\Omega^1$ is locally free you do not lose information when passing to $T$ since $T^*\cong (\Omega^1)^{**} \cong \Omega^1$. When not locally free, you lose information.
