Conditions on characteristic polynomial to define a matrix submanifold. I'm trying to find conditions on the characteristic polynomial, $p$, of a matrix such that the pre-image of matrices with characteristic polynomial $p$ form a manifold.
More precisely, we can write down a map $\phi: \textrm{Mat}_n(\mathbb{R}) \to \mathbb{R}[x]$ given by $\phi(A) = \textrm{det}(xI-A)$ and so now the question reduces to finding $p \in \mathbb{R}[x]$ such that the derivative of $f$ evaluated at pre-images of $p$ is surjective. 
Using the "Jacobi formula" for the derivative of a determinant, namely $T_Af(X) = \mathrm{det}(A)Tr(A^{-1}X)$ where $f(A) = \mathrm{det}(A)$, I think we can deduce that the determinant of $\phi$ is given by:
$$T_A(\phi)(X) = det(xI-A)tr((xI-A)^{-1}X)$$
This is where I first get in to trouble, how do we know in this case that $xI-A$ is even invertible? Surely this is only true in some finite interval (bounded by the norm of $A$)? Is this actually the correct formula for the derivative?
It also seems impossible to determine if this map is surjective or not? How can we understand which polynomials are hit by this map?
Edit: I've made some progress but am still struggling with this. Thanks to Qiaochu Yuan I'm now trying to show this when $p$ has distinct real roots.
To find the derivative we can write $\phi(A+tH) = det(xI - (A+tH))$ and attempt to evaluate $\frac{\phi(A+tH) - \phi(A)}{t}$ as $t \to 0$.
Now the numerator here gives:
$$x^n + ... - tr(A+tH)x + det(A+tH) - det(xI-A)$$
Expanding out the determinants:
$$x^n + ... - tr(A)x - t tr(H)x + det(A+tH) - x^n + ... + tr(A)x - det(A)$$
Now I'm left with the $x^n$ terms cancelling and the constant term will again just be the derivative of $det(A)$ which is $det(A)tr(A^{-1}H)$ and the $x$ term will be $-tr(H)$. The difficulty is, I have no idea what the $1<k<n-1$ terms should be, and these are the important ones because they describe the tangent space of the n monic polynomials!
 A: Firstly we see that $\phi $ maps $M_n({\bf R})$ to the space of polynomial of degree n with $x^n$ as a term of highest degree. So wee sould think of $\phi$ as a map from $M_n$ to the affine space of polynomila pf the form $x^n+Q$ with $deg(Q)\leq n-1$. Then $T_A(\phi)$ is a linear map from $M_n({\bf R})$ to the vector space $R_{n-1}[X]$
We keep the notation of Mercio for the adjugate matrix, and accept that $T_A(\phi)X=tr(adj(xI-a)X)$.
In particular :
Lemma 1 : $im(T_A(\phi)$ is the linear subspace space of ${\bf R}_{n-1}[X]$generated by the coefficients of $adj(xI-A)$
Recall that the transpose of cofactor matrix of a given matrix $A$, $adj(A)$ satisfies $adj(A)A=det(A) id$ (Cramer formula). If the rank of $A$ is $n$, $c(A)$ is invertible. Furthermore,one checks that if the rank of $A$ is $\leq n-2$, $adj(A)$ is $0$ (compute $c(A)$ in a base where the two first vector are in the kernel). In particular 
Lemma 2 : the complex number $x$ being fixed $adj(xI-A)=0$ iff $x$ is a (complex) eigenvalue of $A$ such that the eigenspace is of dimension at least 2. then $x$ is a double root of the caracteristic polynomial of $A$.
Claim. The polynomial $P $ is a critical value of $\phi$ iff it has a double   root.
Proof. If $P$ has a (perhaps complex) double root say $x_0$, consider $A$ a matrix with $P$ as a characteristic polynomial and $x_0$ as eigenvalue with eigenspace of dimension at least 2. Then the entries of the matrix $adj(xI-A)$ are polynomials which vanishes at $x=x_0$, so $T_A(\phi)$ is not surjective : it is contained in the subspace of polynomials which vanishes at $x=x_0$.
If all roots of $P$ are simple, $A$ is diagonalizable over ${\bf C}$,with eigenvalues $x_1,,...,x_n$. A simple computation in the (complex) digonalisation base, the coefficient of $ad(A-xI)$ are the complex Lagrange polynomials $L_k=\Pi _{i\not =k}(x-x_i)$. It is known that these polynomials is a base of ${\bf C}_{n-1}[X].$
So the complexification of $T_A(\phi)$ is a linear surjective map. But is is known that a linear map between two real vector spaces is surjective iff its complexification is : indeed a real $(n,m)$ matrix has the same rank over $\bf R$ and $\bf C$. 
