In many articles, I see notations of the form
$$ \sum\limits_{i,j = 1..n} \mathbf{X}_{ik}\mathbf{Y}_{kj} $$
and $$ \sum\limits_{i= 1..n \\ j=1..n} \mathbf{X}_{ik}\mathbf{Y}_{kj} $$
What is the difference in the two summations ?. Is the first one sums like $[i=1,j=1], [i=2,j=2], [i=3,j=3] ...[i=n-1, j=n-1], [i=n, j=n]$, and second one sums like $[i=1,j=1], [i=1,j=2], [i=1,j=3] ... [i=n,j=1], [i=n, j=2] ... [i=n, j=n]$
It is a simplification of the notation for a double sum: $$ \sum_{i,j=1..n} = \sum\limits_{i= 1..n \\ j=1..n} = \sum_{i=1}^n\sum_{j=1}^n = \sum_{j=1}^n\sum_{i=1}^n $$ You have finite sums and the notation claims that you have the association law, so the order is irrelevant.
Remark: You first assumption
[i=1,j=1], [i=2,j=2], [i=3,j=3] ...[i=n-1, j=n-1], [i=n, j=n]
is something totally different, because there $i$ and $j$ are always the same. So $$ X_{1k}X_{k1}+X_{2k}X_{k2}+\ldots+X_{nk}X_{kn}=\sum_{i=1..n} X_{ik}X_{kj}. $$ But if you have more than one variable for the sum, each has to go through the given set of numbers independently.