A quick search for "diagonalisable matrix" on Wikipedia immediately gives the result that the set of real-diagonalisable matrices is not dense in the set of real matrices.


I need, however, to know whether the set of complex-diagonalisable real matrices, i.e. matrices with purely real entries that become diagonalisable when treated as complex matrices, is dense in the set of real matrices or not.


This is for my personal research that explicitly involves the reality (or lack thereof) of the trace of a complex analytic, not necessarily entire, function (real when restricted over the reals) of square matrices- should the above result be true, such a trace would be automatically real for any real matrix, by mixing the above result, the trivial fact that the set of mutually distinct N-(complex)number pairs is dense in the set of N-number pairs, and that the Frobenius cofactors appearing in the form of Sylvester's formula for diagonalisable matrices must all have trace 1 for matrices with distinct eigenvalues.


My question is now clear- is the above true?


P.S. I'm a literal mathematics junior(going to take a leap year before becoming a senior), so I know what I am talking about.



Is the set of purely real square matrices, that are complex-diagonalisable, dense in the set of real matrices?
The answer is yes. Recall that the discriminant of a polynomial $x^n + a\_{n-1} x^{n-1} + \cdots + a\_1 x + a\_0$ is a polynomial $\Delta(a\_0, a\_1, \ldots, a\_{n-1})$ which vanishes if and only if the complex roots of $x^n + a\_{n-1} x^{n-1} + \cdots + a\_1 x + a\_0$ are not mutually distinct. Recall also that, if the characteristic polynomial of a matrix has distinct roots, then it is diagonalizable (this isn't if and only if, but it is the direction I need).


Therefore, if the discriminant of the characteristic polynomial of $A$ is nonzero, then $A$ is diagonalizable over the complex numbers. The discriminant of the characteristic polynomial will be a huge multivariate polynomial, but all we need to know is that it is not the zero polynomial, which is true because it is not zero if $A$ is diagonal with distinct diagonal elements.


The locus in $\mathbb{R}^N$ where a polynomial is nonzero (other than the zero polynomial) is always dense.


