In topological graph theory, the Hanani–Tutte theorem is a result on the parity of edge crossings in a graph drawing. It states that every drawing in the plane of a non-planar graph contains a pair of independent edges (not both sharing an endpoint) that cross each other an odd number of times. Equivalently, it can be phrased as a planarity criterion: a graph is planar if and only if it has a drawing in which every pair of independent edges crosses evenly (or not at all).
The result is named after Haim Hanani, who proved in 1934 that every drawing of the two minimal non-planar graphs K5 and K3,3 has a pair of edges with an odd number of crossings, and after W. T. Tutte, who stated the full theorem explicitly in 1970. A parallel development of similar ideas in algebraic topology has been credited to Egbert van Kampen, Arnold S. Shapiro, and Wu Wenjun.
One consequence of the theorem is that testing whether a graph is planar may be formulated as solving a system of linear equations over the finite field of order two. These equations may be solved in polynomial time, but the resulting algorithms are less efficient than other known planarity tests.
For other surfaces S than the plane, a graph can be drawn on S without crossings if and only if it can be drawn in such a way that all pairs of edges cross an even number of times; this is known as the weak Hanani–Tutte theorem for S. The strong Hanani–Tutte theorem, known for the projective plane as well as for the Euclidean plane, states that a graph can be drawn without crossings on S if and only if it can be drawn in such a way that all independent pairs of edges cross an even number of times, without regard for the number of crossings between edges that share an endpoint.