TITLE: How to visualize Dirichlet’s unit theorem?
QUESTION [33 upvotes]: As the question title asks for, how do others "visualize" Dirichlet’s unit theorem? I just think of it as a result in algebraic number theory and not one in algebraic geometry. Bonus points for pictures.

REPLY [34 votes]: One viewpoint that is useful is to think of this as a special case of the theory of arithmetic groups via extension of scalars. First I need to describe a proof of the Dirichlet unit theorem via Mahler's compactness theorem. 
Given a number field $K=\mathbb{Q}(\alpha)$, where $p(\alpha)=0, p\in \mathbb{Z}[x]$, $p(x)$ a monic irreducible polynomial, we may think $K$ as an algebra over $\mathbb{Q}$ which is a $d=deg(p(x))$-dimensional vector space.
In the obvious $\mathbb{Q}$-basis $\{1,\alpha, \ldots, \alpha^{d-1}\}$, multiplication by $\alpha$ becomes the companion matrix $C(p)$ for the polynomial $p(x)$. Instead, let us choose a $\mathbb{Q}$-basis $\{\alpha_1,\ldots,\alpha_d\}\subset K$ which is also a $\mathbb{Z}$-basis for the ring of integers $\mathcal{O}_K$. Multiplication by elements of $K$ gives a map $\rho: K \to M_d(\mathbb{Q})$. 
What is the image $\rho(K)$ in $M_d(\mathbb{Q})$? Well, the image is commutative, so it should be contained in $\{ A\in M_d(\mathbb{Q}), A\cdot \rho(\alpha)=\rho(\alpha)\cdot A\}$. Of course, we also know that the image is $\mathbb{Q}[\rho(\alpha)]\subset M_d(\mathbb{Q})$, and one may check that these two spaces agree by linear algebra. 
Then one may consider the subring $M_d(\mathbb{Z}) \cap \rho(K)$. This is a lattice $\rho(\mathcal{O}_K)\subset \rho(K)$.
Now the image of the ring of units is $\rho(\mathcal{O}_K^\times) = \rho(\mathcal{O}_K) \cap GL_d(\mathbb{Q})$. This is equal to $\rho(K)\cap Aut(\mathcal{O}_K)$, where $Aut(\mathcal{O}_K) \cong GL_d(\mathbb{Z})$, making an identification using our preferred basis.  
Consider the space $X=GL_d(\mathbb{R})/GL_d(\mathbb{Z})$, which may be regarded as the space of $d-$dimensional lattices in $\mathbb{R}^d$ via $A\cdot \mathbb{Z}^n$, $A\in GL_d(\mathbb{R})$. Inside $GL_d(\mathbb{R})$ we have the subspace $Y'=\mathbb{R}[\rho(\alpha)]\cap det^{-1}(\pm 1)=\{A \in det^{-1}(\pm 1) | [A,\rho(\alpha)]=0\}$. Let $Y$ be the image of $Y'$ in $X$. Note that $\mathbb{R}[\rho(\alpha)]\cong K\otimes_{\mathbb{Q}}\mathbb{R}\cong \mathbb{R}^{r_1}\times \mathbb{C}^{r_2}$ as a tensor product of fields. 
Let's check the conditions of Mahler's compactness theorem. The determinant is $=\pm 1$ on $Y'$ and hence on $Y$. We also need to check that there is a neighborhood $N$ of $0\in \mathbb{R}^d$ so that the only lattice point of $\Lambda\in Y$ inside of $N$ is $0$. Suppose that we have a sequence $A_i\in Y', v_i\in \mathbb{Z}^n$ with $A_i v_i \to 0$. Then $\rho(\alpha)^jA_iv_i = A_i \rho(\alpha)^j v_i  \in A_i \mathbb{Z}^n$, and hence $\rho(\alpha_j)A_iv_i=A_i\rho(\alpha_j)v_i$. Hence there is a basis for a sublattice of $\Lambda_i=A_i\mathbb{Z}^n$ given by $\{\rho(\alpha_1)v_i, \rho(\alpha_2)v_i,\ldots, \rho(\alpha_d)v_i\}$ which approaches $0$. But this contradicts that the lattice $\Lambda_i=A_i\mathbb{Z}^n$ has covolume $1$ since $det(A_i)=\pm 1$. Hence $Y$ has compact closure in $X$ by Mahler's compactness theorem. But $Y$ itself is closed, since it is characterized by being the lattices $\Lambda$ such that $\rho(\alpha)\Lambda\subset \Lambda$, which is a closed condition. So $Y$ is compact. This implies that $Y$ is a compact torus in $X$, which is $(\mathbb{R}[\rho(\alpha)]\cap det^{-1}(\pm 1) ) / \rho(\mathcal{O}_K^\times)$. 
Thus, I think of $\mathcal{O}_K^\times$ as a (multiplicative) lattice (arithmetic subgroup ) in a maximal torus (commutative algebraic subgroup) of  $det^{-1}(\pm 1)$ (this Lie group contains $SL_d(\mathbb{R})$ with index $2$). This maximal torus is the $\pm 1$-determinant elements of $\mathbb{R}[\rho(\alpha)]^{\times} \cong (\mathbb{R}^\times)^{r_1} \times (\mathbb{C}^\times)^{r_2}$, where $r_1$ is the number of real places of $K$, and $r_2$ is the number of complex places of $K$. Then Dirichlet's unit theorem follows immediately from this property. 
To visualize this for a real quadratic number field, note that $X$ is the space of unit lattices in $\mathbb{R}^2$. Modding out by rotation, $SO(2)\backslash X$ is the modular curve $\mathbb{H}^2/PSL_2(\mathbb{Z})$. Then $Y$ in this case is a closed geodesic. Here is a picture from this paper by recent Fields medalist Akshay Venkatesh (and Einsiedler and Lindenstrauss and Michel):