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

Matrices of rank exactly r: neither open nor closed

#rank#closure#SVD#semicontinuity

Statement

For 0<r<n0<r<n show that {rank⁡=r}\{\operatorname{rank}=r\} is neither open nor closed, and that its closure is {rank⁡≤r}\{\operatorname{rank}\le r\}.

Hint

Perturb up (to rank r+1r+1) to see non-openness, and let a rank-rr sequence shrink to 00 for non-closedness. For the closure, use the SVD and replace zero singular values by ε\varepsilon.

Show solutionHide solution

Solution

Idea. By the previous problem {rank⁡≤r}\{\operatorname{rank}\le r\} is closed and {rank⁡≥r+1}\{\operatorname{rank}\ge r+1\} is open. The set {rank⁡=r}\{\operatorname{rank}=r\} is their "difference" and sits in between.

Let Dr=diag⁡(1,…,1,0,…,0)D_r=\operatorname{diag}(1,\dots,1,0,\dots,0) with rr ones; it has rank rr.

Step 1: not open. Dr+εEnnD_r+\varepsilon E_{nn} has diagonal (1,…,1,0,…,0,ε)(1,\dots,1,0,\dots,0,\varepsilon) with r+1r+1 non-zero entries (this uses r<nr<n so that position nn is a zero of DrD_r), so rank r+1r+1. It tends to DrD_r as ε→0\varepsilon\to0. So DrD_r has no neighbourhood inside {rank⁡=r}\{\operatorname{rank}=r\}.

Step 2: not closed. 1kDr\frac1kD_r has rank rr for every k≥1k\ge1 and converges to 00, which has rank 0≠r0\neq r (here r>0r>0 is used).

Step 3: the closure is {rank⁡≤r}\{\operatorname{rank}\le r\}.
- (⊂\subset) {rank⁡=r}⊂{rank⁡≤r}\{\operatorname{rank}=r\}\subset\{\operatorname{rank}\le r\} and the latter is closed.
- (⊃\supset) Let rank⁡A=s≤r\operatorname{rank}A=s\le r. Write the SVD A=PΣQTA=P\Sigma Q^T with singular values σ1≥⋯≥σs>0=σs+1=⋯=σn\sigma_1\ge\dots\ge\sigma_s>0=\sigma_{s+1}=\dots=\sigma_n. Define Aε=PΣεQTA_\varepsilon=P\Sigma_\varepsilon Q^T where Σε\Sigma_\varepsilon replaces σs+1,…,σr\sigma_{s+1},\dots,\sigma_r by ε>0\varepsilon>0 (and keeps the rest). Then rank⁡Aε=r\operatorname{rank}A_\varepsilon=r and ∥Aε−A∥=ε→0\|A_\varepsilon-A\|=\varepsilon\to0.

Remark.
- Matrices of rank exactly rr form a *manifold* of dimension r(2n−r)r(2n-r), but not a closed one: its boundary consists of the lower-rank matrices.
- For r=nr=n the set {rank⁡=n}=GLn\{\operatorname{rank}=n\}=GL_n is open; for r=0r=0 it is {0}\{0\}, which is closed. Both are excluded by 0<r<n0<r<n.