Questions on rank and invertability I'm working on some practice problems, and I'd like some feedback. 


*

*We have a n x n square matrix $A$ with rank $r$. There are other matrices $B$ and $C$ and $AB=AC$. I'm asked to find the maximal rank of $B-C$.


So in the case where $B = C$, the max rank would be 0. Now when is $B =/= C$? If A is zero, then AB = AC and r = 0. In that case, C could be 0 and B could be $I_n$, which would give a max rank of n.
I believe that makes sense, yeah? 
 A: I'll expand on what I wrote in the comments. 
First, as your problem is stated, your solution is correct. For any matrix $A$, $AI_n=AI_n$ and $I_nI_n=I_n$ which has rank $n$. Since the rank of an $n \times n$ matrix cannot exceed $n$. The maximal rank of such a product of matrices, $BC$, is $n$. Rank of $A$ is not really relevant which makes me think you've possibly miss-copied part of this problem.
Your second attempt doesn't work. You cannot use $A^{-1}$ to cancel off $A$ in the equation $AB=AC$ since $A^{-1}$ exists only if you make the additional assumption $\mathrm{rank}(A)=r=n$.
Next, it is not generally the case that $\mathrm{rank}(B)=\mathrm{rank}(B^2)$. Consider for example: 
$$ B = \begin{bmatrix} 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix} $$
Notice that $\mathrm{rank}(B)=1$ whereas $B^2=0$ so $\mathrm{rank}(B^2)=0$.
Edit: For the new problem.
$AB=AC$ is equivalent to $A(B-C)=0$. Thus the rank of $B-C$ is bounded above by the number of linearly independent solutions of $Ax=0$ (this is the nullity of $A$: $n-r$). To the max rank of $B-C$ is less than or equal to $n-r$. To see that we can achieve this bound: Let $B$ be a matrix whose columns form a basis for $N(A)$ plus some zero columns to pad out $B$ to it's square. Then $AB=0$ (since $B$ is made of zero columns and elements of the nullspace of $A$). So, letting $C=0$, we get $AB=0=A0=AC$ where $B-C=B-0=B$ whose rank is the nullity of $A$: $n-r$. Thus the max rank of $B-C$ is $n-r$.
A: Hint for new question
If $M$ and $N$ are two square matrices, what can you say about the dimension of the kernel of $MN$, in terms of the dimension of the kernels of $M$ and of $N$?
Then, how is the rank of a matrix related to the dimension of its kernel?
Hints for original questions
Here are some hints.


*

*You can't cancel $A$ unless it has full rank (n). So you will need a different approach to the question. There are several plausible guesses for the maximum rank of $BC$, including $r$, $n-r$, and $n$. Suppose the maximum rank is $<n$. That means that whenever $BC$ has full rank, $AB \neq AC$. Does that sound plausible?

*Your idea makes sense. What part are you having trouble with? Showing that if $Ax=0$ for all $x$, then $A=0$? Can you think of a nice $x$ so that if $Ax=0$, the whole first column of $A$ must be zero? What about the other columns?

*Your counterexample doesn't work because $A+B = \begin{bmatrix}1 &1\\1 &1\end{bmatrix}$ is not invertible. However, I'm sure you'll be able to modify your counterexample slightly to fix this problem.

*Yep, that disproves it.There is no such thing as a matrix being "technically invertible" -- a square matrix is invertible if and only if it has full rank, or equivalently, iff its determinant is nonzero. What is the determinant of the zero matrix? What is its rank?
