Does $\text{SO}_2(\mathbb{Q}_5)$ contain non-trivial elements?

There's definitely more. For example, the second Pythagorean triple $5^2+12^2=13^2$ leads to solutions such as $$\begin{bmatrix}\frac{5}{13}&-\frac{12}{13}\\ \frac{12}{13}&\frac{5}{13}\end{bmatrix}$$ The entries of that matrix are all 5-adic integers. Allow rationals as your statement does and we can work with triples with a $5$ in the hypotenuse as well; $\mathbb{Q}_p$ always contains a copy of $\mathbb{Q}$, after all, and there's plenty of stuff in $SO_2(\mathbb{Q})$.

In response to a comment:
Sure. One element in $SO_2(\mathbb{Q}_5)$ not in $SO_2(\mathbb{Q})$ is $$\begin{bmatrix}\sqrt{26}&5\sqrt{-1}\\-5\sqrt{-1}&\sqrt{26}\end{bmatrix}$$ Both $\sqrt{-1}=2+1\cdot 5+2\cdot 5^2+1\cdot 5^3+3\cdot 5^4+4\cdot 5^5+\cdots$ and $\sqrt{26}=1+0\cdot 5+3\cdot 5^2+2\cdot 5^3+0\cdot 5^4+3\cdot 5^5+\cdots$ are $5$-adic integers.


Short answer: Your group is isomorphic to $\Bbb Q_5^\times$. Indeed, there are isomorphisms of topological groups (inverse to each other):

$$SO_2(\Bbb Q_5) \rightarrow \Bbb Q_5^\times$$ $$ \pmatrix{a & -b \\b &a} \mapsto a+ ib$$

and

$$\Bbb Q_5^\times \rightarrow SO_2(\Bbb Q_5)$$ $$x \mapsto \frac12 \pmatrix{x +x^{-1} & ix-ix^{-1} \\ -ix+ix^{-1} & x+x^{-1}}$$

where $i\in \Bbb Q_5$ is a square root of $-1$.

Long answer: While the other two answers give hand-on calculations for the case at hand, I feel one should really put this into the broader perspective of the theory of algebraic groups in which it naturally lives. Namely, for any field $K$ with $char(K) \neq 2$, there are isomorphisms of $K$-algebras

$$\lbrace \pmatrix{a &-b\\b &a}: a,b \in K\rbrace \simeq K[x]/(x^2+1) \simeq \begin{cases} L := K(\sqrt{-1}) \qquad \text{ if } \sqrt{-1} \notin K \\ K \times K \qquad \qquad\quad \text{ if } \sqrt{-1} \in K\end{cases}$$

sending $\pmatrix{a &-b\\b &a}$ to $a+bx$ and then to either $a +b \sqrt{-1}$ or to $(a+b\sqrt{-1}, a-b\sqrt{-1})$. Following the extra condition $a^2+b^2 =1$ through, one sees that your group $SO_2(K)$ identifies with the norm-$1$- group

$$\lbrace x\in L^\times: N_{L|K}(x) =1 \rbrace$$

in the first case (e.g. $K = \Bbb Q_p$ for $p \equiv 3$ mod $4$, or $K = \Bbb R$, or $K = \Bbb Q$), but with

$$\lbrace (x, x^{-1}): x\in K^\times \rbrace \simeq K^\times$$

in the second case (e.g. $K = \Bbb Q_p$ for $p \equiv 1$ mod $4$, or $K = \Bbb C$, or $K = \Bbb Q(i)$)

From the perspective of algebraic groups, your group is just a one-dimensional torus, which is $K$-split iff $K$ contains a square root of $-1$, but is the "unit circle" (the original "torus" if you want!) in the extension $K(\sqrt{-1})$ iff $K$ does not contain a square root of $-1$. (In the latter case, the group is compact for $K$ a locally compact field).

This certainly generalises even further to group schemes over rings, but maybe this is general enough for now.


Added: As for your question to describe $SO_2(\Bbb Q_5) \setminus SO_2(\Bbb Q)$, I think all above identifications are compatible. That means, let $\pm i$ be the two square roots of $-1$ in $\Bbb Q_5$, then via the above isomorphism

$$ SO_2(\Bbb Q_5) \simeq \Bbb Q_5^\times$$

the subgroup $SO_2(\Bbb Q)$ on the left identifies with $\lbrace x+iy \in \Bbb Q_5: x,y \in \Bbb Q, x^2+y^2 =1 \rbrace$ which is the unit circle in $\Bbb Q(i)$ embedded into $\Bbb Q_5$ (and it can further be described as consisting of all $\pm\frac ac \pm i \frac bc$ for $(a,b,c)$ running through all Pythagorean triples). Vaguely said, "almost all" elements of $SO_2(\Bbb Q_5) \simeq \Bbb Q_5^\times$ are not in the relatively small (e.g. countable) subgroup $SO_2(\Bbb Q)$.


$$\text{SO}_2(\mathbb{Q}_5) = \{ \begin{pmatrix} a & -b \\ b & a \end{pmatrix} | (a,b) \in \mathbb{Q}_5, a^2 + b^2 = 1 \}$$

Let $$f(x) = (1+x)^{1/2} = \sum_{k=0}^\infty {1/2 \choose k} x^k, \qquad |x|_5 < 1$$

Then $|{1/2 \choose k}|_5 = |\prod_{m=0}^{k-1} \frac{1/2-m}{k-m}|_5= |\prod_{m=0}^{k-1} \frac{\frac{5^r+1}{2}+O(5^{r+1})-m}{k-m}|_5 \le 1$ whence $f(x)$ converges for $|x|_5 < 1$ and since $\mathbb{Q}_5,|.|_5$ is complete then $x \in 5 \mathbb{Z}_5 \implies (1+x)^{1/2} \in \mathbb{Q}_5$.

Whence

  • if $|a|_5 > 1$ then $a^2 = 5^{-2m} d^2(1+x)$ and $b = \pm 5^{-m} d (1+x)^{1/2}$

  • if $|a|_5 < 1$ then $a^2-1 = 2^2 (1-a^2/4)$ and $b= \pm 2 (1-a^2/4)^{1/2}$

  • if $|a|_5 = 0$, iff $a^2-1 \equiv d^2 \bmod 5$ then $a^2 -1 = d^2 (1+x)$ and $b = \pm d (1+x)^{1/2}$