December 15th
Today I learned the proof to the more general statement that orbits of elements of the projective space $K\PP^1$ under $\op{SL}_n(\mathcal O_K)$ is equal to the class number of $K.$ This is a direct generalization of what I learned yesterday, but the approach is somewhat different. Here we show bijection, that orbits of points $[a:b]\in K\PP^1$ can be put in bijection with the ideal class of $(x,y).$
One direction is easier. If $[a:b]$ and $[c:d]$ are in the same orbit under $\op{SL}_n(\mathcal O_K),$ then we show that $(a,b)$ and $(c,d)$ are in the same ideal class. Well, we are given a matrix already so that\[\begin{bmatrix} x & y \\ z & w\end{bmatrix}\begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} kc \\ kd \end{bmatrix}\]for some nonzero constant $k\in K^\times.$ It follows that $ax+by=kc$ and $ca+dw=kd,$ implying that $(kc,kd)\subseteq(a,b).$ But inverting, we also have\[\begin{bmatrix} x & y \\ z & w\end{bmatrix}^{-1}\begin{bmatrix} kc \\ kd \end{bmatrix}=\begin{bmatrix} a \\ b \end{bmatrix}\]for the same $k.$ This implies that $(a,b)\subseteq(kc,kd),$ so $(a,b)=(k)\cdot(c,d)$ implies that $(a,b)$ and $(c,d)$ are in the same ideal class.
The other direction is harder. Suppose $(a,b)$ and $(c,d)$ are arbitrary fractional ideals in the same ideal class so that we want to show $[a:b]$ and $[c:d]$ are in the same orbit. Quickly, we know that $(a,b)=(k)\cdot(c,d)=(kc,kd)$ for some $k\in K^\times,$ so it suffices to show that $[a:b]$ and $ [c:d]=[kc:kd]$ are in the same orbit given $(a,b)=(kc,kd).$ Renaming variables, it suffices to show $[a:b]$ and $[c:d]$ are in the same orbit given $(a,b)=(c,d).$
For this we have to find an element of $\op{SL}_2(\mathcal O_K)$ sending $[a:b]$ to $[c:d].$ The equality of ideals immediately gives some relations to work with, but the determinant condition is the hard part here. For this, we compose maps sending\[[a:b]\to[1:0]\to[c:d].\]This is somewhat motivated by using $\infty$ in the class number $1$ case. Now we do something clever. Looking at the inverse ideal $(a,b)^{-1}=(x,y),$ we have $(1)=(ax,ay,bx,by),$ implying a relation\[1=kax+\ell ay+mbx+nby=(kx+\ell y)a+(mx+ny)b=:b'a-a'b.\]Here $a',b'\in(a,b)^{-1},$ so we see\[\begin{bmatrix} a & a' \\ b & b'\end{bmatrix}\begin{bmatrix}1 \\ 0\end{bmatrix} = \begin{bmatrix}a \\ b\end{bmatrix}\]has determinant $1$ and sends $[1:0]\to[a:b].$ Importantly, the first column is in $(a,b)$ and the second column is $(a,b)^{-1}.$ We can construct an analogous matrix for $[c:d],$ again with the first column in $(a,b)=(c,d)$ and the second column in $(a,b)^{-1}=(c,)^{-1}.$ Now, the matrix we're interested in is\[\begin{bmatrix} c & c' \\ d & d'\end{bmatrix}\begin{bmatrix} a & a' \\ b & b'\end{bmatrix}^{-1}=\begin{bmatrix} c & c' \\ d & d'\end{bmatrix}\begin{bmatrix} -a & b \\ a' & -b'\end{bmatrix}.\]This composite indeed sends $[a:b]\to[1:0]\to[c:d],$ and it will have determinant $1$ like we need. And its elements live in $\mathcal O_K$ because we end up multiplying the elements $a'$ and $b'$ only by $c$ and $d,$ and vice versa, implying that all elements of the resulting matrix end up in $(a,b)(a,b)^{-1}=(c,d)(c,d)^{-1}=(1)=\mathcal O_K.$ This completes the proof.
At a high level, we're showing that a fractional linear transformation can transform any two representations of the same fractional ideal. The fact that elements of $\op{SL}_2(\mathcal O_K)$ are freely scaled implies that we need our fractional ideals to be freely scaled, which is where the class number is coming into play. What I still like about this is how central representing an ideal with two generators is. It's what makes thinking about any of this even possible, but the statement can technically avoid it.