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

The commutant of a non-scalar matrix is a thin subspace

#commutant#subspaces#scalar matrices#nowhere dense

Statement

For B∈Mn(R)B\in M_n(\mathbb{R}) let C(B)={A:AB=BA}C(B)=\{A:AB=BA\}. Show that C(B)C(B) is closed, and that it has empty interior unless BB is a scalar matrix.

Hint

C(B)C(B) is a linear subspace. It is the whole space iff BB commutes with every EijE_{ij}.

Show solutionHide solution

Solution

Idea. C(B)C(B) is a subspace, so by the subspace problem it is closed, and it has empty interior as soon as it is proper. It remains to see that it is proper unless BB is scalar.

Step 1: C(B)C(B) is a closed subspace. C(B)=ker⁡(A↦AB−BA)C(B)=\ker(A\mapsto AB-BA), the kernel of a linear (hence continuous) map: a closed linear subspace.

Step 2: if C(B)=MnC(B)=M_n then BB is scalar. Suppose BB commutes with every matrix. Take A=EijA=E_{ij}. The matrix BEijBE_{ij} has jj-th column equal to the ii-th column of BB and zeros elsewhere; EijBE_{ij}B has ii-th row equal to the jj-th row of BB and zeros elsewhere. Equality of the two matrices gives:
- for k≠ik\neq i, comparing entries (k,j)(k,j): bki=0b_{ki}=0 (off-diagonal entries of BB vanish);
- comparing entries (i,j)(i,j): bii=bjjb_{ii}=b_{jj}.
So B=bIB=bI is scalar. Conversely if BB is scalar, C(B)=MnC(B)=M_n.

Step 3: conclusion. If BB is not scalar, C(B)C(B) is a *proper* closed subspace, hence has empty interior by the subspace problem. (If BB is scalar, C(B)=MnC(B)=M_n is open and has full interior, so the hypothesis cannot be dropped.)

Remark.
- Dimension count: dim⁡C(B)≥n\dim C(B)\ge n always, with equality iff BB is *non-derogatory* (minimal polynomial = characteristic polynomial), which holds for a generic BB (these are classical facts, not needed for the problem; C(B)C(B) contains the span of I,B,B2,…I,B,B^2,\dots). Numerically, for a random 3×33\times3 matrix the commutant has dimension 33.
- Hence for generic BB the commutant is a thin set of dimension nn in a space of dimension n2n^2.