  In this paper we introduce the signed barcode, a new visual representation of
the global structure of the rank invariant of a multi-parameter persistence
module or, more generally, of a poset representation. Like its unsigned
counterpart in one-parameter persistence, the signed barcode encodes the rank
invariant as a $\mathbb{Z}$-linear combination of rank invariants of indicator
modules supported on segments in the poset. It can also be enriched to encode
the generalized rank invariant as a $\mathbb{Z}$-linear combination of
generalized rank invariants in fixed classes of interval modules. In the paper
we develop the theory behind these rank invariant decompositions, showing under
what conditions they exist and are unique -- so the signed barcode is
canonically defined. We also connect them to the line of work on generalized
persistence diagrams via M\"obius inversions, deriving explicit formulas to
compute a rank decomposition and its associated signed barcode. Finally, we
show that, similarly to its unsigned counterpart, the signed barcode has its
roots in algebra, coming from a projective resolution of the module in some
exact category. To complete the picture, we show some experimental results that
illustrate the contribution of the signed barcode in the exploration of
multi-parameter persistence modules.
