A k-d tree can be built by recursively partitioning this k-dimensional space, so that at each level of recursion, the points are split into two subsets with respect to one dimension at a time. The splitting typically proceeds in a round-robin fashion over the k dimensions (or can be guided by heuristics, such as choosing the dimension with the widest spread).