# How to prove there are exactly $2N-1$ independent derived random variables?

Suppose random variables $X_i$, $Y_j$ (where $i,j=1\cdots N$) are independent and identically distributed random variables.

How to prove there are only $2N-1$ derived random variables independent in the $N\times N$: $$U_{i,j}=X_i-Y_j,\quad$$

For $N=7$ I noticed that the $2N-1$ independent derived random variables can be chosen this way below (the diagonal and sub-diagonal elements):

Is it possible to prove that such approach is feasible for arbitrary positive integer $N\ge 3$?

• Here are some thoughts: If you have $U_{1,j}$ for all $j$ and $U_{i,1}$ for all $i,$ you can get any other $U_{i,j}$ in the following way: $U_{i,j}=U_{i,1}+U_{1,j}-U_{1,1}.$ If you could prove that for any collection of $2N-1$ independent $U_{i,j},$ you can get $U_{1,j},U_{i,1}$, this would show that you could not have any more independent random variables. – RideTheWavelet Jul 11 '17 at 7:15