If $A$ and $B$ are similar, why does $\text{rank}(A) = \text{rank}(B)$? Suppose $A$ and $B$ are similar matrices over $\mathbb{C}^n$. Why do we have $\text{rank}(A) = \text{rank}(B)$?
 A: There is an invertible matrix $P$ such that $PA = BP$, so there is a well-defined map $\operatorname{Col}(A) \to \operatorname{Col}(B)$ sending $x\mapsto Px$. It is a linear transformation that is bijective (since $P$ is invertible). Therefore the columnspaces $\operatorname{Col}(A)$ and $\operatorname{Col}(B)$ have the same dimension, i.e., $\operatorname{rank}(A) = \operatorname{rank}(B)$.
A: I will show that by premultiplication and postmultiplication by invertible matrices, rank is unchanged. 
Let $A=PBQ$ where $P,Q$ are invertible. 
$Rank(A)=Rank(PBQ)\leq Rank(PB)\leq Rank(B)= Rank(P^{-1}AQ^{-1})\leq Rank(A)$ so all inequalities must be equalities.
So $Rank(A)=Rank(B)$.
In particular, if $A$ and $B$ are similar, then $Q=P^{-1}$ which is still invertible.
A: If $A$ and $B$ are similar then $A = PBP^{-1}$ for some invertible matrix $P$. Because $P$ is invertible its null space is trivial, i.e. $nullity(P) = \{0\}$.
Now suppose that $Ax = PBP^{-1}x = 0$. Using the result above $PBP^{-1}x = 0$ if and only if $PBx = 0$; Again $PBx = 0$ if $Bx = 0$. The latter result means that $nullity(A) = nullity(B)$. Using rank-nullity-theorem we can conclude that $rank(A) = rank(B)$.
The proof is taken from here.
