TITLE: Are simultaneously diagonalizable matrices dense in $(M_{n\times n})^k$?
QUESTION [5 upvotes]: Let $M_{n\times n}$ be the space of $n\times n$ matrices (over algebraically closed field). Then I know that the diagonalizable matrices are dense in $M_{n\times n}$ (because $M_{n\times n}$ is irreducible wrt. Zariski topology and the diagonalizable matrices are the open subset defined by the nonvanishing of the discriminant). If $(M_{n\times n})^k$ consists of $k$-tuples of matrices, do the tuples of simultaneously diagonalizable matrices form a dense subset?

REPLY [3 votes]: Let $T\subset {M_n}^k$ be the considered algebraic set of $k$ simultaneously diagonalizable matrices.
$\textbf{Proposition 1}$. $n^2+kn-n\leq dim(T)\leq n^2+kn$.
$\textbf{Proof}$. The second inequality comes from the @A. Pongrácz 's post.
For the first one. Let $A\in M_n$ s.t. $A$ has distinct eigenvalues. Then $AB=BA$ iff $B$ is a polynomial of degree $n-1$ in $A$.
Consider $U=(A,B_1,\cdots,B_{k-1})\in T$. Then, in a neighborhood of $U$, the local dimension of $T$ is $n^2+(k-1)n$.   
$\textbf{Proposition 2}$. One has $dim(T)=n^2+kn-n$.
$\textbf{Proof}$. We use the A. Pongrácz ' proof. 
Let $\Delta=\{A\in M_n;A$diagonal $\},\Delta_G=\{A\in GL_n;A$ diagonal$\}$; note that $\Delta_G$ is a non-normal subgroup of $GL_n$. We consider the pseudo-parametrization of $T$ (with $im(f)=T$)
$f:(A_1,\cdots,A_k,S)\in\Delta^k\times GL_n\rightarrow (S^{-1}A_1S,\cdots,S^{-1}A_kS)\in T$.
We consider the quotient $GL_n/\Delta_G$ defined by the equivalence relation $P\sim Q$ iff $PQ^{-1}\in\Delta_G$. If $P\sim Q$, then $P=UQ$ where $U\in\Delta_G$; if $D\in\Delta$, then $P^{-1}DP=Q^{-1}DQ$.
Finally $\bar{f}:(A_1,\cdots,A_k,S)\in\Delta^k\times GL_n/\Delta_G\rightarrow (S^{-1}A_1S,\cdots,S^{-1}A_kS)\in T$
satisfies $im(\bar{f})=T$. Since $GL_n/\Delta_G$ is an algebraic set of dimension $n^2-n$, we deduce that $dim(T)\leq n^2+kn-n$.     $\square$