Convex sets in general and its relation to K-means

A set is convex when the line segment between any two of its points never leaves it. That single sentence decides what K-means can and cannot learn: each cell \(S_k = \{\mathbf{x} : \|\mathbf{x} - \boldsymbol{\mu}_k\| \le \|\mathbf{x} - \boldsymbol{\mu}_j\| \; \forall j\}\) turns out to be an intersection of half-planes — automatically convex — so K-means can never carve out a crescent, a ring, or a spiral.

\(\lambda\):

the shapes from lecture

convex
non-convex
click a shape, then drag \(\mathbf{x}\) and \(\mathbf{y}\) on the canvas

the chord test