Wednesday, July 18, 2018

linear algebra - Inverse of a symmetric block tridiagonal matrix



I am aware of existent discussion on the inverse of a block tridiagonal matrix on this website (for example, How to invert a block tridiagonal matrix?) and I have been googling articles about this topic, but I feel I may be interested in a slightly different setting and I cannot tell whether the references I looked so far discuss that, so I'm posting here.



Similar to the link above, I am interested in the last block along the diagonal, the block in A1 corresponding to Dn in A. However, the size of the blocks may vary. I do not assume each Di must be of same size and I assume each Di is ni×ni.



A=[D1A2A2D2A3An1Dn1AnAnDn]



One reference I looked at is https://epubs.siam.org/doi/pdf/10.1137/0613045 and Theorem 3.4 in it gives a general formula when A is proper (i.e. the matrices Ai are nonsingular). However, I am unsure if my setting fits the paper, as it says "block is of order n" (pg.8), and I wonder if the "order" here means Θ(n). If it actually means equal-size diagonal block, then I wonder if anyone could point some other reference to me for different-size block setting. Thank you!


Answer



For convenience, let Tk=[D1A2A2D2A3Ak1Dk1AkAkDk] for k=1,2,,m, where I've let m be the total number of diagonal blocks in the original matrix. This is to avoid confusion since the diagonal blocks are of size n1×n1,,nm×nm. Our goal is to compute T1m as efficiently as possible.



Trivially, T1=D1, so T11=D11, which can be computed in O(n31) operations.



Now, suppose we've already computed T1k1 and we wish to compute T1k. We can partition Tk=[Tk1ZTkZkDk] where Zk=[0Ak]. To invert Tk, we can apply the block matrix inverse formula to get T1k=[T1k1+T1k1ZTkSkZkT1k1T1k1ZTkSkSkZkT1k1Sk]whereSk=(DkZkT1k1ZTk)1.




With T1k1 already computed, we require the following steps:




  1. Multiply Zk by T1k1 by ZTk to get ZkT1k1ZTk -- O(n2k1nk+nk1n2k) operations

  2. Subtract ZkT1k1ZTk from Dk to get DkZkT1k1ZTk -- O(n2k) operations

  3. Invert DkZkT1k1ZTk to get Sk -- O(n3k)

  4. Multiply Sk by Zk to get SkZk -- O(nk1n2k) operations

  5. Multiply ZTk by Sk to get ZTkSk -- O(nk1n2k) operations

  6. Multiply SkZk by T1k1 to get SkZkT1k1 -- O(n2k(n1++nk1)) operations

  7. Multiply T1k1 by ZTkSk to get T1k1ZTkSk -- O(n2k(n1++nk1)) operations


  8. Multiply ZTk by SkZkT1k1 to get ZTkSkZkT1k1 -- O(n2k(n1++nk1)) operations

  9. Multiply T1k1 by ZTkSkZkT1k1 to get T1k1ZTkSkZkT1k1 -- O(n2k(n1++nk1)) operations

  10. Add T1k1 and T1k1ZTkSkZkT1k1 to get T1k1+T1k1ZTkSkZkT1k1 -- O((n1++nk1)2) operations



Note that many of the above steps take advantage of the fact that Zk=[0Ak] and SkZk=[0SkAk] are nk×(n1++nk1) matrices which have all zeros except for a block of size nk×nk1.



If all the blocks are the same size n1==nm=n, then the total cost of computing T1k from T1k1, Ak, and Dk is O((k1)n3+(k1)2n2). Thus, the total cost of computing T1m recursively is O(m2n3+m3n2) as opposed to O(m3n3) by just direct inversion. If the blocks are not all the same size, it's a bit harder to analyze how much faster the above method is compared to direct inversion. However, I suspect the above method is still faster in many cases.


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...