Maths WorkshopMaths problems with full solutions
Exercise 1426Topology › Topology of Mn(ℝ) › Open, closed, interior, boundaryL3Added 7 Nov 2026

Matrices with rational trace: dense with empty interior

#trace#density#rationals#open maps

Statement

Show that {A∈Mn(R):tr⁡A∈Q}\{A\in M_n(\mathbb{R}):\operatorname{tr}A\in\mathbb{Q}\} is dense in Mn(R)M_n(\mathbb{R}) but has empty interior.

Hint

A non-zero linear functional is an open map. The image of a ball under tr⁡\operatorname{tr} is a non-degenerate interval.

Show solutionHide solution

Solution

Idea. The trace sends a neighbourhood of any matrix onto an interval; an interval contains both rationals and irrationals.

Let T={A:tr⁡A∈Q}T=\{A:\operatorname{tr}A\in\mathbb{Q}\}.

Step 1: images of balls. Fix AA and r>0r>0. For ∥H∥F<r\|H\|_F<r and s∈(−r/n,r/n)s\in(-r/\sqrt n,r/\sqrt n) take Hs=snIH_s=\frac s{\sqrt n}I: ∥Hs∥F=∣s∣<r\|H_s\|_F=|s|<r and tr⁡(A+Hs)=tr⁡A+sn\operatorname{tr}(A+H_s)=\operatorname{tr}A+s\sqrt n. Therefore
tr⁡(B(A,r))⊃(tr⁡A−rn, tr⁡A+rn),\operatorname{tr}\big(B(A,r)\big)\supset\big(\operatorname{tr}A-r\sqrt n,\ \operatorname{tr}A+r\sqrt n\big),
a non-empty open interval.

Step 2: dense. The interval above contains a rational number qq. Choose ss with tr⁡A+sn=q\operatorname{tr}A+s\sqrt n=q; then A+Hs∈TA+H_s\in T and ∥A+Hs−A∥F=∣s∣<r\|A+H_s-A\|_F=|s|<r. So every ball meets TT.

Step 3: empty interior. The same interval contains an irrational number xx (the irrationals are dense), and choosing ss with tr⁡A+sn=x\operatorname{tr}A+s\sqrt n=x gives A+Hs∈B(A,r)∖TA+H_s\in B(A,r)\setminus T. So no ball is contained in TT.

Remark.
- T=⋃q∈Q{tr⁡=q}T=\bigcup_{q\in\mathbb{Q}}\{\operatorname{tr}=q\} is a *countable union of closed hyperplanes*, each nowhere dense. This is an example of a dense *meagre* set: the Baire theorem (next problem) forbids a countable union of nowhere dense closed sets from being the whole space, consistent with T≠MnT\neq M_n.
- The set TT is neither open nor closed; its complement (irrational trace) is a dense GδG_\delta.