The action of any lossless multilayer is described by a transfer matrix that can be factorized in terms of three basic matrices. We introduce a simple trace criterion that sorts the multilayers into three classes, each of whose properties are closely related to one (and only one) of the three basic matrices.