Let $F$ be a totally real number field, $E$ a totally imaginary quadratic extension over $E$, and $V$ an hermitian $n$-dimensional vector space over $F$. I assume $n=2m$ is even. Let $U$ be a unitary group, *i.e.* the group au automorphism preserving a given hermitian form on $V$.


The structure of local components of $U$ at the finite places of $F$ is among the following ones [for instance, see those notes of Michael Harris](https://webusers.imj-prg.fr/~michael.harris/SatoTate/notes/unitarygroups.pdf):


* $U\_v \cong GL\_n(V)$, this happens iff $v$ splits in $E$
* $U\_v \cong U(n)$, the only one non-quasi-split unitary group of rank $n$ over $V\_v$, and this happens a finite number of time
* $U\_v \cong U(m,m)$, the only one quasi-split unitary group of rank $n$ over $V\_v$



> 
> I wonder if there is a characterization of those last two possibilities in terms of the behaviour of $v$ in $E$. Since there is only a finite number of places where $U\_v$ is non-quasi-split, could we wait for it to happen iff the place ramifies?
> 
> 
> 



Type of place versus type of unitary group
Things are perhaps a bit messier than you hope. In particular it is not true that the unitary group is non-quasi-split if and only if $v$ ramifies. Disclaimer: I did not know the answer to this question off the top of my head but I did want to know, so I just figured it out below; hopefully there are no errors (hopefully an expert will glance over it and let me know if there are).


From the way you write (talking about "the only one non-quasi-split unitary group...") you seem to be assuming that $v$ is a finite place of $F$ (of course the case of infinite places is very well-known). As you know, if $v$ splits in $E$ then $E\otimes\_F F\_v$ is isomorphic to $F\_v\oplus F\_v$ and the unitary group becomes $GL\_n$ at $v$. If $v$ does not split (i.e. we are in the inert or ramified case) then there is one prime $w$ above $v$ in $E$, and we have a local extension $E\_w/F\_v$ of degree 2. So we need to understand unitary groups over local fields in order to answer your question.


So now let $L/K$ be a degree 2 extension of $p$-adic fields and say $V$ is a vector space over $L$ equipped with a Hermitian form (Hermitian for the action of $Gal(L/K)$ of course). If we choose an $L$-basis for $V$ then this form gives rise to a Hermitian matrix $\Phi$ (so $\overline{\Phi}^t=\Phi$). The determinant of $\Phi$ is an element of $L^\times$ which is equal to its Galois conjugate, so it's in $K^\times$. Let $c(\Phi)$ be the image of this determinant in the group $K^\times/N\_{L/K}(L^\times)$, a group of order 2. It turns out that this invariant $c$ parametrises isomorphism classes of Hermitian matrices -- so in particular there are two isomorphism classes of Hermitian forms on $V$. For each isomorphism class we get a unitary group.


The next step depends on whether $n$ is odd or even. If $n$ is odd then it turns out that even though the two forms are not isomorphic, the unitary groups are (this can be easily seen -- scaling the form by an element of $K^\times$ can change the isomorphism class of the form but clearly doesn't change the corresponding unitary group). But you are interested in the case $n$ even, and in this case it turns out we get two unitary groups, one quasi-split and one not quasi-split. In particular we see that it is easy to build a non-quasi-split unitary group over $K$ even if $L/K$ is unramified, and it is easy to build a quasi-split unitary group over $K$ even if $L/K$ is ramified -- we just need to get the determinants right. Moreover, we can do all these things over $E/F$ as well, and this is why life is not as simple as you think.


To understand things better and to see what *is* true, we next need to understand when our local unitary group is quasi-split. You have some global Hermitian form giving rise to a global Hermitian matrix whose determinant is $d\in E$, and what we know so far is that if $v$ is a finite place of $F$ which is not split, and $w$ the unique place of $E$ above $v$, then whether or not $U$ is quasi-split at $v$ depends only on what the image of $d$ is in $F\_v^\times/N\_{E\_w/F\_v}(E\_w^\times)$. So to see exactly what is going on, I need to tell you which element of $F\_v^\times/N\_{E\_w/F\_v}(E\_w^\times)$ corresponds to the quasi-split case, and then we also need to check (for our own sanity) that in the global situation $d$ will give us a quasi-split local unitary group for all but finitely many $v$.


Now here's the bad news. It turns out that the story locally (if I worked it out correctly) is the following. We can write $L=K(\sqrt{k})$ for some $k\in K$, and if my calculations are correct, the element of $K^\times/N\_{L/K}(L^\times)$ corresponding to the quasi-split unitary group is $k^m$, where $n=2m$. This is because (if I got it right) if we let our Hermitian form be anti-diagonal with entries $+\sqrt{k},-\sqrt{k},+\sqrt{k},\ldots$ (this is Hermitian if I got it right) then this form gives us a quasi-split unitary group because the upper triangular matrices are a Borel. In particular, the naive guess that the quasi-split group corresponds to the identity element of $K^\times/N\_{L/K}(L^\times)$ is not always true. The norm of the element $\sqrt{k}\in L$ is $-k$, so it seems to me that the element of $K^\times/N\_{L/K}(L^\times)$ corresponding to the quasi-split unitary group is $(-1)^m$, which of course is the identity element iff $(-1)^m$ is the norm of an element of $L$. This happens if $m$ is even or if $L/K$ is unramified (because then any unit is a norm) but not in general. 


However, going back to the global situation, we have a global determinant $d\in F^\times$ and at all but finitely many places $d$ will be a local unit, and at all but finitely many places $E\_w/F\_v$ will be unramified, so it is true that the global unitary group is quasi-split at all but finitely many local places.


In general then, to figure out which places your unitary group is not quasi-split you need to figure out what the determinant $d$ of a corresponding Hermitian form is, and then for each place of $F$ which is either ramified in $E$ or for which this determinant is not a unit (there are only finitely many of these), you need to figure out whether $(-1)^md$ is a local norm or not; the places for which this number is not a local norm are the places where the unitary group is ramified.


