Question:
Design/implement a method to transform a matrix into strict diagonal dominance, if possible.
Solution:
First, we should clearly know what strictly diagonal dominant matrix is.
a matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is larger than or equal to the sum of the magnitudes of all the other (non-diagonal) entries in that row. More precisely, the matrix A is diagonally dominant if
where aij denotes the entry in the ith row and jth column.
Then, we come to the question. There is some questions we should answer:
(1) Whether the input matrix is an SDDM.
(2) If it’s not, whether we can transform it to one.
(3) And how?
First question first. We can judge the input matrix A easily by the definition. We just ensure every single row’s largest magnitude is in the position (i,i) in matrix A.
And then, if the matrix is not an SDDM. How can we ensure we can transform it? The answer is that we have to try. It means we have to row-interchange the matrix and make the rows in a way that fits the definition. Here I design an algorithm (pseudo code):
for i = 1:n
while(row(i) is not ok)
j = find_row_to_interchange(i)
if(i == j, which means no ne