All matrices are over the complex numbers. There is, of course, an algebraic characterization of when a 2x2 matrix $$ \left( \begin{array}{cc} a & b\\ c & d\\ \end{array} \right) $$ is not invertible: $ad - bc = 0$. Is there a similar one for when that matrix is diagonalizable? more specifically I mean, is there a polynomial $p \in \mathbb{C}[a,b,c,d]$ such that $p(A) = 0$ iff $A$ is diagonalizable (or $p(A) = 0$ iff $A$ is not diagonalizable)?
Edit: The $p$ should be universal, and apply to every matrix - that is, I'd like to find out whether there exists a $p \in \mathbb{C}[a,b,c,d]$ such that $\{A \mid A \text{ is not diagonalizable}\} = \{A \mid p(A) = 0\}$ or $\{A \mid p(A) \neq 0\}$.
For an algebraically closed field like $\mathbb{C}$ a matrix $A$ is diagonalizable if and only if $\gcd(p,p^{'})=1$, where $p$ is the minimal polynomial of $A$ and $p^{'}$ is its derivative.