Maths WorkshopMaths problems with full solutions
Exercise 650Topology › Topology of Mn(ℝ) › Density and closuresL2Added 6 Nov 2026

Invertible rational matrices are dense in the general linear group

#rational matrices#density#open set

Statement

Show that GLn(Q)=GLn(R)∩Mn(Q)GL_n(\mathbb{Q})=GL_n(\mathbb{R})\cap M_n(\mathbb{Q}) is dense in GLn(R)GL_n(\mathbb{R}).

Hint

If UU is open and DD is dense in a space XX, then U∩DU\cap D is dense in UU.

Show solutionHide solution

Solution

General fact. Let DD be dense in XX and U⊆XU\subseteq X open. Take x∈Ux\in U and a neighbourhood VV of xx. Then V∩UV\cap U is a nonempty open set, so it meets DD; hence x∈U∩D‾x\in\overline{U\cap D}.

Application. X=Mn(R)X=M_n(\mathbb{R}), D=Mn(Q)D=M_n(\mathbb{Q}) is dense (each entry is approximated by rationals), and U=GLn(R)={det⁡≠0}U=GL_n(\mathbb{R})=\{\det\ne0\} is open. So Mn(Q)∩GLn(R)M_n(\mathbb{Q})\cap GL_n(\mathbb{R}) is dense in GLn(R)GL_n(\mathbb{R}).

Subtlety. The elements of this set are the rational matrices that are invertible over R\mathbb{R}; their determinant is a nonzero rational number, so they are also invertible over Q\mathbb{Q}, with inverse in Mn(Q)M_n(\mathbb{Q}) (by the adjugate formula). So the set is exactly the group GLn(Q)GL_n(\mathbb{Q}).

Remark. The same argument shows {A∈Mn(Q)}\{A\in M_n(\mathbb{Q})\} is dense in any open subset of Mn(R)M_n(\mathbb{R}). It fails for closed subsets such as SLnSL_n (see the next problems), where rationality interacts with the constraint det⁡=1\det=1. Lesson. Open ∩\cap dense is dense in the open set.