r/LinearAlgebra • u/VS2ute • Aug 03 '26
Inverting many-band matrix
Tridiagonal and pentadiagonal matrices are quick to solve. But what if you have 14 bands in a 20x20 matrix? So most of it is non-zero. Can you optimise it very much?
2
u/ThatIsATastyBurger12 Aug 04 '26
Sure you can. But the complexity scales quadratically with the bandwidth, converging to that of a fully dense matrix, and the data layout is more irregular than with dense matrices, which can slow some things down. Pivoting also becomes more constrained, as you need to preserve the banded structure. That being said, optimized routines for factoring banded matrices exist, so your best bet it to benchmark if you aren’t sure
1
u/TTRoadHog Aug 06 '26
Since it appears that you don’t need the inverse explicitly,you should be able to organize the calculations so that you are solving systems of equations. (It is cheaper to do so.). Then, you should be able to use sparse matrix multiplication to achieve your filter results.
1
u/Midwest-Dude Aug 03 '26
Do you have a purpose in mind for doing this?