Suppose $X$ and $Y$ are two $a \times b$ matrices, randomly sampled from the same normal distribution. I found an interesting phenomenon:
- If we sum $X X^T$ multiple times, each time $X$ is randomly sampled, the result $S$ will look like an identity matrix:
Pseudo code
S = 0 # a zero matrix
for iter in range(1000):
X = np.random.normal(loc=0.0, scale=1.0, size=[10, 5])
A = X @ X.T
S += A

- If we sum $X Y^T$ multiple times, each time $X$ and $Y$ are randomly sampled, the result $S$ will not look like an identity matrix:
Pseudo code
S = 0 # a zero matrix
for iter in range(1000):
X = np.random.normal(loc=0.0, scale=1.0, size=[10, 5])
Y = np.random.normal(loc=0.0, scale=1.0, size=[10, 5])
A = X @ Y.T
S += A
