I'm currently working through a proof and I'm stuck at figuring out how $\sum_{i=1}^n ((\sum_{j=1}^k C_{ij})^2)$ becomes $\sum_{i=1}^n \sum_{j=1}^k C_{ij}^2 + 2\sum_{i=1}^n \sum_{j=1}^k \sum_{h=1, h \neq j}^k C_{ij}C_{ih}$
I've tried working through some basic summation algebra but I can't seem to find an identity or rule that gives me the second equation.