After one assignment and update, sum the assigned squared distances before and after the centroid move. The total is only for this displayed step.

highlighted = computed this step

Sum distances after assignment

The assignment step already chose clusters. Using the old centroids, the assigned squared distances are all 2, so the old within-cluster total is 12.

old total=12\text{old total}=12
Within-cluster squared-distance totalOld and updated-centroid totals for the same assignment.within-cluster squared-distance totalsame assignment: sum d^2 before and after recomputing centroidsone displayed assignment/update only; no convergence or best-k claimclusterassigned pointsold d^2 totalnew d^2 totalc1(0,0) (2,0) (0,2)2+2+2=68/9+20/9+20/9=16/3c2(6,6) (6,8) (8,6)2+2+2=68/9+20/9+20/9=16/3old total=12new same-assignment total=32/3

Keep the same assignment

Now keep the same assigned groups and measure to the updated centroids. Each cluster contributes 16/3.

new same-assignment cluster total=16/3\text{new same-assignment cluster total}=16/3
Within-cluster squared-distance totalOld and updated-centroid totals for the same assignment.within-cluster squared-distance totalsame assignment: sum d^2 before and after recomputing centroidsone displayed assignment/update only; no convergence or best-k claimclusterassigned pointsold d^2 totalnew d^2 totalc1(0,0) (2,0) (0,2)2+2+2=68/9+20/9+20/9=16/3c2(6,6) (6,8) (8,6)2+2+2=68/9+20/9+20/9=16/3old total=12new same-assignment total=32/3

The new total for this one step

Adding the two updated-centroid cluster totals gives 32/3. This is only for the displayed assignment/update, not a convergence or best-k claim.

new same-assignment total=32/3\text{new same-assignment total}=32/3
Within-cluster squared-distance totalOld and updated-centroid totals for the same assignment.within-cluster squared-distance totalsame assignment: sum d^2 before and after recomputing centroidsone displayed assignment/update only; no convergence or best-k claimclusterassigned pointsold d^2 totalnew d^2 totalc1(0,0) (2,0) (0,2)2+2+2=68/9+20/9+20/9=16/3c2(6,6) (6,8) (8,6)2+2+2=68/9+20/9+20/9=16/3old total=12new same-assignment total=32/3