This paper will investigate the dimension of the kernel of a compact starshaped set, and the following result will be obtained: For each k and n, 1⩽k⩽n, let f(n, n) = n + 1 and f(n, k) = 2n if 1⩽k⩽n−1. Let S be a compact set in some linear topological space L. Then for a k with 1⩽ k ⩽ n, dim ker S ⩾ k if and only if for some ε > 0 and some n-dimensional flat F in L, every f(n, k) points of S see via S a common k-dimensional ge-neighborhood in F. If k = 1 or if k = n, the result is best possible. Furthermore, the proof will yield a Helly-type theorem for the dimension of intersections of compact convex sets in ℝn.