# Definition
[Wikipedia's definition: ](https://en.wikipedia.org/wiki/K-means_clustering) 
> **k-means** Clustering is a method that aims to partition data observations into K clusters in which each observation belongs to the cluster with the nearest mean (cluster centers or cluster centroid), serving as a prototype of the cluster.
![K-means_convergence.gif](1KBpVpCXG5IM)

The algorithm works by iteratively updating the cluster centroid positions until all observations can't anymore be associated with a different cluster centroid.
This process is described in the animation above :arrow_up: (Credits: [Wikipedia](https://en.wikipedia.org/wiki/K-means_clustering) ).
This example :arrow_up:  shows what happens in a 2D space (ie we apply a KMeans on data observations having 2 features) but the same logical applies in 1D (like for each of our **RFM** features on which we apply an independent KMeans) or in higher dimensional spaces.


