I have the impedance matrix $Y$, formulated from an electrical network by augmented nodal analysis. The matrix $Y$ is shown as an image to illustrate its feature visually, where all the white blocks are zero.

enter image description here

What could be the best possible way to inverse such matrix which is required to solve the linear equation in the form $Yx=b$? Furthermore, in each iteration of the network solution, only the first $8\times 8$ elements get new values. All other elements remain as is. Any suggestion will be highly appreciated.

  • 4
    $\begingroup$ It sounds like you just need to solve la linear equation, not invert a matrix, in which case, don;t invert the matrix. $\endgroup$ Jul 18, 2019 at 1:06
  • $\begingroup$ Can you please suggest me a method of solving the linear equation that will be computationally efficient in this case. Note that the matrix is not a "positive definite" as it fails Cholesky decomposition. Thanks $\endgroup$ Jul 18, 2019 at 1:17
  • $\begingroup$ how large is your matrix $Y$? depending on the overall size of $Y$ wrt to the $8\times 8$ changing block, there might be several alternatives to consider. $\endgroup$
    – Anton Menshov
    Jul 18, 2019 at 2:10
  • $\begingroup$ As shown in figure Y is a 19x19 matrix where the first 8X8 is changing in every iteration. $\endgroup$ Jul 18, 2019 at 2:37

1 Answer 1


For a matrix that small, you're probably not going to do better than using dense methods.

I wrote up a quick test in C++ for an 18x18 matrix with your sparse structure and randomly generated values and compared a sparse factorization (via Intel MKL's PARDISO) and the same dense factorization via Intel MKL's DGETRF.

  • For the dense factorizations, any memory allocations aren't included in the timing.
  • For the sparse factorizations, if I include in the timing the symbolic factorization (Phase 1 in PARDISO), which contains a lot of memory allocations, I find that the dense factorization is about 10x-20x faster than the sparse factorization.
  • For the sparse factorizations, if I don't include the symbolic factorization in the timing, since it could conceivably be calculated once before the numerical factorization, I find that the dense factorization is about 1.5x-3x faster.

Of course your results may vary based on hardware, software, phases of the moon, etc, but hopefully this gives you an idea of what ballpark you're in.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.