k-means clustering is a method of vector quantization, originally from signal processing, that is popular for cluster analysis in data mining.k-means clustering aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster.This results in a partitioning of the data space into Voronoi cells.t was asserted in that the relaxed solution of k-means clustering, specified by the cluster indicators, is given by the PCA (principal component analysis) principal components, and the PCA subspace spanned by the principal directions is identical to the cluster centroid subspace.