let' look at graphical example to make little bit more sense we'll call the first figure in the following image as asecond as bthird as and the fourth as the gray squares in image represent data points in our scatter plot the axes represent some different features of something maybe it' age and incomeit' an example keep usingbut it could be anything and the gray squares might represent individual people or individual songs or individual something that want to find relationships between so start off by just picking three points at random on my scatterplot could be anywhere got to start somewhererightthe three points (centroidsi selected have been shown as circles in image so the next thing ' going to do is for each centroid 'll compute which one of the gray points it' closest to by doing thatthe points shaded in blue are associated with this blue centroid the green points are closest to the green centroidand this single red point is closest to that red random point that picked out of courseyou can see that' not really reflective of where the actual clusters appear to be so what ' going to do is take the points that ended up in each cluster and compute the actual center of those points for examplein the green clusterthe actual center of all data turns out to be little bit lower we're going to move the centroid down little bit the red cluster only had one pointso its center moves down to where that single point is and the blue point was actually pretty close to the centerso that just moves little bit on this next iteration we end up with something that looks like image now you can see that our cluster for red things has grown little bit and things have moved little bitthat isthose got taken from the green cluster if we do that againyou can probably predict what' going to happen next the green centroid will move little bitthe blue centroid will still be about where it is but at the end of the day you're going to end up with the clusters you' probably expect to see that' how -means works so it just keeps iteratingtrying to find the right centroids until things start moving around and we converge on solution