Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
About diagonally dominant matrix

Subject: About diagonally dominant matrix

From: Abdullah

Date: 8 Oct, 2010 01:53:04

Message: 1 of 6

hello people

i would like to know how do i get my matrix into a diagonally dominant form, is there a certian script to re arrange my matrix?

thank you

Subject: About diagonally dominant matrix

From: Roger Stafford

Date: 8 Oct, 2010 02:43:05

Message: 2 of 6

"Abdullah " <lucker8@live.com> wrote in message <i8lti0$efs$1@fred.mathworks.com>...
> hello people
>
> i would like to know how do i get my matrix into a diagonally dominant form, is there a certian script to re arrange my matrix?
>
> thank you
- - - - - - - - - -
  What kinds of "rearrangements" do you have in mind? Multiplication on the left and right by unitary matrices as with singular value decomposition can certainly get you to a diagonally dominant form. In fact everything outside the diagonal disappears altogether in that case.

Roger Stafford

Subject: About diagonally dominant matrix

From: Nasser M. Abbasi

Date: 8 Oct, 2010 02:57:42

Message: 3 of 6

On 10/7/2010 6:53 PM, Abdullah wrote:
> hello people
>
> i would like to know how do i get my matrix into a diagonally dominant form, is there a certian
 > script to re arrange my matrix?
>
> thank you

May be there is a command to do this.

But from definition:

http://math.nist.gov/MatrixMarket/glossary.html

"Diagonal Dominance
     A matrix is diagonally dominant if the absolute value of each
diagonal element is greater than the sum of the absolute values of the
other elements in its row (or column)"

Then given a matrix A, you need to just find the max of each row's sum
and and each column's sum, and replace the diagonal element by the
corresponding maximum of the 2 sums:

Given A, this given B which is dominant diagonal matrix with respect to
A: (all elements of A remain in B, but the B diagonal is dominant now)

A=rand(3,3);
B=A;
B(eye(size(A))~=0)=0
z=max([sum(B,1)' sum(B,2)],[],2)
B(eye(size(B))~=0)=z

The above meets an >= not > as per definition, to force the greater
than, you can simply add some delta of your choosing, to each entry in z
before using it in the last statement above, or some multiple.

-- example --------
A =

     0.2417 0.1320 0.5752
     0.4039 0.9421 0.0598
     0.0965 0.9561 0.2348

EDU>> B

B =

     0.7072 0.1320 0.5752
     0.4039 1.0881 0.0598
     0.0965 0.9561 1.0526

--Nasser

Subject: About diagonally dominant matrix

From: Roger Stafford

Date: 8 Oct, 2010 03:16:05

Message: 4 of 6

"Nasser M. Abbasi" <nma@12000.org> wrote in message <i8m1b5$8sc$1@speranza.aioe.org>...
> .......
> Then given a matrix A, you need to just find the max of each row's sum
> and and each column's sum, and replace the diagonal element by the
> corresponding maximum of the 2 sums:
> .......
- - - - - - - -
  I've got a simpler way. Multiply the matrix by zero and then add ones to its diagonal!

  Of course that is ridiculous, but there needs to be some understanding of what operations or rearrangements are to be permitted in this endeavor. I suggest the OP tell us what he has in mind in this respect. Somehow I doubt that arbitrarily adding numbers to a diagonal would be an acceptable operation.

Roger Stafford

Subject: About diagonally dominant matrix

From: Nasser M. Abbasi

Date: 8 Oct, 2010 03:26:31

Message: 5 of 6

On 10/7/2010 8:16 PM, Roger Stafford wrote:
> "Nasser M. Abbasi"<nma@12000.org> wrote in message<i8m1b5$8sc$1@speranza.aioe.org>...
>> .......
>> Then given a matrix A, you need to just find the max of each row's sum
>> and and each column's sum, and replace the diagonal element by the
>> corresponding maximum of the 2 sums:
>> .......
> - - - - - - - -

> I've got a simpler way. Multiply the matrix by zero and then add ones to its diagonal!
>
> Of course that is ridiculous, but there needs to be some understanding of what operations
>or rearrangements are to be permitted in this endeavor. I suggest the OP tell us
 >what he has in mind in this respect. Somehow I doubt that arbitrarily
adding numbers
 >to a diagonal would be an acceptable operation.
>
> Roger Stafford

Agree, the OP specs are not clear. But I assumed he just wanted some
matrix with some random numbers which happened to be DD to test an
algorithm with, that is all.

--Nasser

Subject: About diagonally dominant matrix

From: Roger Stafford

Date: 8 Oct, 2010 03:45:06

Message: 6 of 6

"Nasser M. Abbasi" <nma@12000.org> wrote in message <i8m316$bl6$2@speranza.aioe.org>...
> Agree, the OP specs are not clear. But I assumed he just wanted some
> matrix with some random numbers which happened to be DD to test an
> algorithm with, that is all.
>
> --Nasser
- - - - - - - -
  Yes, perhaps you are right, Nasser. I hadn't thought of that possibility.

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us