Show a machine a cloud of dots and it will sort them into groups no one labelled — guess where the centres are, assign each dot to its nearest, move the centres to the middle of what they caught, repeat. The groups snap into place. Slide the iterations and watch the centres settle.
Lloyd’s algorithm: (1) assign each point to the nearest centroid, (2) move each centroid to the mean of its points, repeat. Each full step can only DECREASE the total within-cluster sum of squares (WCSS), so it always converges. The instrument runs it live on three seeded blobs. A fail-loud self-check throws unless the WCSS is non-increasing across every iteration — the monotone descent that guarantees it settles (to a local optimum).
k-means finds a LOCAL optimum that depends on the initial centres (k-means++ picks them better) and you must choose k; it assumes round, similar-size clusters. The monotone-WCSS descent is exact.