The concepts of perfect and of ideal 0,1 matrices can be extended to 0,±1 matrices. Given a 0,±1 matrix *A*, denote by *n*(*A*) the column vector whose *i*th component is the number of -1's in the *i*th row of matrix *A*. A 0,±1 matrix *A* is *perfect* if the polytope {*x* : *Ax* ≤ 1 - *n*(*A*), 0 ≤ *x* ≤ 1} is integral. Similarly, a 0,±1 matrix *A* is *ideal* if the polytope {*x* : *Ax* ≥ 1 - *n*(*A*), 0 ≤ *x* ≤ 1} is integral. A matrix is *totally unimodular* if every square submatrix has determinant equal to 0,±1. In particular, all entries are 0,±1. A milestone result in the study of integral polyhedra, due to Hoffman and Kruskal [122], is that the following statements are equivalent for an integral matrix *A*.

• The polyhedron {*x* ≥ 0 : *Ax* ≤ *b*} is integral for each integral vector *b*,

• *A* is totally unimodular.

We prove this in section 6.1. It follows from this result that a totally unimodular matrix is both perfect and ideal.

A 0,±1 matrix is *balanced* if, in every square submatrix with exactly two nonzero entries per row and per column, the sum of the entries is a multiple of four. The class of balanced 0,±1 matrices properly includes totally unimodular 0,±1 matrices.