Let $A\in \mathrm{Mat}_{m,n}(\mathbb R)$ be fixed and let $T_A\colon \mathrm{Mat}_{m,n}(\mathbb R)\to \mathrm{Mat}_{m,m}(\mathbb R)$ be given by $T_A(B) = AB^{\intercal}$.
Claim 1: If $r(A)=\mathrm{rank}(A)=d$ then $r(T_A(B))\leq d$ for all $B \in \mathrm{Mat}_{m,n}(\mathbb R)$.
The rank of a matrix is the dimension of its row or column space, but here it will be easier to work with the column space of $T_A(B)$.
Let $A = (\mathbf a_1|\ldots|\mathbf a_n)$ and $B=(\mathbf b_1|\ldots|\mathbf b_n)$, so that $\mathbf a_i$ and $\mathbf b_i$ are the i-th columns of $A$ and $B$ respectively. Then if we write $(AB^{\intercal})_k$ for the $k$-th column of $T_A(B) = AB^{\intercal}$ ($1\leq k\leq m$), we have
$$
(AB^{\intercal})_k = \sum_{j=1}^n b_{kj}\mathbf a_j
$$
It follows that $\mathrm{Span}\{(AB^{\intercal})_k: 1\leq k\leq m\} \subseteq \mathrm{Span}\{\mathbf a_1,\ldots,\mathbf a_n\}$, and hence the inequality
$$
\begin{split}
\mathrm{rank}(AB^{\intercal}) &= \dim(\mathrm{Span}\{(AB^{\intercal})_k: 1\leq k\leq m\} )\\
&=\dim(\text{Span}\{\sum_{j=1}^n b_{kj}\mathbf a_j: 1\leq k\leq m\})\\
&\leq \dim(\mathrm{Span}\{\mathbf a_1,\ldots, \mathbf a_n\})\\
&= \mathrm{rank}(A)
\end{split}
$$
follows immediately.
Moreover equality holds, i.e. $r(B^{\intercal}A)=r(A)$, when the columns of $AB^{\intercal}$ have the same span as the columns of $A$. One way to ensure this is as follows: the columns $\{\mathbf a_1,\ldots,\mathbf a_n\}$ of $A$ contain a subset $\{\mathbf a_{i_1},\ldots,\mathbf a_{i_d}\}$ which is a basis of the column spaces of $A$, where as above $d= r(A)$. (You can find such a subset by row reducing $A^{\intercal}$ and taking the columns of $A$ corresponding to leading $1$s in the reduced matrix). Let $B = (b_{ij})$ where $b_{ij} = 0$ unless $i=j=i_k$ for some $k$, $1\leq k\leq d$. Then $AB^{\intercal}$ has exactly $d$ nonzero columns $\{\mathbf a_{i_1},\ldots,\mathbf a_{i_d}\}$ and these by construction span the column spaces of $A$ so that $r(AB^{\intercal})=d=r(A)$
Note that there are, in general, many matrices $B$ for which $r(AB^{\intercal}) = r(A)$: In the diagram below, $\ker(A)= \{v \in \mathbb R^n: Av=0\}$ is the kernel of $A$.
$$\require{AMScd}
\begin{CD}
\mathbb R^m @>B^{\intercal}>> \mathbb R^n @>A>> \mathbb R^m \\
@. @AAA @.\\
@. \ker(A) @.
\end{CD}
$$
Claim 2:
The composition $AB^{\intercal}$ has rank $d$ if and only if $\mathrm{im}(B^{\intercal})+\ker(A)=\mathbb R^m$.
Proof: Clearly, if $\mathrm{im}(B^{\intercal})+\ker(A)=\mathbb R^n$, then $A(\mathbb R^n) = A(\mathrm{im}(B^{\intercal})) = \mathrm{im}(AB^{\intercal})$ so that $r(AB^{\intercal})=d$. Conversely, if $r(AB^{\intercal})=r(A)$, then since $\mathrm{im}(AB^{\intercal}) \subseteq \mathrm{im}(A)$, they are equal once they have the same dimension. But then $A^{-1}(A(\mathrm{im}(B^{\intercal})) = \mathrm{im}(B^{\intercal})+\ker(A)$ must be equal to $\mathbb R^n$ as required.
Thus if we pick a basis of the kernel of $A$, say $\{w_1,\ldots,w_{n-r}\}$ and extend it to a basis $\{w_1,\ldots,w_{n-r}, w_{n-r+1},\ldots,w_n\}$ then if $C$ is the matrix of the linear map $v\mapsto B^{\intercal}v$ with respect to the standard basis of $\mathbb R^m$ and the basis $\{w_1,\ldots,w_n\}$ of $\mathbb R^n$ then $AB^{\intercal}$ has rank $d$ precisely when some $d\times d$ minor of $C$ obtained by taking the last $d$ rows of $C$ and any $d$ columns must be nonzero. Now if $P$ denotes the change of basis matrix from the standard basis of $\mathbb R^n$ to the basis $\{w_1,\ldots,w_n\}$ then $C = PB^{\intercal}$, and hence it follows that the matrices $B$ for which $AB^{\intercal}$ has rank $r$ are an open dense subset of $\mathrm{Mat}_{m,n}(\mathbb R)$ (given by the locus where at least one of the relevant minors of $PB^{\intercal}$ does not vanish, and those minors are polynomial functions in the matrix entries of $B$).
The OP notes that another possibility for a $B$ with $r(AB^{\intercal})=r(A)$ is $B=A$. You can check that this choice for $B$ works by using the criterion $\mathrm{im}(A^{\intercal})+\ker(A)=\mathbb R^n$. Since $r(A)=r(A^{\intercal})$, by rank-nullity it suffices to show that $\mathrm{im}(A^{\intercal})\cap \ker(A)=\{0\}$.
Suppose that $A^{\intercal}v \in \ker(A)$. Then $AA^{\intercal}v =0$, and hence
$$
0=v^\intercal AA^{\intercal}v=(A^{\intercal}v)^{\intercal}(A^{\intercal}v) = \|A^{\intercal}v\|^2,
$$
so that $A^{\intercal}v$ has length zero, and hence $A^{\intercal}v =0$. Thus it follows that $\ker(A)\cap \mathrm{im}(A^{\intercal})= \{0\}$ as required.
$m-null(AC)=m-(dim(\ker(A)\cap Im(C))+null(C))?$ i.e. why $null(AC)=dim(\ker(A)\cap Im(C))+null(C)?$ I get that it follows from rank-nullity theorem, but had a bit of trouble connecting the dots here. And I think there's a typo in the next step: it should be $m$ instead of $n?$
– Mathguest Sep 11 '24 at 13:09