Making a magic square matrix singular
    12 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
We know that any magic square matrix of odd order is not singular. When each element of the matrix is subtracted by the sum-average of the total elements, then this perturbed matrix becomes singular, and the determinant of the resulted matrix is zero. That is,
     det(magic(n)-ones(n)*((1+n*n)/2)) = 0,    for any odd n.
Can anyone help me the proof or find literture in this subject?
8 comentarios
Respuesta aceptada
  Ahmed A. Selman
      
 el 1 de Abr. de 2013
        I don't think details are required since
A=magic(n)-ones(n)*((1+n*n)/2)
is changed into an antisymmetric matrix, any such A matrix must satisfy (basic math.. etc)
det(A) = -1^n * det(A)
since n is odd, det(A) must be zero (thus, A is singular). Changing A from magic(n) to (magic(n)-ones(n)*((1+n*n)/2) ) as mentioned in the question is enough to destroy the symmetry of A.
Yet, since this is too basic, and it works the same for magic(n) with n is odd or even, (also, produces antisymmetric), I'm afraid you already know this. I tried (quickly, to be honest) other means like the nice arguments above, but didn't got anything useful so I thought to share, it might help. Regards.
7 comentarios
  Ahmed A. Selman
      
 el 2 de Abr. de 2013
				And this basic, primitive derivation, is found (must be found) in any textbook dealing with matrices and determinant properties. I did find it on Wolfram search that:
   det(-A)=(-1)^n det(A)
from: <http://mathworld.wolfram.com/Determinant.html >
and found that for antisymmetric matrix A then
   Aij= - Aji
from
The rest is, however, a plane and direct substitution.
  Matt J
      
      
 el 8 de Abr. de 2013
				
      Editada: Matt J
      
      
 el 9 de Abr. de 2013
  
			Ahmed,
We established several Comments ago that Aij=-Aji is not satisfied for the modified magic square matrix.
There may be a way to extend the determinant equation to the weirder kind of asymmetry that this matrix exhibits, but it looks like it would take some work. Showing that ones(n,1) is a null-vector of the matrix seems to me like the quicker proof, not to mention that it also covers even-valued n.
Más respuestas (3)
  Jonathan Epperl
      
 el 1 de Abr. de 2013
        The row-sum, column-sum and diag-sum of a magic square are all the same, and the magic square uses all the integeres 1:n^2. Thus, the sum of all elements must be n^2*(n^2+1)/2, and each row, column, diag sum must be n*(n^2+1)/2.
Now look at what you wrote, multiply it from the right by ones(n,1), and you'll see that you will get zero. Voila, thus the matrix is singular.
2 comentarios
  Jonathan Epperl
      
 el 5 de Abr. de 2013
				
      Editada: Jonathan Epperl
      
 el 22 de Abr. de 2013
  
			Just to fill that hole in your knowledge: A square Matrix A is singular if and only if
- inv(A) does NOT exist
 - det(A)==0
 - The range of A is not all of R^n
 - THE KERNEL OF A IS NONTRIVIAL
 - ...
 
That last point there means that if you can find a nonzero vector v such that A*v==0, then you have proven that A is singular, and ones(n,1) is such a vector.
  Matt J
      
      
 el 1 de Abr. de 2013
        
      Editada: Matt J
      
      
 el 1 de Abr. de 2013
  
      Let x=ones(n,1)/n and P be the perturbed matrix. You can verify that
P*x=0
proving that P is singular.
5 comentarios
  Matt J
      
      
 el 1 de Abr. de 2013
				
      Editada: Matt J
      
      
 el 1 de Abr. de 2013
  
			I do not think the calculation of det(P) is numerically unstable since elements of P in the case are all integers.
You don't know that MATLAB computes determinants in steps that always result in integers. In fact, I've just learned that MATLAB uses LU factorization, which is consistent with the results Walter and I have been getting,
>> P=magic(9)-41; [L,U]=lu(P); det(L)*det(U)
ans =
     -0.3211
Ver también
Categorías
				Más información sobre Linear Algebra en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!