The space of barcode bases for persistence modules

The barcode of a persistence module serves as a complete combinatorial invariant of its isomorphism class. Barcodes are typically extracted by performing changes of basis on a persistence module until the constituent matrices have a special form. Here we describe a new algorithm for computing barcodes which also keeps track of, and outputs, such a change of basis. Our main result is an explicit characterisation of the group of transformations that sends one barcode basis to another. Armed with knowledge of the entire space of barcode bases, we are able to show that any map of persistence modules can be represented via a partial matching between bars provided that neither source nor target admits nested bars in its barcode. We also generalise the algorithm and results described above to work for zizag modules.


Introduction
Persistence modules appear in different forms and guises across many areas of mathematics.In recent years, particular interest and focus has come from their extensive use in topological data analysis (TDA) in general and persistent homology in particular.In this paper, we examine persistence modules of the form (V ‚ , f ‚ ): where each V i is a vector space of finite dimension n i (over an underlying field F) and each f i : V i´1 Ñ V i is a linear map.We study three different aspects.

Computing Barcode Bases.
The first is the central question of finding a barcode basis for (V ‚ , f ‚ ).This amounts to a choice of basis for each V i with respect to which the linear maps f i have a particularly nice form -they admit at most a single 1 in each row and column, with all other entries being 0. The existence of such bases and matrix representations is well known [Gab72].We say that the matrices are in barcode form and the corresponding basis of À ℓ i=0 V i is a barcode basis, since the barcodes familiar from TDA can easily be extracted.
Algorithms to compute barcode bases in TDA typically take as input a filtered chain complex as in [ZC05], where one has recourse to matrix representations of the boundary operators.Algorithms for general persistence modules include the well-known [CdS10] and much more recently, [HM20] and [HP17].Here we present a new algorithm that takes as its input a matrix representation A ‚ = (A 1 , . . ., A ℓ ) relative to some initial basis of the persistence module (V ‚ , f ‚ ) and outputs a sequence g = (g 0 , . . ., g ℓ ) of change of basis matrices g i for each of the V i so that the new matrix representation A1 ‚ = (A 1 1 , . . ., A 1 ℓ ) with A 1 i = g i ¨Ai ¨g´1 i´1 is in barcode form.Our algorithm in Section 2.2 is explicit and elementary in the sense that every intermediate step amounts to performing standard (row or column) operations on the constituent A i 's.The key difficulty here is that column operations on A i often force new matrix operations on A k for k ă i, and similarly row operations on A i often require changes in A k for k ą i.
The Space of Barcode Bases.Our second goal is to describe the set of all barcode bases 1 of (V ‚ , f ‚ ).We show that this set can naturally be identified as the stabiliser of a matrix representation A ‚ of (V ‚ , f ‚ ), and hence as a subgroup of the product G := GL(n 0 ; F) ˆ¨¨¨ˆGL(n ℓ ; F), where GL(d; F) indicates the general linear group of invertible d ˆd matrices with entries in F. Writing [i 1 , j 1 ] ĺ [i 2 , j 2 ] whenever i 1 ď i 2 ď j 1 ď j 2 and Mat(m ˆn; F) for the set of m ˆn matrices with coefficients in F, we show in Theorem 3.4 that the set of barcode bases is in one-to-one correspondence with Mat(d i 1 j 1 ˆdi 2 j 2 ; F).
Here d ij is the multiplicity of the interval [i, j] in the barcode of (V ‚ , f ‚ ).If the matrix representation is already in barcode form, then the elements in GL(d ij ; F) correspond to changes of basis for the sub-vector space of V i spanned by the basis elements corresponding to the bars [i, j], and the elements in Mat(d i 1 j 1 ˆdi 2 j 2 ; F) represent the changes to basis vectors in V i 2 corresponding to intervals [i 2 , j 2 ] obtained by adding vectors from V i 2 which correspond to intervals [i 1 , j 1 ].
Simplifying Maps of Persistence Modules.We now turn attention to our third problem.Given a map of persistence modules we seek barcode bases for source and target in terms of which φ assumes its simplest form, in the sense that we now specify.An interval [i, j] represents a submodule canonically isomorphic to the interval module I[i, j] ‚ .It is an elementary observation that such a module can be mapped non-trivially to another interval module I[i 1 , j 1 ] ‚ if and only if [i 1 , j 1 ] ĺ [i, j]; and in this case the non-zero map is unique up to a non-zero scalar.In the simplest case, φ induces a partial matching where each bar in the source is mapped to exactly one in the target or mapped to zero.Surprisingly, we show in Theorem 4.3 that such a partial matching exists (after a change of barcode bases) whenever neither source nor target admit a pair of strictly nested intervals in their respective barcode decompositions. 2n an example we also show that these conditions are necessary.
Zigzag Modules.Finally, we generalise the algorithm and theorems described above to zizag modules of a fixed type τ: the linear maps of the persistence module (1) can go Ð Ý V i according to pattern fixed by τ.Such modules are also classified in terms of sums of interval modules.Our algorithm can be adapted to compute barcode bases of zizag modules of any type.Next, we introduce a generalisation of the order ĺ that depends on the type τ.This order takes into account that the order ĺ has to be reversed when all the arrows in (1) are reversed.With this order in place, we can once again classify the set of all barcode bases, see Theorem 5.11.Similarly when considering maps of zizag modules, we generalise the notion of strictly nested bars, which once again depends on the type τ.Excluding such nested bars, we are able to obtain barcode bases of the source and target zizag modules in terms of which the map is described by a partial matching on the set of bars; see Theorem 5.14.
Outline.We take the view that a persistence module (V ‚ , f ‚ ) is a quiver representation.In Section 2, we provide a constructive proof (and concomitant algorithm) of Gabriel's decomposition theorem for persistence modules.In Section 3 we identify the set of all barcode bases with a stabiliser of the action of the group G on the set of all possible matrix representations of (V ‚ , f ‚ ).In Section 4 we study maps between persistence modules by viewing them as representations of ladder quivers with relations.Gabriel's theorem no longer applies here; however, using similar arguments as in [AEHT18], we are able to prove a finite decomposition when source and target have no nested bars.Finally, in Section 5 we extend our results to any quiver of type A, that is zigzag persistence modules.

Related work.
As mentioned above, there are several well known algorithms which compute barcodes of persistence modules.Some start with chains on a filtered simplicial complex, some deal with more general persistence modules and in some cases zizag modules.
There are two algorithms that explicitly deal with computing the barcode bases associated to the interval decomposition.In [CDN19] the authors use matrix factorisation techniques to obtain bases in which the matrices are in echelon form.This technique also applies to zizag modules.In [GGSV21] the authors inductively compute interval bases using basis completions techniques at each step, but they do not deal with the zizag case.Neither of these papers attempts to compute the set of barcode bases associated with the persistence module, and the algorithm we describe here takes a different approach to reducing matrices in barcode form.Most recently, the authors of [HGZHP21] use U-match matrix factorisation to reduce computational complexity and memory storage in computing barcodes.
It was shown in [EH16] that maps between persistence modules of length less than 5 admit a tractable classification in the sense that the associated ladder persistence modules are always of finite type.In contrast, the authors of [BE18] find an infinite class of indecomposable non-isomorphic ladder persistence module whenever the length is greater then 5.In [AEHT18] the authors outline an algorithm which computes the decomposition into a sum of indecomposables for ladder persistence modules of length ă 5.
Acknowledgement.The authors are members of the Centre for Topological Data Analysis, funded by the EPSRC grant EP/R018472/1.We are grateful to the two anonymous referees for their helpful comments and corrections.

Persistence Modules and Barcode Bases
A persistence module, for the purposes of this paper, is a finite collection (V ‚ , f ‚ ) of finite-dimensional vector spaces V i over a field F along with F-linear maps f i arranged as follows: The number ℓ + 1 is called the length of (V ‚ , f ‚ ).The direct sum of (V ‚ , f ‚ ) with another persistence module (W ‚ , h ‚ ) of the same length is defined pointwise -in other words, the vector space at its i-th position is V i ' W i for each admissible index i, and similarly the corresponding linear map is given by f commutes for each index i in t1, . . ., ℓu.Isomorphisms from (V ‚ , f ‚ ) to itself are called automorphisms, and these evidently form a group under composition.We denote this group by Aut(V ‚ , f ‚ ).
The interval module corresponding to a pair of non-negative integers i ď j is the persistence module I[i, j] ‚ given by 0 / / ¨¨¨/ / 0 / / F / / ¨¨¨/ / F / / 0 / / ¨¨¨/ / 0, where the contiguous string of F's spans ti, i + 1, . . ., j ´1, ju, all intermediate F Ñ F maps are identities, and all other vector spaces are trivial.The importance of interval modules stems from the following result [ZC05].THEOREM 1.1.For each persistence module (V ‚ , f ‚ ) of length ℓ + 1, there exists a finite set of non-negative integer pairs (with [i p , j p ] Ă [0, ℓ] for all 1 ď p ď k), called the barcode of (V ‚ , f ‚ ), and an integer multiplicity d i p j p ą 0 so that (V ‚ , f ‚ ) is isomorphic to a direct sum of interval modules: Here the i-th summand on the right side is to be interpreted as the d i p j p -fold direct sum of the interval module I[i p , j p ] ‚ with itself.
This interval decomposition theorem follows from Gabriel's foundational result on the decomposability of quiver representations [Gab72] -since (V ‚ , f ‚ ) is a representation of a type-A ℓ+1 quiver.Our goal here is to provide an explicit algorithm which not only furnishes such the isomorphism (2), but can also be readily implemented on a computer.
To this end, fix a persistence module (V ‚ , f ‚ ) of length ℓ + 1 and set n i := dim F V i for each i P t0, . . ., ℓu.Without loss of generality, we may select a basis family where each B i forms an ordered basis for the vector space V i .This choice amounts to fixing an isomorphism V i » F n i for each i.Thus, every linear map f i : V i´1 Ñ V i can be represented (in terms of the chosen bases B i´1 and B i from B) as a matrix A i of size n i ˆni´1 with entries in F; consequently, (V ‚ , f ‚ ) is isomorphic to (3) In light of Theorem 1.1, we are particularly interested in a special class of basis families.
DEFINITION 1.2.An m ˆn matrix A of rank r is in barcode form if there exists a strictly increasing function c : t1, . . ., ru Ñ t1, . . ., nu so that Thus, a matrix is in barcode form whenever its entries lie in t0, 1u, with at most one non-zero term in each row and column, and the r non-zero terms appear in the first r rows and in strictly increasing column order.
A basis family B is called an barcode basis for (V ‚ , f ‚ ) if all of the A i are in barcode form.The natural basis arising from an interval decomposition of a persistence module is a barcode basis.EXAMPLE 1.3.Consider, for instance, the persistence module of length 4 given by the barcode containing 0 ď 3 along with 0 ď 1 and 1 ď 3, each with multiplicity one: With respect to the basis family obtained by ordering these intervals from top to bottom, the matrices A i are given by and all three are evidently in barcode form.Conversely, one can also recover the interval decomposition immediately from these three matrices.
To put our quest for a constructive proof of Theorem 1.1 on a firm algebraic footing, let X be the set of all the possible matrix-sequences A ‚ which can arise in (3).It is a (strict) subset of the product of matrices of the appropriate dimensions: Writing GL(n; F) for the group of all n ˆn invertible matrices over F, consider the product which acts naturally via a change-of-basis action on X: the group element g := (g 0 , . . ., g ℓ ) sends each matrix-sequence A ‚ in X to the new sequence (gA) ‚ given by (gA for each admissible index i.This is equivalent to replacing the original basis family B = tB i u with the new basis family gB = tg i B i u.Thus, X is the free orbit of A ‚ under this G-action.So our first task, solved in Section 2, translates to discovering some g P G that transforms a given basis family B of (V ‚ , f ‚ ) to a barcode basis.

Constructing a Barcode Basis
Throughout this section, we fix a persistence module (V ‚ , f ‚ ) expressed as a sequence of matrices A ‚ as in (3) with respect to an arbitrary (i.e., not necessarily barcode) basis family B.

Barcode bases via elementary matrix operations.
To conveniently describe relevant elements of G, we fix notation for matrices which implement certain fundamental row and column operations.DEFINITION 2.1.For each dimension n ą 0, distinct indices 1 ď p, q ď n, and scalar λ P F, let e n p,q (λ) denote the elementary matrix in GL(n; F) which has 1's all along its diagonal, λ in the (p, q)-th position, and zeros everywhere else.
Since the dimension n will be clear from context, we omit it from the superscript and simply write e p,q (λ) to indicate the relevant elementary matrix.The following standard facts about such matrices will be freely used in the sequel -(1) multiplying a matrix on the left by e p,q (λ) implements the following elementary row operation which we denote R pÐq (λ); similarly, (2) multiplying a matrix on the right by e p,q (λ) implements the following elementary column operation Col(q) Ð Col(q) + λ ¨Col(p), which we denote C qÐp (λ); and finally, (3) the inverse of e p,q (λ) is e p,q (´λ).
REMARK 2.2.Consider the element g = (g 0 , . . ., g ℓ ) P G for which g i = e p,q (λ) and all the other g j are identity matrices.The action of this g on a given matrix sequence A ‚ is to simultaneously perform C pÐq (λ) on A i and R qÐp (´λ) on A i´1 while leaving all the other A j 's invariant.
The following result plays an essential part in our constructive proof of Theorem 1.1.In its statement and beyond, we will use A(p, q) to indicate the entry in the p-th row and q-th column of a given matrix A.
LEMMA 2.3.Assume that the first ℓ ´1 matrices tA i | 1 ď i ă ℓu of (3) are in barcode form, and that the last matrix A ℓ has a pivot in the (r, q) position, i.e., A ℓ (r, q) = 1 and all other entries in the q-th column are zero.If there is a nonzero entry α := A ℓ (r, p) in the same row r but some other column p ą q, then there exists g P G with g ℓ = Id so that (gA) ‚ equals A ‚ except A ℓ where the α entry is replaced by zero.
PROOF.We proceed by induction on ℓ, noting that the case ℓ = 1 is immediately true since there is only one matrix in sight.Assume that the statement holds up to ℓ ´1.The r-th row of A ℓ contains a pivot 1 in the q-th column and some α ‰ 0 in the p-th column.To eliminate this offending α, we perform C pÐq (´α) on A ℓ by performing the basis change e p,q (´α) on V ℓ´1 .Since A ℓ (r, q) is assumed to be a pivot, the only resulting difference in A ℓ is that the (r, p)-th entry changes from α to 0. But by Remark 2.2, we are also compelled to perform R qÐp (α) on the preceding matrix A ℓ´1 .This results in a new matrix A 1 ℓ´1 , and there are now 2 cases to consider, of which only the second requires the inductive hypothesis: Case 1: if the p-th row of A ℓ´1 is identically zero, then our row operation has had no effect whatsoever; thus, A 1 ℓ´1 = A ℓ´1 is still in barcode form and we have arrived at the desired result.
Case 2: If the p-th row of A ℓ´1 is nonzero, then since q ă p and A ℓ´1 is in barcode form, we see that the q-th row of A ℓ´1 must also be non-zero.Then by Definition 1.2 they must have pivot ones in distinct columns, say c and d respectively, and furthermore c ă d.Thus, after we have performed R qÐp (α) on A ℓ´1 , the resulting matrix A 1 ℓ´1 has the form By induction, there exists a g P ś ℓ´1 i=0 GL n i (F) with g ℓ´1 = Id so that g i A i g ´1 i´1 is still in barcode form for 1 ď i ď ℓ ´2, and is again in barcode form.Furthermore, since g ℓ´1 = Id, the matrix A ℓ is left unchanged by this change of basis.The desired basis change is (g 0 , g 1 , . . ., g ℓ´2 , e p,q (´α), Id).PROPOSITION 2.4.Given the sequence of matrices A ‚ as in ( 6), there is a g P G such that (gA) ‚ has all its matrices in barcode form.
PROOF.When ℓ = 1, we may diagonalise the matrix A 1 via standard row and column operations.Proceeding by induction for ℓ ą 1, assume the existence of some group element satisfying the following property: the matrices g i A i g ´1 i´1 are in barcode form for 1 ď i ď ℓ ´1.
Consider g = (g 1 , Id n ℓ ), which evidently lies in G. Replacing A ‚ by (gA) ‚ if necessary, we may assume that A ‚ has its first ℓ ´1 matrices in barcode form.Performing row operations on A ℓ has no impact on the previous matrices, as it corresponds to multiplying A ℓ on the left by some g ℓ .Thus, we may assume without loss of generality that all previous matrices are in barcode form while A ℓ itself is in reduced row echelon form.By Lemma 2.3, there is a basis change g P G which zeroes out each non-pivot entry whilst maintaining the barcode form of the previous matrices.Applying these basis changes gets us to the desired barcode basis.REMARK 2.5.If B is the basis family with respect to which (V ‚ , f ‚ ) has matrix form A ‚ , then gB is a barcode basis where g P G is as in Proposition 2.4.We may therefore regard it as a constructive analogue of Theorem 1.1.

Algorithms.
Here we describe algorithms which implement the constructions of Lemma 2.3 and Proposition 2.4.In particular, the main algorithm CompPers described below accepts as input an initial sequence of matrices A ‚ as in (3) and puts them in barcode form.The sub-computations which we require frequently have been isolated into concomitant subroutines, described as follows.
(1) The first subroutine ColOp implements the inductive strategy underlying our proof of Lemma 2.3; in particular, this algorithm acts as step k of the inductive procedure described in the proof of that lemma.(2) The second subroutine Reduce takes as input a sequence A ‚ for which the first ℓ 1 matrices are in barcode form together with an invertible matrix g P ś ℓ´1 i=0 GL(n i ; F).It then reduces the final matrix A ℓ until it is in barcode form, while maintaining the barcode form of all previous matrices and suitably updating the basis change g.
(3) Finally, the main algorithm CompPers(A ‚ ) takes as input an arbitrary sequence of matrices A ‚ and produces as output g P G together with (gA) ‚ in barcode form.
From these matrices we can directly access all intervals in barcode of (V ‚ , f ‚ ).
REMARK 2.6.The computational complexity of CompPers(A ‚ ) can be expressed in terms of n = max 0ďiďℓ n i and ℓ.The cost of placing all the A i in reduced row echelon form via Gaussian elimination is O(n 3 ℓ).Furthermore, performing column operations to further reduce these matrices requires at most O(n 2 ) operations on each matrix.And

Algorithm 1: ColOp
Input: A ‚ , g, k, r, q, p Output: Updated A ‚ and basis change g, zeroing out A k (r, p) Algorithm 2: Reduce Input: A ‚ , g, where A ‚ has its first ℓ ´1 matrices in reduced form Output: A ‚ in reduced barcode form and updated g 1 row reduce (A ℓ ) 2 Append g with corresponding g ℓ 3 while there are A ℓ (r, p) ‰ 0 terms with A ℓ (r, q) = 1 a pivot do 4 A ‚ , h =ColOp(A ‚ , g, ℓ, r, q, p) column operations on A i will, in the worst case, require down-stream column operations on A i´1 . . .A 1 .Thus, for column operations, we have a O(n 2 ř ℓ Combining these factors, the total complexity of the algorithm is At each step of the algorithm, we perform an elementary basis change on a single vector space V i , which amounts to multiplying a matrix g i P GL(V i ) by an elementary matrix.,This incurs an O(n) cost; thus, if we also wish to keep track of the basis changes, then the total complexity of CompPers becomes We conclude with an illustrative example of how CompPers acts on a sequence of input matrices.EXAMPLE 2.7.Consider To put A 3 in barcode form, we must zero out the terms A 3 (1, 3) and A 3 (2, 3) using column operations.At each step, we will be performing row and column operations on matrices of A ‚ , amounting to basis changes on the vectors spaces V 0 , V 1 and V 2 .For conciseness sake, we will not keep track of the basis changes done along the way, and will simply be performing operations on the matrices to put them in barcode form.
We begin by zeroing out the A 3 (2, 3) term.
. We see here that the third row of A 1 is zero, so we are in Case 1 of Lemma 2.3, and so we are done.
We have achieved our goal of zeroing out A 3 (2, 3) whilst keeping the previous matrices in barcode form, making no other changes to A 3 .It remains to zero out the A 3 (1, 3) term.

1: C
Since the third row of A 1 is zero, this operations has no impact on A 1 , giving us matrices 1 0 0 0 1 0 0 0 0 and so we are done.

The Space of Barcode Bases
Let A ‚ P X be a sequence of matrices as in (3) arising from an arbitrary choice of basis for some persistence module (V ‚ , f ‚ ).Consider the group G from (5), recalling that G acts on X via change of basis.Our quest to describe all possible barcode bases for (V ‚ , f ‚ ) begins with a formula for the stabiliser of the chosen matrices A ‚ under this G-action.Namely, we seek the subgroup of G given by To describe Stab(A ‚ ), we employ two binary relations on the set of all intervals which might possibly arise in the barcode decomposition of (V ‚ , f ‚ ) à la Theorem 1.1.
DEFINITION 3.1.Let ĺ be the binary relation on (Although this relation ĺ is reflexive and anti-symmetric on its domain, it is not transitive and hence does not form a partial order.) The second binary relation is the standard lexicographic order.This yields a total order on the set of all possible bars in the interval decomposition of our persistence module (V ‚ , f ‚ ).
REMARK 3.3.The binary relation ĺ is compatible with the lexicographical order Ĳ in the sense that [a, b] Given a barcode basis B, we may totally order its bars using the lexicographic order, arbitrarily ordering bars with the same start and end point.This in turn yields a natural ordering of the bases B i .The matrix representation of such bases is unique.Indeed, the first d 0i basis vectors of B i are part of [0, i] bars, then the next d 0,i+1 basis vectors are those part an [0, i + 1] bar, and so on following the lexicographic ordering until finally the d i,ℓ basis vectors part of an [i, ℓ] bar.This yields a matrix representation for which A i is of the form where As such, bases that have been ordered in the above way are barcode bases in the usual sense; we call these ordered barcode bases of (V ‚ , f ‚ ) and devote the remainder of this section to completely characterising them.THEOREM 3.4.For each pair [i, j] in t0, 1, . . ., ℓu with i ď j, let d ij equal the multiplicity of i ď j in the barcode of (V ‚ , f ‚ ), with the understanding that d ij = 0 whenever [i, j] is not in Bar(V ‚ , f ‚ ).Then there is a bijection of sets: Mat(d i 1 j 1 ˆdi 2 j 2 ; F).
(The induced group structure on the right side is given in Corollary 3.5 below) PROOF.Elements in the same orbit have isomorphic stabilisers, so without loss of generality we may assume A ‚ is given by the matrix representation of the linear maps in a ordered barcode basis.An element g = (g 0 , . . ., g ℓ ) of G lies in Stab(A ‚ ) if and only if we have an equality of matrix products for each i P t1, . . ., ℓu.Set k i := rank A i and note that since A i is in barcode form, there is a strictly increasing function c i : t1, . . ., k i u Ñ t1, . . ., n i´1 u so that the unique nonzero entry in the p-th row of A i lies in column c i (p).The product g i ¨Ai on the left side of our equality has as its q-th column either the c ´1 i (q)-th column of g i (if q lies in the image of c i ), or is identically zero otherwise.Conversely, for p ď k i the matrix A i ¨gi´1 on the right side has as its p-th row the c(p)-th row of g i´1 , and its rows corresponding to p ą k i are identically zero.Therefore, requiring these two products to be equal amounts to imposing three types of constraints on the entries of g i´1 and g i : (1) g i (p, q) = 0 whenever p ą k i ě q.
(2) g i´1 (p, q) = 0 whenever p P Img(c i ) and q R Img(c i ).
(3) g i´1 (c i (p), c i (q)) = g i (p, q) whenever both p and q are ď k i .
Recalling that (V ‚ , f ‚ ) is the persistence module represented by A ‚ , we have a bijection Let [i 1 , j 1 ] and [i 2 , j 2 ] be two intervals in the barcode decomposition of (V ‚ , f ‚ ), and denote their corresponding sequences by tp ‚ u and tq ‚ u.It follows from constraint (3) above that g k (p k , q k ) remains constant whenever k ranges over the indices in [i, j] : In other words, we have The following observation is crucial.
To prove this claim, note that if i 2 ă i 1 holds then p i 1 ą k i 1 ě q i 1 , so g i 1 (p i 1 , q i 1 ) = 0 by constraint (1) above.Thus the claim extends to all k in [i, j] by (9).Similarly, if j 2 ă j 1 then p j 2 P Img(c j 2 ) but q j 2 R Img(c j 2 ), whence g j 2 (p j 2 , q j 2 ) = 0 by constraint (2).Once again, this extends to all k P [i, j] by (9), and so the claim is proved.
Returning to the main argument, for each pair [i 1 , j 1 ] ĺ [i 2 , j 2 ] of intervals in the barcode of (V ‚ , f ‚ ), we may select some k [i 1 ,j 1 ] the submatrix of g k spanned by all entries g k (p k , q k ) for which tp ‚ u and tq ‚ u are sequences corresponding to intervals of type [i 1 , j 1 ] and [i 2 , j 2 ] respectively.Thus, g [i 1 ,j 1 ] has exactly d i 1 j 1 rows and d i 2 j 2 columns; and from (9) we know that it forms a submatrix of g k for all k in [i 1 , j 1 ] X [i 2 , j 2 ].It follows from our claim that each g k is block upper-triangular: The fact that g k must be invertible forces the diagonal blocks to be invertible, while the off-diagonal blocks remain entirely unconstrained.The map Mat(d i 1 j 1 ˆdi 2 j 2 ; F), which sends each g to this distinguished collection of invertible g [i,j] and arbitrary g furnishes the desired bijection.
Using the block upper triangular form of the matrices g k described in the argument above, we may immediately obtain the group structure of Stab(A ‚ ).
COROLLARY 3.5.For g, h P Stab(A ‚ ), we have with the sum being indexed over intervals that satisfy [i 1 , If F is the field of real or complex numbers, as a subgroup of ś ℓ i=0 GL n i (F), the group Stab(A ‚ ) is a Lie group.Theorem 3.4 immediately allows us to obtain its dimension.COROLLARY 3.6.If F is the field of real or complex numbers, As stated at the start of this section, our task here is to determine the space of all possible ordered barcode bases for a given persistence module (V ‚ , f ‚ ).
We denote by B = tB = (B i ) 0ďiďℓ | B i Ă V i is an ordered basisu the set of all possible ordered bases of (V ‚ , f ‚ ).Having fixed an initial basis B P B, we know the group G from (5) acts freely and transitively on the set B, so that any element of B may be expressed as gB for some unique g P G. Thus, once we have fixed an initial basis B, the set B may be identified with G. Then as subset of B, the set of all possible ordered barcode bases of (V ‚ , f ‚ ) can be identified as a subset of the group G.
Recall, X is the set of all possible matrix-sequences as defined in (4).For each possible basis B P B, we define A(B) ‚ P X to be the matrix representation of the linear maps f ‚ in the chosen basis B. This assignment prescribes the matrix representation map and finding all possible ordered barcode bases for (V ‚ , f ‚ ) amounts to determining all bases B P B for which A(B) ‚ is as in (8).Furthermore, this map is equivariant in the sense that A(gB) ‚ = (gA(B)) ‚ for each g P G, where g acts via the basis action defined in (6).
The following result makes the link between the stabiliser of A ‚ and the set of ordered barcode bases of a persistence module (V ‚ , f ‚ ).
PROPOSITION 3.7.Given a persistence module (V ‚ , f ‚ ) together with an ordered barcode basis B with matrix representation A ‚ , the set of all ordered barcode bases is given by the orbit Stab(A ‚ )B.
PROOF.Let B 1 be another ordered barcode basis.As seen above, two ordered barcode bases have the same matrix representations (8), so that A(B 1 ) ‚ = A ‚ .As previously stated, G acts freely and transitively on B so that there exists a unique g P G for which B 1 = gB.We then have As such, we may identify the set of all ordered barcode bases of a persistence module (V ‚ , f ‚ ) with Stab(A ‚ ), which was fully characterised in Theorem 3.4.REMARK 3.8.The automorphism group Aut Q (M) of a representation M of a general quiver Here ). Viewed from this context, the main content of Theorem 3.4 is an explicit description of U in the special case where Q is a type-A quiver.In particular, U is generated by matrices which have the form (10), but with identity blocks along the diagonal.This explicit description of U in the type-A case plays a crucial role in subsequent results which appear in this paper.

Simplifying Maps of Persistence Modules
We now shift our interest to maps of persistence modules φ where V ‚ and W ‚ are persistence modules of length ℓ + 1.We recall that each such φ ‚ is a collection of linear maps φ i : V i Þ Ñ W i satisfying φ i ˝fi = h i ˝φi´1 .In other words, the following diagram commutes: Our objective here is to show that if neither V ‚ nor W ‚ admits a pair of strictly nested bars in its barcode, then there exist barcode bases of V ‚ and W ‚ in which φ induces a partial matching of the bars.To make this precise, we first describe the nestedness condition.
Note that two intersecting bars are strictly nested if and only if they are not related by ĺ.
Before stating the main result, we remark that the data of our map φ ‚ can be interpreted as a representation of the rectangle quiver of length ℓ + 1: Such representations have been called ladder persistence modules in the literature [EH16].
When treating φ as a ladder persistence module, we will denote it (V ‚ , W ‚ , φ ‚ ).We may therefore seek to decompose φ ‚ into a direct sum of indecomposable ladder persistence modules.
DEFINITION 4.2.Three families of ladder persistence modules are defined below: (1) Given intervals [i 1 , It is readily seen that these three families of ladder persistence modules are mutually non-isomorphic and indecomposable.Therefore, by the Krull-Schmidt theorem, if φ ‚ were to decompose as a direct sum of modules sourced from these three families, then such a decomposition would be unique.From such a decomposition, we can obtain the desired partial matching of the source and target bars: the presence of each R are matched to 0. With this in mind, here is the main result of this section.THEOREM 4.3.Let (V ‚ , W ‚ , φ ‚ ) be a ladder persistence module of length ℓ + 1 where neither V ‚ nor W ‚ admit a pair of strictly nested bars.Then there are integers r [i 1 ,j 1 ] and d ȋj P N for which: (In Example 4.4 below we show that the assumption precluding nested bars is necessary.) PROOF.The argument proceeds along three basic steps.
Step 1: Representing φ.Consider ordered barcode bases and d W i,j be the multiplicity of [i, j] bars in the barcodes of V ‚ and W ‚ .We denote by b ‚ the matrix representations of the maps φ ‚ in these chosen bases.As in the proof Theorem 3.4, let [i 1 , j 1 ] and [i 2 , j 2 ] be two intervals in the barcode decomposition of (V ‚ , f ‚ ), and denote their corresponding sequences by tp ‚ u and tq ‚ u.Using the commuting relations [i 1 ,j 1 ] , to be the submatrix of b i obtained by taking the d V i 2 ,j 2 columns corresponding to basis vectors part of an [i 1 , j 1 ] bar of V, and the d W i 1 ,j 1 rows corresponding to basis to basis vectors part of an [i 2 , j 2 ] bar of W. From the above observation, Thus, the matrices b ‚ are completely determined by the matrices [i 1 ,j 1 ] and may therefore be represented as a single block matrix Step 2: Admissible Operations.Given two ordered barcode bases B V and B w we may define a block matrix as above, which we denote b(B V , B W ). By Proposition 3.7, the set of ordered all barcode bases of (V ‚ , f ‚ ) coincides precisely with the orbit Stab(A(B 1 ) ‚ )B 1 , where B 1 is an ordered barcode basis.Then given (h, k) P Stab(A(B V ) ‚ ) ˆStab(A(B W ) ‚ ), we may consider b(hB V , kB W ). As seen in the proof of Theorem 3.4, we are able to completely characterise an element h P Stab(A(B V ) ‚ ) in terms of the submatrices h [i 1 ,j 1 ] , so that h may be represented as a single block matrix ).The same is true for k P Stab(A(B W ) ‚ ), whence b(hB V , kB W ) equals the (matrix) product k ¨b(B V , B W ) ¨h´1 .Thus, we are only allowed to perform the following legal operations on b(B V , B W ): (1) Using invertible block diagonal elements h [i 1 ,j 1 ] , we may perform any operations between column and rows corresponding to [i 1 , j 1 ] bars in our block matrix.
(2) Using the block matrices h [i 1 ,j 1 ] , we see we may modify columns corresponding to [i 2 , j 2 ] bars using columns corresponding to [i 1 , j 1 ] in our block matrix, whenever (3) Using the block matrices k [i 1 ,j 1 ] , we see we may modify rows corresponding to [i 1 , j 1 ] bars using columns corresponding to [i 2 , j 2 ] in our block matrix, whenever Step 3: Matrix Reduction.We wish to find ordered barcode bases for which the corresponding matrix b(B V , B W ) admits at most one non-zero term 1 in each row and column.From this form, the desired decomposition can be easily extracted: every 1 in a row corresponding to an [i 1 , j 1 ] bar and column corresponding to an [i 2 , j 2 ] bar (with summand.Similarly, zero rows and columns then yield To this end, we perform basis changes using legal operations of type (1), (2) and (3).We process the column-blocks of this matrix from left to right, in each case starting from the diagonal block and working our way upwards.We will denote each treated matrix that has been put in adequate form by That is, we start with X [i 1 ,j 1 ] , where all matrices below it and to its left have been treated.That is, we have . . . [i 1 ,j 1 ] to the left of [i 1 ,j 1 ] has 1's using operations of type (2).Similarly, given [i 1 ,j 1 ] , we may zero out corresponding columns using operations of type (3).The non-zero columns of the resulting matrix X[i 2 ,j 2 ] [i 1 ,j 1 ] have 0's below them, and non-zero rows have 0's to their left.

Then using basis changes h
[i 1 ,j 1 ] , we may put A in Smith normal form, without adding non-zero terms in any rows below and column to its left, preserving the desired structure.
, stabiliser changes of basis for B V are invertible diagonal matrices a 0 0 b , and stabiliser changes of basis for B W are invertible matrices [ c ].As such, (V ‚ , W ‚ , φ ‚ ) which will never be expressible as a direct sum of modules as in Theorem 4.3, since there is no change of basis which will allow us to transform this matrix into either and W ‚ has barcode 0 3 1 2 with associated ordered barcode bases B V , B W , and φ ‚ is given by the block matrix representation Thus, if the nested condition is violated on either V ‚ or W ‚ , a decomposition as in Theorem 4.3 is not always possible.REMARK 4.5.The non-nestedness hypothesis on the bars of V ‚ and W ‚ from Theorem 4.3 is quite restrictive.There are, however, several scenarios of interest where it is satisfied: (1) The 0-th persistent homology of a point cloud satisfies the hypothesis because all bars have left endpoint 0. (2) Similarly, the 1st persistent homology of a filtered graph admits no strictly nested bars because all bars have right endpoint 8. (3) More generally, the n-th persistent homology of an n-dimensional filtered complex satisfies the non-nestedness criterion.One may consider, for instance, the Linial-Meshulam model of random simplicial complexes [LM06].A random simplicial complex chosen from this model on a given vertex set consists of every possible simplex of dimension ă n, with candidate n-simplices being included independently with uniform probability p P [0, 1].The n-th persistent homology of any filtration of such a random complex satisfies the hypothesis.
Theorem 4.3 applies in all such cases.

Zizag Modules
In this section, we wish to generalise the previous work to representations of any type A quiver, in other words zizag persistence modules.The nomenclature we adpot here is extracted from [CdS10].A zizag module is given by a sequence ÐÝ Ý.The direction of the arrows define the type τ of the zizag module, which is the direction of the arrows of the underlying type A quiver.For example, has type τ = f q.We denote zizag modules as (V ‚ , p ‚ , τ).
The interval module of type τ corresponding to a pair of non-negative integers i ď j is the zizag module I τ [i, j] ‚ given by where the contiguous string of F's spans ti, i + 1, . . ., j ´1, ju, all intermediate F ÐÑ F maps are identities in the direction depending on τ, and all other vector spaces are trivial.Zizag modules also decompose into interval modules: this follows from the main result of [Gab72], and is established more directly in [CdS10].In particular, every zigzag module (V ‚ , p ‚ , τ) is isomorphic to a direct sum for some uniquely determined d ij P N.
DEFINITION 5.1.An m ˆn matrix A of rank r is in reversed barcode form if there exists a strictly increasing function c : tm ´r + 1, . . ., mu Ñ t1, . . .nu so that Thus, a matrix is in reversed barcode form whenever its entries lie in t0, 1u, with at most one non-zero term in each row and column, and satisfies the following additional requirement: the r non-zero terms appear in the last r columns, with increasing row order.(We warn the reader that if a matrix A is in barcode form, then its transpose will not in general be in reversed barcode form; however, the off-diagonal transpose of A will be in reversed barcode form).
‚ If q ℓ : V ℓ´1 Ð V ℓ , and the last matrix A ℓ has a pivot in the (r, q) position, together with a nonzero entry α := A ℓ (s, q) in the same column q but some other row s ă r, then there exists g P G with g ℓ = Id so that (gA) ‚ equals A ‚ except A ℓ where the α entry is replaced by zero.
PROOF.The proof is done by induction, in similar fashion to that of Lemma 2.3.The case ℓ = 1 remains trivial.To prove the induction, 4 cases should now be considered.
This case is precisely that of Lemma 2.3, and the proof remains, the same.
Performing C pÐq (´α) on A ℓ induces the same operation on A ℓ´1 .If the q-th column of A ℓ´1 is identically zero, this operation leaves A ℓ´1 unchanged.Otherwise, since p ą q and A ℓ´1 is in reversed barcode form, if the q-th column isn't zero then the p-th column is also non-zero.Then the resulting matrix A 1 ℓ´1 has the form Case 3: We must perform the row operation R sÐr (´α) on A ℓ , inducing the same row operation on A ℓ´1 .Again, if the r-th row of A ℓ´1 is identically zero, we are done.Otherwise, since A ℓ is in barcode form and s ă r, if the r-th row isn't zero then the s-th row isn't zero, and so the resulting matrix A 1 ℓ´1 has the form A 1 ℓ´1 has the form We perform the row operation R sÐr (´α) on A ℓ , inducing the column operation C rÐs (α) on A ℓ´1 .Again, if the s-th column of A ℓ´1 is zero, we are done.Otherwise, since A ℓ´1 is in barcode form and s ă r, the r-th column is also non-zero so that the resulting matrix A 1 ℓ´1 has the form The zigzag-compatible avatar of Proposition 2.4 is given as follows.As before, we regard this result as the 'matrix version' of the decomposition theorem for zizag persistence modules.
PROPOSITION 5.4.Given the sequence of matrices A ‚ as in (11), there is a g P G such that (gA) ‚ has all its matrices in zizag barcode form.
PROOF.We proceed by induction.The case ℓ = 1 is trivial.We can reduce ourselves by induction hypothesis to the case where the first ℓ ´1 matrices are in zizag barcode form.If V ℓ´1 Ñ V ℓ we perform row operations on A ℓ to put it in reduced row echelon form.Otherwise, if V ℓ´1 Ð V ℓ , we perform column operations to put A ℓ in reversed reduced column echelon form.That is, we put A ℓ in the form This is achieved through a slight tweak to the standard Gaussian algorithm for placing matrices in column echelon form, where one starts with the last row and works upwards.Finally, we may apply Lemma 5.3 to the non-zero ‹ term of A ℓ obtain the desired result.

Barcode bases of zizag modules.
In order to characterise the set of barcode bases of a zizag module, we must again attempt to characterise the set Stab(A ‚ ) corresponding to linear maps of a zizag module in a barcode basis.In Section 3, we defined an order ĺ on the set of intervals that allowed us to classify the stabiliser as Mat(d i 1 j 1 ˆdi 2 j 2 ; F).
The Mat(d i 1 j 1 ˆdi 2 j 2 ; F) came from the fact that in standard persistence, the interval module I[i 1 , j 1 ] can be mapped non-trivially to the interval I[i 2 , j 2 ] if and only if [i 1 , j 1 ] ĺ [i 2 , j 2 ].In zizag persistence, this is no longer true.EXAMPLE 5.5.One checks that in the following scenario To then obtain a similar classification result for zizag modules, we see we must adapt our partial order ĺ to the type τ of our zizag module.DEFINITION 5.6.Let τ be a type of zizag module, defining an orientation on the standard length ℓ quiver.Let ĺ τ be the binary relation on [i, j] P Z 2 | 0 ď i ď j ď ℓ ( given by [i 1 , j 1 ] X [i 2 , j 2 ] = [i, j] ‰ H and i 1 ď i 2 if i ´1 Ñ i, i 2 ď i 1 if i ´1 Ð i and j 1 ď j 2 if j Ñ j + 1, j 2 ď j 1 if j Ð j + 1 We observe that when all maps point forward, i.e., when τ = f f . . .f , we have ĺ τ =ĺ.And if all maps point backwards, ie τ = qq . . .q, then ĺ τ is the reverse of ĺ in the sense that Our description of the stabiliser from Theorem 3.4 relied on the compatibility of ĺ with the lexicographical total order Ĳ on the bars.Having produced a τ-analogue of ĺ, we must now construct the zigzag version of Ĳ.To this end, we define two new auxiliary total orders on the set of all possible endpoints t0, . . ., ℓu.Note that any such order ă amounts to a choice of element σ ℓ lying in the permutation group S ℓ+1 via the identification σ(0) ă σ(1) ă ¨¨¨ă σ(ℓ).
0] , putting it in Smith normal form using basis changes h [0,0] [0,0] and k [0,0] [0,0] .Now assume we wish to treat X [i 2 ,j 2 ] intersecting bars [a, b] Ĳ [c, d], we have either [a, b] ĺ [c, d] or [a, b] Ă [c, d].Then by hypothesis, given P[a,b] EXAMPLE 4.4.We illustrate the difficulties imposed by strictly nested bars in the context of Theorem 4.3.Consider the map φ ‚ : V ‚ Þ Ñ W ‚ where V ‚ has barcode barcode bases B V , B W , and φ ‚ is given by the block matrix representation b ¨¨¨1 0 d where we may again use induction.
0 r where we may again use induction.

Case
¨¨¨1 0 d where we may again use induction.