Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Solve Ax=b, where A is diagonal matrix

Ngu_Soon_Hui
Beginner
833 Views
I am trying to use LAPACK routines: linear equations to solve x in the linear equation system Ax=b. I know for sure that A is diagonal matrix, so which matrix type I should select? They are general, general band, triangular, triangular band but there is no diagonal matrix type!!
0 Kudos
1 Solution
jonathandursi
Novice
833 Views
Diagonal matrix, like Ai,j = 0 if i j ? If that's the case, why are you using a linear solver? xi = bi / Ai,i.

View solution in original post

0 Kudos
4 Replies
Alexander_K_Intel2
833 Views
Hi,
Your matrix is sparse so try to use PARDISO solver. Format for diagonal matrix is pretty simple (more detailes could be found in Intel Math Kernel Library ReferenceManual, Chapter 8)
With best regards,
Alexander Kalinkin
0 Kudos
Ngu_Soon_Hui
Beginner
833 Views
Thanks alex.
I am aware that Pardiso is a choice.
But let's say if I am insisting on using LAPACK?
0 Kudos
Alexander_K_Intel2
833 Views
Hi,
If you really want to use LAPACK for solving system of equation with diagonal matrix usebanded format for storing it.
With best regards,
Alexander Kalinkin
0 Kudos
jonathandursi
Novice
834 Views
Diagonal matrix, like Ai,j = 0 if i j ? If that's the case, why are you using a linear solver? xi = bi / Ai,i.
0 Kudos
Reply