When does unitary group become compact? This might be a silly question, but I got confused sometime.
Let $F$ be a local field of characteristic zero, and let $E/F$ be a quadratic extension. Use $\sigma$ to denote the nontrivial element in the Galois group $Gal(E/F)$. Associated to it is the unitary group $$U(n)=\{g\in GL_n(E): {^t}g^{-1}=\sigma(g)\}$$
The naive question is that when does $U(n)$ become compact?
Of course, in archimedean case, it is well known. So the question is how about the p-adic case? 
In general, if we have a $E-$vector space $V$, and a Hermitian form $$q:V\times V\to E$$
let $U(q)$ be the unitary group associated to $q$.
Then when does $U(q)$ become compact in general?
Any answer or reference is appreciated. 
 A: Let's consider the general setting where we have an $E$-vector space $V$ of dimension $n$ and a Hermitian form $q$ on $V$. Then (with respect to some basis) the form is given by a matrix $\Phi \in M_{n \times n}(E)$ satisfying ${}^t \Phi = \overline{\Phi}$. 
A theorem of Landherr shows that the equivalence class of $(V, q)$ is determined by the class of $\det(\Phi)$ in $F^\times / N_{E/F}(E^\times)$, which has order 2, by local class field theory. The unitary group attached to $\Phi$ only depends on $\Phi$ up to scalars, so it depends on the class of $\det(\Phi)$ in $F^\times / [N_{E/F}(E^\times) \cdot (F^\times)^n]$; in particular, if $n$ is odd there is only one possibility.
Now let's write down some unitary groups. Let $H(n)$ denote the "standard" unitary group for which $\Phi$ is off-diagonal. Then $H(n+1)$ contains $H(n)$ as a subgroup, and $H(2)$ contains the subgroup $\left\{\begin{pmatrix} x & 0 \\ 0 & x^{-1} \end{pmatrix}: x \in F^{\times}\right\}$, which is not compact. So $H(n)$ is not compact for any $n \ge 2$ (it obviously is for $n = 1$). In particular, any unitary group of odd rank $\ge 3$ is non-compact.
For even $n$, there are some more possibilities. Let $V_{m, \alpha}$ be the (unique up to isomorphism) Hermitian space of rank m realizing the nontrivial class in $F^\times / N_{E/F}(E^\times)$. By uniqueness, $V_{m, \alpha}$ must be isomorphic to $V_{1, \alpha} \oplus V_{m-1, 1}$; so the associated unitary group contains $H(m-1)$ as a subgroup, and is thus non-compact if $m \ge 4$.
So the only case we haven't resolved is the "exceptional" rank 2 unitary group $U$ which has $\Phi = \begin{pmatrix} 1 & 0 \\ 0 & -\alpha \end{pmatrix}$, where $\alpha$ is an element of $F^\times$ that isn't a norm from $E^\times$. Let $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ be an element of this group. Then $a\overline{a} - \alpha c \overline{c} = b\overline{b} - \alpha d\overline{d} = 1$. If $c$ is very large we can write this as 
$$ a \overline{a} = \alpha c \overline{c} \left(1 + \frac{1}{\alpha c \overline{c}}\right).$$
If $c$ is large enough then $\left(1 + \frac{1}{\alpha c \overline{c}}\right)$ will be a norm (since the image of the norm map is an open subgroup of $F^\times$), which is nonsense, since $a \overline{a}$ is a norm and $\alpha c \overline{c}$ isn't. This forces $c$ to lie in a compact subset of $E^\times$. Similarly, writing the equation as $\alpha c \overline{c} = a \overline{a}(1 - 1/a\overline{a})$ shows that $a$ lies in a compact subset. Similarly $b$,$d$ lie in compact subsets and thus this exceptional unitary group is indeed compact.
In summary, a unitary group of rank $n$ over a local field is always compact if $n =1$, if $n=2$ it is compact if and only if $-\det(\Phi)$ isn't a norm from $E$, and if $n \ge 3$ it is never compact.
