where (ij) means all of the distinct pairs ij - so the pair 12 is the same as pair 21. The constant term C accumulates the (ii) pairs and is a constant which only depends of the number of units.
H' - H | = C - ai' ¬ j = i wij aj - (C - ai ¬ j = i wij aj) |
= 2 ai ¬ j = i wij aj | |
= 2 ai j wij aj - 2 wii |