For each fixed $t\in [0,1]$, let $A(t)$ be a real matrix, so its eigenvalues are always real or conjugate pairs. Assume the entries of $A(t)$ are continuous functions of $t$. Suppose that the rank of $A(t)$ is constant with respect to $t$. Is it true that the number of real eigenvalues of $A(t)$ is also constant with respect to $t$?
My intuition is that, since the eigenvalues are continuous functions of $t$, the only way for the number of real eigenvalues to change is that one real eigenvalue "splits" into a conjugate pair. But this would change the rank so that can't happen. Is this intuition correct?
The rank of a square matrix isn't connected to the number of distinct eigenvalues. Rank is connected directly to the multiplicity of $0$ as eigenvalue. And two complex conjugate eigenvalues can go together into one (multiple) real eigenvalue without being $0$.
As an example, consider the matrix which rotates the plane $t$ radians: $$ A(t)=\begin{bmatrix}\cos t&-\sin t\\\sin t&\cos t\end{bmatrix} $$ For $t=0$, there is only the eigenvalue $1$. For any other $t\in(0,1]$, the two eigenvalues of $A(t)$ are $\cos t\pm i\sin t$. It always has rank $2$.