Community
cancel
Showing results for
Did you mean:
Beginner
129 Views

## Solve Ax=b, where A is diagonal matrix

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!!
1 Solution
Novice
129 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.
4 Replies
Employee
129 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,
Beginner
129 Views
Thanks alex.
I am aware that Pardiso is a choice.
But let's say if I am insisting on using LAPACK?
Employee
129 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,