Proving that similar matrices have identical ranks 
Prove that if $A$ and $B$ are similar $n\times n$ matrices, then $\text{rank}A=\text{rank}B$.

I can't seem to think of any relation between rank and similar matrices. The book does not have a solution to this problem. Any ideas?
 A: If $A \sim B$, there there is an invertible matrix $C$, such that $A = CBC^{-1}$, since $\mathrm{rank}(XY) = \mathrm{rank}(X)$ provided $Y$ is invertible. So the conclusion is established. 
A: $\newcommand{\rg}{\operatorname{rank}_C}$ There is a more general statement. If $M$ and $N$ are $m\times n$ equivalent matrices, that is $CMD=N$ for $C,D$ invertible (of size $m$ and $n$ resp.), then $\rg M=\rg N$. You can avoid the $C$ subscript if your already know the column rank equals the row rank, but I don't do it here since this might be used as a way to prove that fact.
Sketch.  Consider the linear map $f_M:K^n\to K^m$ defined by $f_M(x)=Mx$ where $x$ is a column vector. In the canonical bases $E,E'$ of each space, we have $$|f_M|_{EE'}=M$$
Now, since $C$ and $D$ are invertible we may find appropriate bases $B$ and $B'$ such that $C=C(E',B')$ and $D=(B,E)$ (this is the part that should be detailed), so that $$CMD=C(E',B')|f_A|_{EE'}C(B,E)$$
But then $$N=CMB=|f|_{BB'}$$ is simply the matrix of $f_A$ in another base. Thus, $$\rg M=\dim\operatorname{im} f_A=\rg N$$

Let $V$ be a vector space, let $B,B'$ be two bases of $V$. By $C(B,B')$ we denote the matrix of change of bases. Let $f:V\to W$ be a linear transformation, let $B,B'$ be bases of $V$ and $W$ respectively. By $|f|_{BB'}$ we denote the matrix of $f$ in the bases $B$ and $B'$.
