  Our aim is to study topological minimality of some natural matrix groups. We
show that the special upper triangular group $SUT(n,\mathbb{F})$ is minimal for
every local field $\mathbb{F}$ of characteristic $\neq 2$. This result is new
even for the field $\mathbb{R}$ of reals and it leads to some important
consequences. We prove criteria for the minimality and total minimality of the
special linear group $SL(n,\mathbb{F})$, where $\mathbb{F}$ is a subfield of a
local field. This extends some known results of Remus-Stoyanov (1991) and
Bader-Gelander (2017). One of our main applications is a characterization of
Fermat primes, which asserts that for an odd prime $p$ the following conditions
are equivalent:
  $\bullet$ $p$ is a Fermat prime;
  $\bullet$ $SL(p-1,\mathbb{Q})$ is minimal, where $\mathbb{Q}$ is the field of
rationals equipped with the $p$-adic topology;
  $\bullet$ $SL(p-1,\mathbb{Q}(i))$ is minimal, where $\mathbb{Q}(i) \subset
\mathbb{C}$ is the Gaussian rational field.
