# Double summation

If I know that $\sum_{k=1}^n a_{ik} = 1$ and $\sum_{j=1}^n b_{kj} = 1$, why is the following permitted?

$$\sum_{j=1}^n \sum_{k=1}^n a_{ik}b_{kj} = \left(\sum_{j=1}^n b_{kj}\right) \left(\sum_{k=1}^n a_{ik}\right) = 1\cdot 1 = 1$$

Thanks!

It's not permitted. What you wrote makes no sense since you sum over k and one of the $b_{kj}$ is outside that sum. That is not allowed.
$$\sum_{j=1}^n\sum_{k=1}^n a_{ik}b{kj}= \sum_{k=1}^n \sum_{j=1}^n a_{ik}b_{kj} = \sum_{k=1}^n \left(a_{ik} \sum_{j=1}^n b_{kj}\right)= \sum_{k=1}^n a_{ik}=1$$