## Similar matrices have the same row and column ranks

Let $A$ and $B$ be similar square matrices over a field $F$. Prove that $A$ and $B$ have the same row and column ranks.

Since $A$ and $B$ are similar, there exists a linear transformation $\varphi$ and two bases $E$ and $F$ (of $F^n$, where $n$ is the dimension of $A$ and $B$) such that $A = M^E_E(\varphi)$ and $B = M^F_F(\varphi)$. In the previous exercise we saw that $\mathsf{col\ rank}\ A = \mathsf{rank}\ \varphi$ $= \mathsf{col\ rank}\ B$.

Recall that the transpose of an $n \times m$ matrix $A = [a_{i,j}]$, denoted $A^\mathsf{T}$, is the $m \times n$ matrix $[a_{j,i}]$.

Lemma: If $R$ is a commutative ring, $A$ an $n \times k$ matrix over $R$, and $B$ a $k \times m$ matrix over $R$, then $(AB)^\mathsf{T} = B^\mathsf{T} A^\mathsf{T}$. Proof: We have $(AB)^\mathsf{T} = [\sum_{t=1}^k a_{i,t}b_{t,j}]^\mathsf{T}$ $= [\sum_{t=1}^k a_{j,t}b_{t,i}]$ $= B^\mathsf{T} A^\mathsf{T}$. $\square$

Clearly $\mathsf{col\ span}\ A = \mathsf{row\ span}\ A^\mathsf{T}$ and $\mathsf{row\ span}\ A = \mathsf{col\ span}\ A^\mathsf{T}$. Moreover, if $AB = I$, then $I = I^\mathsf{T} = (AB)^\mathsf{T}$ $= B^\mathsf{T} A^\mathsf{T}$. In particular, if $A$ is invertible, then so is $A^\mathsf{T}$, and $(A^\mathsf{T})^{-1} = (A^{-1})^\mathsf{T}$.

Now $PAP^{-1} = B$ for some invertible matrix $P$. Thus $(P^\mathsf{T})^{-1} A^\mathsf{T} P^\mathsf{T} = B^\mathsf{T}$. By the above argument, $A^\mathsf{T}$ and $B^\mathsf{T}$ have the same column rank. Thus $A$ and $B$ have the same row rank.