The no-three-in-line problem in discrete geometry asks how many points can be placed in the n × n {\displaystyle n\times n} grid so that no three points lie on the same line. The problem concerns lines of all slopes, not only those aligned with the grid. It was introduced by Henry Dudeney in 1900. Brass, Moser, and Pach call it "one of the oldest and most extensively studied geometric questions concerning lattice points".
At most 2 n {\displaystyle 2n} points can be placed, because 2 n + 1 {\displaystyle 2n+1} points in a grid would include a row of three or more points, by the pigeonhole principle. Although the problem can be solved with 2 n {\displaystyle 2n} points for every n {\displaystyle n} up to 46 {\displaystyle 46} , it is conjectured that fewer than 2 n {\displaystyle 2n} points can be placed in grids of large size. Known methods can place linearly many points in grids of arbitrary size, but the best of these methods place slightly fewer than 1.5 n {\displaystyle 1.5n} points, not 2 n {\displaystyle 2n} .
Several related problems of finding points with no three in line, among other sets of points than grids, have also been studied. Although originating in recreational mathematics, the no-three-in-line problem has applications in graph drawing and to the Heilbronn triangle problem.