Let $ABC$ be a well-defined product of matrices. Suppose that $A,C$ are both invertible. Prove that $rank(ABC)=rank(B)$. Not sure where to go with this... I've done the following, though:

$A$ and $C$ must be square matrices if they are invertible. Let $A$ be an $m\times m$ matrix, and let $C$ be an $n\times n$ matrix. Let $B$ be a $m\times n$ matrix so that $ABC$ is well defined.
$A$ has a rank of $m$ and $C$ has a rank of $n$. $rank(AB)\leq m$ and $rank(AB)\leq rank(B)$ Also, $rank(BC)\leq n$ and $rank(BC)\leq rank(B)$.

From here, I have no idea what to do. I don't even know if I'm on the right track. The best I can figure is that $rank(ABC)\leq \min(rank(A),rank(B),rank(C))$, but I have no idea how to show that $rank(ABC)=rank(B)$.
 A: Hopefully this isn't flawed... but it seems like it should be correct...

If $A$ and $C$ are invertible, they must be square matrices. Let $A$ be an $m\times m$ matrix, $B$ be an $m\times n$ matrix, and $C$ be an $n\times n$ matrix. $rank(A)=m$ and $rank(C)=n$.
Since $A$ and $C$ are invertible, they can be reduced via Gaussian Elimination to their respective identity matrices $I_{m}$ and $I_{n}$ respectively, both of which have the same rank: $rank(I_{m})=m$ and $rank(I_{n})=n$. Consider the new matrix product
  \begin{align*}
I_{m}BI_{n}=B
\end{align*}
  which has the same rank as
  \begin{align*}
ABC
\end{align*}
  Therefore, $rank(ABC)=rank(I_{m}BI_{n})=rank(B)$.

A: So, if $b_1, \dots , b_n$ are the columns of $B$,
$$
\mathrm{rank}\ B = \mathrm{dim}\ \mathbf{span} (b_1, \dots , b_n) \ .
$$
Also you can see that the columns of $AB$ are 
$$
Ab_1, \dots , Ab_n \ .
$$
Hence, if $A$ is invertible, multiplication by $A$ is an isomorphism and
$$
\mathrm{dim}\ \mathbf{span} (Ab_1, \dots , Ab_n) = \mathrm{dim}\ \mathbf{span} (b_1, \dots , b_n) \ .
$$
Alternatively you can show easily, just with the definition of linearly independent vectors and a short computation that, if $A$ is invertible, then
$$
b_1, \dots , b_n \quad \text{are l.i.}\qquad \Longleftrightarrow \qquad Ab_1, \dots , Ab_n \quad \text{are l.i.} \ .
$$
Anyway,
$$
\mathrm{rank}\ AB = \mathrm{rank}\ B \ .
$$
