The vec operator transforms a matrix to a column vector by stacking each column on top of the next. It is useful to write the vec of a block-structured matrix in terms of the vec operator applied to each of its component blocks. We derive a simple formula for doing so, which applies regardless of whether the blocks are of the same or of different sizes.

ERC322989National Science FoundationDEB-1257545Nederlandse Organisatie voor Wetenschappelijk OnderzoekALWOP.2015.1001. Introduction

The vec operator, applied to a r×cmatrix X, produces a rc×1column vector, denotedvec(X) by stacking each column of Xon top of the following column [1]. Here, we consider the result of applying the vec operator to block-structured matrices, including the case in which the blocks differ in size. Such a matrix is called unbalanced [2]. Previous studies of the vec operator and Kronecker product applied to block-structured matrices [2, 3] have not addressed this problem.

In many applications, block-structured matrices arise because the blocks represent different states or processes. In general, these blocks will be of different sizes and may depend on different parameters. If the vec operator is applied to such a matrix, it may be helpful to write the result in terms of the vec of each of the component blocks. This calculation arises, inter alia, in applications of matrix calculus [4] in demography and ecology, including nonlinear matrix population models [5] and finite-state Markov chains [6, 7]. In such models (we give an example below), the outcome is often a vector-valued function of the same matrix, and the matrix has an inherent block structure.

Our goal is to write the vec of the unbalanced block-structured matrix as a linear combination of the vec operator applied to each of the component blocks. Although the solution is simple, it is widely useful, so we present it here.

2. Results

If the matrixXcontainsnblocks, we write it as the sum ofnmatrices, each containing one of the blocks surrounded by zero matrices, as in (1)X=ABC(2)=A00+0B0+00C,whereA,B, andC and the corresponding zero matrices may be of different (but compatible) sizes. The vec of X is the sum of the vec operator applied to each of the component matrices in (2). A generic member of this set of component matrices can be written as in the following result.

Theorem 1.

Let X be anr×cblock-structured matrix, with the dimensions of the blocks indicated as subscripts, written (3)Xr×c=0r1×c10r1×c20r1×c30r2×c1Ar2×c20r2×c30r3×c10r3×c20r3×c3,where r=r1+r2+r3andc=c1+c2+c3 and r1,r3,c1,c3, or any combination, may be zero. Then (4)vecX=Q⊤⊗PvecA,where (5)P=0r1×r2Ir2×r20r3×r2,Q=0c2×c1Ic2×c20c2×c3.

Proof.

To convert A to X requires the addition ofr1rows of zeros above,r3rows of zeros below,c1columns of zeros to the left, andc3columns of zeros to the right of A. This is accomplished by multiplying A on the left by P and on the right byQ, so that (6)X=PAQ.Applying the vec operator to (6), using a well known result of Roth [8], yields (4).

Remark 2.

We said it was simple.

3. Applications

Here are several examples of interest, to demonstrate the formulation of the block-structured matrices and the result of applying the vec operator.

(1) The transition matrix for a finite-state absorbing Markov chain withτtransient states andαabsorbing states can be written as a block-structured matrix. Numbering the states so that the transient states precede the absorbing states yields a canonical form for the (column-stochastic) transition matrix (e.g., [9]),(7)P=Uτ×τ0τ×αMα×τIα×α.The matrixUdescribes transitions among the transient states andMdescribes transitions from transient states to absorbing states. Suppose thatξis a vector-valued (s×1) differentiable function ofP and thatUandMare differentiable functions of a vector (p×1)θof parameters. In demographic and ecological applications,Umight describe transitions and survival among life cycle stages of some organism, andM might describe transitions to different causes of death (e.g., [7, 10]).

Following [4], the derivative ofξwith respect toθis thes×pmatrix (8)dξdθ⊤=dξdvecP⊤dvecPdθ⊤.To obtain dvecP we must apply the vec operator to the block-structured matrixdP. Applying the results (5) gives (9)dP=Iτ×τ0α×τdUIτ×τ0τ×α+0τ×αIα×αdMIτ×τ0τ×α(noting thatdIandd0are both zero). Applying the vec operator and the chain rule gives (10)dvecPdθ⊤=Iτ×τ0α×τ⊗Iτ×τ0α×τdvecUdθ⊤+Iτ×τ0α×τ⊗0τ×αIα×αdvecMdθ⊤.In applications, it is likely that parameters of interest are defined in terms of their effects onUandM; (10) makes it possible to incorporate that dependence easily into the necessary derivative of the block-structured matrixP.

We note that the intensity matrix of a continuous-time absorbing Markov chain also has a block structure (e.g., [9, Chap. 8]); applications of matrix calculus to such models [6] will benefit from the results presented here.

(2) The transition matrix of an absorbing Markov chain is a special case of the canonical form of a reducible nonnegative matrix [11]. IfXis a reducible matrix, it can be written (11)X=A110⋯0A21A22⋯0⋮⋮⋱⋮As1As2⋯Ass.Each of the diagonal blocksAiiis square and irreducible (or a1×1zero matrix). The division into diagonal blocks corresponds to a division of the vector space upon whichXoperates into invariant subspaces.

(3) A balanced block-structured matrix, in which all blocks are the same size, is a special case of an unbalanced matrix. Theorem 1 provides a simple result for the vec of such a matrix. Consider thepm×qnmatrix (12)X=A11⋯A1q⋮⋮Ap1⋯Apq,where Aijare each of dimensionm×n. This case is considered by [3].

From (5)-(6) we have (13)X=∑i=1p∑j=1qPiAijQj,where (14)Pi=0i-1m×mIm×m0p-im×m,i=1,…,p,Qj=0n×j-1nIn×n0n×q-jn,j=1,…,q.The vec ofXis (15)vecX=∑i=1p∑j=1qQj⊤⊗PivecAij.

4. Conclusions

The vec operator, by transforming a matrix into a vector, is useful in many applications [1]. When the matrix is block structured and the blocks represent various processes involved in the application, it is convenient to be able to express the vec of the matrix as a linear combination of the vec operator applied to the component blocks. We have shown how to do so and described a few examples, but these do not exhaust the potential uses of the result.

Competing Interests

The authors declare that they have no competing interests.

Acknowledgments

This research was supported by ERC Advanced Grant 322989, NSF Grant DEB-1257545, and NWO-ALW Project ALWOP.2015.100.

HendersonH. V.SearleS. R.The vec-permutation matrix, the vec operator and Kronecker products: a reviewKoningR. H.NeudeckerH.WansbeekT.Block Kronecker products and the vecb operatorOjedaI.Kronecker square roots and the block vec matrixMagnusJ. R.NeudeckerH.CaswellH.Sensitivity and elasticity of density-dependent population modelsCaswellH.Perturbation analysis of continuous-time absorbing Markov chainsCaswellH.Sensitivity analysis of discrete Markov chains via matrix calculusRothW. E.On direct product matricesIosifescuM.CaswellH.Stage, age and individual stochasticity in demographyGantmacherF. R.