Do products $AB$ and $BA$ of rectangular matrices contain the same information? I have data measuring two events in space and in time. More precisely, I have two rectangular data matrices $A$ and $B$ which both have $20$ time rows and $1\text{M}$ space columns.
I want to analyse the interaction between these two events. In particular, I want to do a Canonical-Correlation Analysis (CCA) on their product. I could calculate the product $A^{T}B$, which is a large $1\text{M}$ by $1\text{M}$ matrix. Or I could calculate $BA^{T}$, which is a small $20$ by $20$ matrix.
I know the rank of both types of products is the same (see Math Stack Exchange). This leads me to think the resolution of the information contained in both products is the same. I also know that the eigenvalues for $A^{T}B$ and $BA^{T}$ are identical (see Math Stack Exchange). However, the singular values need not be the same (see Math Stack Exchange).
Is there a way to exploit these facts to analyse the smaller $BA^{T}$ product and still get all relevant information about the large $A^{T}B$ product? Relevant in terms of the CCA. In particular, I would like to avoid the computationally intensive SVD of $A^{T}B$, yet still determine its Principal Components.
 A: The following does not answer the OP's question directly, but does solve the issue of performing an SVD on a large matrix product $AB$. This is based on https://arxiv.org/abs/0909.4061v2 and its references.
The large rectangular $m \times n$ matrices $A$ and $B$ with $n << m$ can be projected to a subspace of dimensions equal to the smallest side, $n$, without losing much/any of its action.
In the case of the OP, $A$ and $B$ are both $20 \times 10\text{M}$, while the new $\tilde{A}$ and $\tilde{B}$ are only $20 \times 20$.
Steps:


*

*Generate two random $n \times n$ matrices $\Omega_i$ from a Gaussian distribution with $\mu = 0$ and $\sigma = 1$

*Form the $m \times n$ matrix $Y_1 = AΩ_1$

*Form the $m \times n$ matrix $Y_2 = BΩ_2$

*Construct two $m \times n$ matrices $Q_i$ whose columns form an orthonormal
basis for the range of $Y_i$, e.g. using the QR factorization $Y_i = Q_iR_i$

*Form the $n \times n$ matrix $\tilde{A} = Q_1^{∗}A$

*Form the $n \times n$ matrix $\tilde{B} = Q_2^{∗}B$


Now, the product $\tilde{A} \tilde{B}$ is $n \times n$. The singular values for this product are very close to the largest singular values of the product $AB$.
The difference between the real $A$ and its approximation $\tilde{A}$ is given by $||A-Q_1\tilde{A}||$. Likewise for $B$.
I do not have proof of exactly this, though similar steps are proven in the reference above. I am not sure this will work in all cases, but some quick tests seem to suggest it works.
