# Which of the following sets of matrices are dense in the set of square $n \times n$ square matrices over $\mathbb{C}$?

Practicing for the GRE I found this question and I was wondering if anyone had any general tips to approach this type of questions or any literature I could review to approach them.

Which of the following sets are dense in the set of square $n \times n$ square matrices over $\mathbb{C}$?

I) Invertible matrices

II) Unitary Matrices

III) Symmetric Matrices

IV) Diagonalizable Matrices.

• Just to encourage contemplation of such questions... these are useful issues to consider! :) Oct 20, 2016 at 23:24
• Well, I) and IV) are equivalent (at least I think--unless being over $\mathbb{C}$ changes something about matrices that I'm not aware of). Oct 20, 2016 at 23:25
• @Jared Consider the matrix $\begin{pmatrix} 1 & 1\\ 0 &1\end{pmatrix}$. Oct 20, 2016 at 23:29
• Sorry @symplectomorphic, I will put better titles in the future. Oct 20, 2016 at 23:30
• PS: I have taken all the official GRE practice tests and the real thing once (95th percentile), and based on that experience I don't think you'd ever be asked a question that depends on the density of diagonalizable matrices. You must be taking some unofficial practice test. Oct 20, 2016 at 23:36

Case 1: Invertible Matrices

For each $A \in M_{n\times n}(\mathbb{C})$, let us consider the characteristic polynomial \begin{align} p_A(z) = \det(zI-A). \end{align} Then it is clear that $A$ is not invertible if and only if zero is a root of of $p_A(z)$. However, if we perturb $A$ by a diagonal matrix, i.e. \begin{align} B= A+\epsilon I \end{align} then we see that $B$ is invertible since the characteristic polynomial of $B$ is $p_B(z) = p_A(z-\epsilon)$ no longer has zero as its root for any $\epsilon \neq 0$. Hence the class of invertible matrices are dense in $M_n(\mathbb{C})$. (In fact, the set of invertible matrices is actually open in $M_n(\mathbb{C})$. )

Case 2: Unitary Matrices

A quick way to see that this class is not dense is to consider the following matrix \begin{align} A = \begin{pmatrix} 2 & 0\\ 0 & 2 \end{pmatrix} \end{align} which is not unitary. In particular, for all unitary matrix $U$ we have \begin{align} \operatorname{Tr}|A-U|\geq \big|\operatorname{Tr}|A|-\operatorname{Tr}|U| \big|= 1. \end{align} Since all norms are equivalent on finite dimensional vector spaces, we have that the class of unitary matrices can't be dense in $M_n(\mathbb{C})$.

Case 3: Symmetric Matrices

A quick way to see that this class is not dense is to consider the matrix \begin{align} C = \begin{pmatrix} 1 & 100\\ 0 & 1 \end{pmatrix} \end{align} which is clearly not symmetric. Now, for any symmetric matrix $S$, we have \begin{align} C-S = \begin{pmatrix} 1-a & 100-b\\ -b & 1-c \end{pmatrix}. \end{align} If we take the Frobenius norm of $C-S$, we get \begin{align} \|C-S\|_F = \sqrt{|1-a|^2+|1-c|^2+b^2+|100-b|^2}\geq \sqrt{b^2+|100-b|^2} \geq \frac{100}{\sqrt{2}}. \end{align} Hence the class of symmetric matrices is not dense in $M_n(\mathbb{C})$.

Case 4: Diagonalizable Matrices Let $A$ be an arbitrary matrix in $M_n(\mathbb{C})$. Let us show that $A$ can be approximated by diagonal matrix.

Using the fact that a matrix is diagonalizable if it has $n$ distinct eigenvalues, we shall construct a $B$ matrix arbitrarily close to $A$ in norm and $B$ has distinct $n$-eigenvalues.

Suppose $p_A(z) =\det(zI-A) =(z-\lambda_1)(z-\lambda_2)\cdots (z-\lambda_n)$ is the characteristic polynomial of $A$ where $|\lambda_1\leq |\lambda_2|\leq \ldots \leq |\lambda_n|$, then consider a diagonal matrix \begin{align} D= \begin{pmatrix} d_1 & 0 & \ldots & 0\\ 0 & d_2 & \ldots & \vdots\\ \vdots & \ldots &\ddots & 0\\ 0 & \ldots & 0 & d_n \end{pmatrix} \end{align} where the $|d_1|<|d_2|<\ldots <|d_n|$. Then by considering the Jordan canocial form of $A$, we have that \begin{align} A+\epsilon D \end{align} has distinct eigenvalues, i.e. diagonaliable for any $\epsilon\neq 0$. Hence the set of diagonalizable matrices are dense in $M_n(\mathbb{C})$. (My explanation of this part is flimsy. Essentially, I'm choosing $d_1, \ldots, d_n$ so that $|\lambda_1+d_1|<|\lambda_2+d_2|<\ldots<|\lambda_n+d_n|$.)

Symmetric matrices aren't dense in $\mathbb{C}^{n^2}$ since they form a non-trivial subspace (unless $n = 1$). Unitary matrices aren't dense in $\mathbb{C}^{n^2}$ since they form a bounded set.

Diagonalizable matrices are indeed dense. To see this, note that any complex matrix is similar to an upper triangular matrix. Given $A \in \mathbb{C}^{n^2}$, we can find an invertible $P$ and an upper triangular $B$ such that $A = P^{-1} B P$ and the diagonal elements of $B$ are precisely the eigenvalues of $A$ (counting algebraic multiplicity). By perturbing the diagonal elements of $B$ slightly (call the result $B'$), we can make all the eigenvalues of $B'$ distinct and so $B'$ will be diagonalizable and hence also $P^{-1} B' P$ which can be made arbitrary close to $A$.

Invertible matrices are dense since if $A$ is a matrix, $A + \lambda I$ will be invertible for all but finitely many $\lambda \in \mathbb{C}$ and so we can find an invertible matrix arbitrary close to $A$.

• For the last one, a proof I like better is that $(-\infty,0) \cup (0,\infty)$ is dense, and the invertible matrices are the preimage of this set under the determinant. Ironing out the details of this proof is a bit messy, though.
– Ian
Oct 20, 2016 at 23:36