Maths WorkshopMaths problems with full solutions
Exercise 306Topology › Topology of Mn(ℝ) › Continuity of matrix mapsL2Added 7 Nov 2026

Which natural functions of a matrix are continuous?

#continuity#rank#kernel#eigenvalues#counterexamples

Statement

Which of these are continuous on their natural domain: rank⁡A\operatorname{rank}A, dim⁡ker⁡A\dim\ker A, 1/det⁡A1/\det A on GLnGL_n, the number of distinct real eigenvalues of AA, tr⁡A\operatorname{tr}A?

Hint

Test on 1kI→0\frac1kI\to0.

For the eigenvalue count with n=2n=2, find a family of matrices with no real eigenvalues that converges to a matrix with one.

Show solutionHide solution

Solution

Idea. A function with values in Z\mathbb{Z} is continuous iff it is locally constant. So it suffices to find, for each integer-valued function, a convergent sequence along which the value jumps.

Answer. Only 1/det⁡A1/\det A and tr⁡A\operatorname{tr}A are continuous.

tr⁡\operatorname{tr} and 1/det⁡1/\det. tr⁡\operatorname{tr} is linear. det⁡\det is a polynomial, nonzero on GLnGL_n, so 1/det⁡1/\det is continuous on GLnGL_n.

Rank. 1kI→0\frac1kI\to0 and rank⁡1kI=n\operatorname{rank}\frac1kI=n for all kk, but rank⁡0=0≠n\operatorname{rank}0=0\neq n. Not continuous (it is only lower semicontinuous: Problem 83).

dim⁡ker⁡\dim\ker. By rank-nullity dim⁡ker⁡A=n−rank⁡A\dim\ker A=n-\operatorname{rank}A, so the same sequence gives dim⁡ker⁡(1kI)=0↛n=dim⁡ker⁡0\dim\ker(\frac1kI)=0\not\to n=\dim\ker0.

Number of distinct real eigenvalues. Take n=2n=2 and
Aε=(0−εε0).A_\varepsilon=\begin{pmatrix}0&-\varepsilon\\\varepsilon&0\end{pmatrix}.
Its characteristic polynomial is t2+ε2t^2+\varepsilon^2, with no real root for ε≠0\varepsilon\ne0, so the count is 00. As ε→0\varepsilon\to0, Aε→0A_\varepsilon\to0, which has the real eigenvalue 00: count 11. The count jumps. (For n≥2n\ge2 use block diagonal matrices.)

The jump can also go down. diag⁡(1,1+ε)→I\operatorname{diag}(1,1+\varepsilon)\to I has 22 distinct real eigenvalues for ε≠0\varepsilon\neq0 but II has 11. So the count is neither upper nor lower semicontinuous.

Remark. Counting eigenvalues *with multiplicity in C\mathbb{C}* gives the constant nn, and the multiset of complex eigenvalues does depend continuously on AA (Problem 81).