# Is $O_n({\bf Q})$ dense in $O_n({\bf R})$?

I am wondering if the orthogonal group $$O_n({\bf Q})$$ is dense in $$O_n({\bf R})$$?

It is easily checked for $$n = 2$$ but I think that there is a general principle concerning compact algebraic groups underneath.

• Every closed subgroup in compact $G(\mathbf{R})$ is Zariski-closed. So it's enough to obtain Zariski-density. Since $\mathrm{O}_n(\mathbf{Q})$ has a matrix of det $-1$, it amounts to show Zariski-density of $\mathrm{SO}_n(\mathbf{Q})$ in $\mathrm{SO}_n(\mathbf{R})$. Now in every connected linear algebraic $\mathbf{Q}$-group the set of $\mathbf{Q}$-points is Zariski-dense; I think this is due to Rosenlicht. – YCor Jan 16 at 10:49
• – abx Jan 16 at 11:02
• I'll take this opportunity to advertise a related question: mathoverflow.net/questions/134131/… – Neil Strickland Jan 16 at 11:20
• @VilleSalo somehow I don't see this as being undergraduate mathematics, and since the OP mentions a general principle of algebraic groups, I would bet coudy is not some random noob (plus, though I don't like to point it out, you don't get 15k rep on MO by not knowing what's on-topic). – theHigherGeometer Jan 16 at 13:34

There's an easy argument based on the Cayley transform: If $$a$$ is a skew-symmetric $$n$$-by-$$n$$ real matrix, then $$I_n+a$$ is invertible (since $$(I_n-a)(I_n+a)=I_n-a^2$$ is a positive definite symmetric matrix and hence invertible), and $$A = (I_n-a)(I_n+a)^{-1}$$ is orthgonal (i.e., $$AA^T = I_n$$). Note that $$(I_n+A)(I_n+a) = 2I_n$$, so $$I_n+A$$ is invertible. Conversely, if $$A$$ is an orthogonal $$n$$-by-$$n$$ matrix such that $$I_n+A$$ is invertible, one can solve the above equation uniquely in the form $$a = (I_n+A)^{-1}(I_n-A) = -a^T.$$ This establishes a rational 'parametrization' (known as the Cayley transform) of $$\mathrm{SO}_n(\mathbb{R})$$. Plainly, $$a$$ has rational entries if and only if $$A$$ has rational entries.

The density of $$\mathrm{O}_n(\mathbb{Q})$$ in $$\mathrm{O}_n(\mathbb{R})$$ follows immediately.

• Nice. And suddenly I realize that this is a generalization of an elementary method of producing pythagorean triples using the complex number $z = {1+ it \over 1-it}$ - which is what is needed for the $n=2$ case. – coudy Jan 16 at 20:07

By Cartan-Dieudonné's theorem, every element of $$O_n({\bf R})$$, resp. $$O_n({\bf Q})$$ is a product of at most n hyperplane reflections $$\sigma_u$$ for u in $${\bf R}^n$$, resp. u in $${\bf Q}^n$$. Now it suffices to remark that a reflection is a limit of rational reflections.

• In think you're only using that every element of $\mathrm{O}_n(\mathbf{R})$ is a product of $\le n$ reflections (and not the corresponding statement over $\mathbf{Q}$). – YCor Jan 17 at 12:16

Yes, here'a a proof by induction, granted the $$n=2$$ case (which is the only one where [basic] arithmetic occurs).

Let $$G$$ be the closure. I first claim that $$G$$ acts transitively on the sphere. Indeed, let $$x=(x_1,\dots,x_n)$$ be on the sphere. Using the case $$n=2$$ on the last two coordinates, we see that $$x$$ is in the orbit of some $$y=(y_1,\dots,y_n)$$ with $$y_n=0$$. Using the case in dimension $$n-1$$, we deduce that $$y$$ is in the orbit of $$e_1=(1,0,\dots,0)$$.

Now let $$g$$ be in $$\mathrm{O}(n)$$. By the claim, there exists $$h\in G$$ such that $$g(e_1)=h(e_1)$$. So $$g^{-1}h$$ fixes $$e_1$$, hence belongs to the copy of $$\mathrm{O}(n-1)$$ acting on the last $$n-1$$ coordinates. By induction, $$g^{-1}h\in G$$. So $$g\in G$$.

This answer doesn't really add much, but I already wrote it offline, so whatever. The idea is the same as in the answer of Name, except that I only use Cartan-Dieudonné over $$\mathbb{R}$$, where I think it is trivial. This is based on my favorite proof for the density of $$\mathbb{Q}^2$$ on the unit circle, so based on coudy's comment on Robert Bryant's answer, this is possibly also related to that one.

Let $$R$$ be a subfield of $$\mathbb{R}$$, and write $$M_{n,m}(R)$$ for all $$n$$-by-$$m$$ matrices with entries in $$R$$, $$\mathrm{GL}_n(R)$$ for invertible $$n$$-by-$$n$$ matrices, $$O''_{n,m}(R)$$ for $$n$$-by-$$m$$ matrices with linearly independent columns, $$O'_{n,m}(R)$$ for $$n$$-by-$$m$$ matrices with orthogonal columns, $$O_n(R)$$ for orthonormal matrices.

First we have Gram-Schmidt orthogonalization.

Lemma. Let $$A \in O''_{n,m}(R)$$. Then there is a matrix $$B \in O'_{n,m}(R)$$ such that for all $$k \leq m$$, the first $$k$$ columns of $$B$$ have the same column span as those of $$A$$.

Now we simply write any matrix as a product of reflections and approximate them, observing that the approximations, while not orthonormal, still give orthonormal reflections.

Lemma. Let $$A \in O''_{n,n-1}(R)$$, $$V$$ the codimension $$1$$ subspace spanned by the columns of $$A$$. Then the matrix $$X_A$$ that reflects around $$V$$ is in $$O(R)$$. Furthermore, $$X_A$$ is continuous in $$A$$.

Proof. Complete $$A$$ to a matrix in $$O''_{n,n}(R)$$ by adding an $$n$$th column, and apply the previous lemma to obtain $$B \in O'_{n,n}(R)$$ such that the first $$n-1$$ columns have span $$V$$. Now $$X_A = B C B^{-1}$$ works, where $$C$$ is the identity matrix except $$C_{n,n} = -1$$, i.e. in basis $$B$$ we just have to flip the sign of the last coordinate. Continuity of reflection in the spanning vectors is obvious by geometry, or by analyzing the formulas. Square.

Theorem. $$O_n(R)$$ is dense in $$O_n(\mathbb{R})$$.

Proof. Any $$D \in O_n(\mathbb{R})$$ can be written as a composition of $$t \leq n$$ reflections over some codimension $$1$$ subspaces $$U_1, U_2, ..., U_t$$ spanned by matrices $$D^i \in O_{n,n-1}(\mathbb{R})$$, i.e. $$D = X_{D^t} \circ \cdots \circ X_{D^1}$$. If $$A^i \in O''_{n,n-1}(R)$$ is close to $$D^i$$, the matrix $$A = X_{A^t} \circ \cdots \circ X_{A^1}$$ is close to $$D$$ by continuity. Square.