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 A−1 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=[D1A⊤2A2D2A⊤3⋱⋱⋱An−1Dn−1A⊤nAnDn]
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=[D1A⊤2A2D2A⊤3⋱⋱⋱Ak−1Dk−1A⊤kAkDk] 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 T−1m as efficiently as possible.
Trivially, T1=D1, so T−11=D−11, which can be computed in O(n31) operations.
Now, suppose we've already computed T−1k−1 and we wish to compute T−1k. We can partition Tk=[Tk−1ZTkZkDk] where Zk=[0Ak]. To invert Tk, we can apply the block matrix inverse formula to get T−1k=[T−1k−1+T−1k−1ZTkSkZkT−1k−1−T−1k−1ZTkSk−SkZkT−1k−1Sk]whereSk=(Dk−ZkT−1k−1ZTk)−1.
With T−1k−1 already computed, we require the following steps:
- Multiply Zk by T−1k−1 by ZTk to get ZkT−1k−1ZTk -- O(n2k−1nk+nk−1n2k) operations
- Subtract ZkT−1k−1ZTk from Dk to get Dk−ZkT−1k−1ZTk -- O(n2k) operations
- Invert Dk−ZkT−1k−1ZTk to get Sk -- O(n3k)
- Multiply Sk by Zk to get SkZk -- O(nk−1n2k) operations
- Multiply ZTk by Sk to get ZTkSk -- O(nk−1n2k) operations
- Multiply −SkZk by T−1k−1 to get −SkZkT−1k−1 -- O(n2k(n1+⋯+nk−1)) operations
- Multiply T−1k−1 by −ZTkSk to get −T−1k−1ZTkSk -- O(n2k(n1+⋯+nk−1)) operations
- Multiply ZTk by SkZkT−1k−1 to get ZTkSkZkT−1k−1 -- O(n2k(n1+⋯+nk−1)) operations
- Multiply T−1k−1 by ZTkSkZkT−1k−1 to get T−1k−1ZTkSkZkT−1k−1 -- O(n2k(n1+⋯+nk−1)) operations
- Add T−1k−1 and T−1k−1ZTkSkZkT−1k−1 to get T−1k−1+T−1k−1ZTkSkZkT−1k−1 -- O((n1+⋯+nk−1)2) operations
Note that many of the above steps take advantage of the fact that Zk=[0Ak] and SkZk=[0SkAk] are nk×(n1+⋯+nk−1) matrices which have all zeros except for a block of size nk×nk−1.
If all the blocks are the same size n1=⋯=nm=n, then the total cost of computing T−1k from T−1k−1, Ak, and Dk is O((k−1)n3+(k−1)2n2). Thus, the total cost of computing T−1m 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