the nullspace of nested magic squares · when we want to obtain pandiagonal magic squares 6 by 6,...

17
IJRRAS 8 (3) September 2011 www.arpapress.com/Volumes/Vol8Issue3/IJRRAS_8_3_07.pdf 311 THE NULLSPACE OF NESTED MAGIC SQUARES Ayoub ElShokry 1 & Saleem Al-Ashhab 2 University of Khartoum ,Faculty of Education ,Department of Mathematics , Omdurman ,Sudan Depatement of Mathematics, Al Al-Bayt University, Mafrq, Jordan Email: ayou1975@ maktoob.com; [email protected] ABSTRACT In this paper we formulate the general structure of the nullspace and subspaces of the nullspace for nested magic squares, where we consider two different types of centre. Further, we study the properties of these spaces. AMS classification number: 15A15. Key Words: Nullspace, Magic Squares, Mathematical induction. 1. INTRODUCTION We consider magic squares here as matrices and study the algebraic properties for them. Hence, a semi magic square is a n by n matrix such that the sum of the entries in each row and columns is the same. The common value is called the magic constant. If, in addition, the sum of all entries in each left-broken diagonal and each right-broken diagonal is the magic constant, then we call the matrix a pandiagonal magic square. It is well-known that the following structure 2sABC C B A B+C E A+E C 2sABE E s B s A A+B+C s s C A+B+Es s E sBC+E sAE+C is a general structure of the pandiagonal magic square 4 by 4. Here, the magic constant is 2s. When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider the matrix a 6 a 5 a 4 a 3 a 2 a 1 a 12 a 11 a 10 a 9 a 8 a 7 a 18 a 17 a 16 a 15 a 14 a 13 s a 3 s a 2 s a 1 s a 6 s a 5 s a 4 s a 9 s a 8 s a 7 s a 12 s a 11 s a 10 s a 15 s a 14 s a 13 s a 18 s a 17 s a 16 We then require the following conditions: 0 0 0 3 3 3 18 15 12 9 6 3 17 14 11 8 5 2 16 13 10 7 4 1 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 a a a a a a a a a a a a a a a a a a s a a a a a a s a a a a a a s a a a a a a

Upload: others

Post on 03-Jul-2020

16 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 www.arpapress.com/Volumes/Vol8Issue3/IJRRAS_8_3_07.pdf

311

THE NULLSPACE OF NESTED MAGIC SQUARES

Ayoub ElShokry1 & Saleem Al-Ashhab

2

University of Khartoum ,Faculty of Education ,Department of Mathematics , Omdurman ,Sudan

Depatement of Mathematics, Al Al-Bayt University, Mafrq, Jordan

Email: ayou1975@ maktoob.com; [email protected]

ABSTRACT

In this paper we formulate the general structure of the nullspace and subspaces of the nullspace for nested magic

squares, where we consider two different types of centre. Further, we study the properties of these spaces.

AMS classification number: 15A15.

Key Words: Nullspace, Magic Squares, Mathematical induction.

1. INTRODUCTION

We consider magic squares here as matrices and study the algebraic properties for them. Hence, a semi magic square

is a n by n matrix such that the sum of the entries in each row and columns is the same. The common value is called

the magic constant. If, in addition, the sum of all entries in each left-broken diagonal and each right-broken diagonal

is the magic constant, then we call the matrix a pandiagonal magic square. It is well-known that the following

structure

2s–A–B–C C B A

B+C – E A+E – C 2s– A–B–E E

s – B s – A A+B+C – s

s – C

A+B+E–s

s – E s–B–C+E

s–A–E+C

is a general structure of the pandiagonal magic square 4 by 4. Here, the magic constant is 2s.

When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal

magic squares 4 by 4, we consider the matrix

a6 a5 a4 a3 a2 a1

a12 a11 a10 a9 a8 a7

a18 a17 a16 a15 a14 a13

s – a3 s – a2 s – a1 s – a6 s – a5 s – a4

s – a9 s – a8 s – a7 s – a12 s – a11 s – a10

s – a15 s – a14 s – a13 s – a18 s – a17 s – a16

We then require the following conditions:

0

0

0

3

3

3

181512963

171411852

161310741

181716151413

121110987

654321

aaaaaa

aaaaaa

aaaaaa

saaaaaa

saaaaaa

saaaaaa

Page 2: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

312

These conditions suffice to ensure that the resulting square is pandiagonal. We have as a possible form of these

squares:

J–L –K+J+I+H+E+D+C

– 3/2 s

L–J+G–

E+B

K–I+F–

D+A

–L–K–H–G–F–C–B–A+

9/2 s

L K

–J–I–H–G–F+3s J I H G F

–E–D–C–B–A+3s E D C B A

L+K+H+G+F+C+B+A–7/2

s

s–L s–K L+K–J–I–H–E–D–C+

5/2s

s–L+J–

G+E–B

s–K+I–

F+D–A

s–H s–G s–F J+I+H+G+F–2s s–J s–I

s– C s–B s–A E+D+C+B+A –2s s–E s–D

We call this kind of squares the pandiagonal magic square 6 by 6 of the special structure. Note that the magic

constant is now 3s.

The nullspace of a matrix A is the solution set of the homogenous system Ax = 0. The pandiagonal magic square 4

by 4 possesses a nontrivial null space. Using the previous notation for a pandiagonal magic square 4 by 4 we can

easily prove (see [1]) that this nullspace can be written in the following form

}:22

22

{ Rz

CA

CBAs

AC

sCBA

z

Note that the sum of the entries is zero. Furthermore, the multiplication of the square as a matrix with the vector

Rzqs

q

CA

CBAs

AC

sCBA

z

,,

1

1

1

1

222

22

yields the vector

q

q

q

q

This is due to definition of the magic square. In [1] we find that the pandiagonal magic square 6 by 6 of the special

structure possesses also a nontrivial nullspace, which can be written in the following form:

}:

AJ)+DG-DJ+2JC+2BJ+2EG-BF+2CG-EF-AG-3Es+3Gs+3Js-3Bs-2BH+2EH-EI-BI(

DG)+AJ-AG-2CF+2DF+DJ+BF+EF+3Fs-3Ds-3As+2DH+2AH-EI-2IC-2AI-BI-3Is(

BF)-AJ-EF+EI-BI+AG+DG-DJ(

AJ)+DG-DJ+2JC+2BJ+2EG-BF+2CG-EF-AG-3Es+3Gs+3Js-3Bs-2BH+2EH-EI-BI(

DG)+AJ-AG-2CF+2DF+DJ+BF+EF+3Fs-3Ds-3As+2DH+2AH-EI-2IC-2AI-BI-3Is(

BF)-AJ-EF+EI-BI+AG+DG-DJ(

{ Rzz

We will therefore denote the vectors in this nullspace as follows:

3

2

1

3

2

1

x

x

x

x

x

x

In this case the multiplication of the square with the vector

Page 3: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

313

Rzqs

q

x

x

x

x

x

x

z

, ,

1

1

1

1

1

1

3

3

2

1

3

2

1

yields the vector

q

q

q

q

q

q

Nested magic squares

By nested squares we mean matrices having certain properties, which make them and some of their submatrices

semi magic squares or pandiagonal magic squares. By a nested semi magic square 6 by 6 with a pandiagonal magic

square 4 by 4 we mean a matrix of the form

d11 b14 b13 b12 b11 r11

s – p11 2s–A–B–C C B A p11

s – p21 B +C – E A+E–C 2s–A–B–E E P21

s – p31 s – B s–A A+B+C–s s– C P31

s – p41 A+B+E–s s–E S–B–C+E s–A–E+C P41

f11 s – b14 s – b13 s – b12 s – b11 e11

where we require

sebbbbf

pppprse

bbbbrsd

111413121111

413121111111

141312111111

)1(..........3

3

This ensures that the matrix as a whole is a semi magic square with 3s as a magic constant. In the centre we have

a pandiagonal magic square. We introduce also the concept of the multi-nested semi magic square 2n by 2n with a

pandiagonal magic square 4 by 4. This will be the following matrix

Page 4: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

314

rmm rm(m-1) . . . rm1 bm1 bm2 bm3 bm4 dm1 . . . dm(m-1) dmm

r(m-1)m . . . . . . . . s –r(m-

1)m

. . . . . . . . . .

. . . . . . . . . .

r2m . . . r22 r21 B21 b22 b23 b24 d21 d22 . . . s –r2m

r1m . . . r12 r11 B11 b12 b13 b14 d11 s –

r12

. . . s –r1m

p1m . . . p12 p11 A B C 2s–A–B–C s –

p11

s –

p12

. . . s –p1m

P2m . . . P22 P21 E 2s–A–

B–E

A+

E –

C

B +C – E s –

P21

s –

P22

. . . s –

P2m

P3m . . . P32 P31

s – C

–s + A

+B+C

s –

A

s – B

s –

P31

s –

P32

. . . s –

P3m

P4m . . . P42 P41 s–A–

E+C

s–B–

C+E

s –

E

A+B+E–s s –

P41

s –

P42

. . . s –

P4m

e1m . . . e12 e11 s – b11 s – b12 s –

b13

s – b14 f11 s –

e12

. . . s –e1m

e2m . . . e22 s –

r21

s – b21 s – b22 s –

b23

s – b24 s –

d21

f22 . . . s –e2m

. . . . . . . . . .

. . . . . . . . . .

e(m-1)m . . . . . . . . s –

e(m-1)m

emm s –

rm(m-1)

. . . s –

rm1

s –bm1 s – bm2 s –

bm3

s – bm4 s –

dm1

. . . s –

dm(m-1)

fmm

where m= n – 2 and

)1(143211)1( ...... mmmmmmmmmmmmmm ddbbbbrrrnsd

mmmmmmmmmmmmmm eepppprrrnse )1(143211)1( ......

sneddbbbbrrf mmmmmmmmmmmmmm )2(...... )1(143211)1(

Note that we obtain semi magic square each time we remove the outer frame of the square.

By a multi-nested semi magic square 2n by 2n with a pandiagonal magic square 6 by 6 we mean the following

matrix:

Page 5: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

315

rmm rm(m-1) ... rm1 Vm6 Vm5 Vm4 Vm3 Vm2 Vm1 Pm1 … pm(m-1) pmm

s –

p(m-1)m

. . . . . . . . . . P(m-

1)m

. . . . . . . . . . .

. . . . . . . . . .

. r22 r21 v26 v25 v24 v23 v22 v21 p21

p22

.

s –p1m … s –

p12

r11 v16 v15 v14 v13 v12 v11 p11 p12 … P1m

s –

u1m

… s –

u12

s –

u11

K L

–L –K

–H–G

–F–C –

B–A+

9/2s

K–

I+F–

D+A

L – J

+ G –

E + B

–L –

K+J+I

+H+E+

D+C–

3/2s

u11 u12 … u1m

s –

u2m

… s –

u22

s –

u21

F G H I J –J–I –

H–G–

F + 3s

u21 u22 … u2m

s –u3m … s –

u32

s –

u31

A B C D E –E–D –

C–B -

A+3s

u31 u32 … u3m

s –u4m … s –

u42

s –

u41

s– K

+ I –F

+D –

A

s–L

–J–

G+E

–B

L+K– J

– I –H

–E– D–

C+

5/2s

s –K s – L L+K+

H+G+

F+C+B

+A–

7/2 s

u41 u42 … u4m

s –u5m … s –

u52

s –

u51

s – I s – J J + I

+H+G

+F–2s

s – F s – G s – H u51 u52 … u5m

s –u6m … s –

u62

s –

u61

s – D s –

E

E+D+

C+B+

A –2s

s – A s – B s – C u61 u62 … u6m

s –

w1m

… s –

w12

t11 s –

v16

s –

v15

s – v14 s –

v13

s –

v12

s – v11 w11

w12 ... w1m

. t22 s – r21 s –

v26

s –

v25

s – v24 s –

v23

s –

v22

s – v21 s –

p21

w22 .

. . . . . . . . . .

. . . . . . . . . .

s –

w(m-

1)m

. . . . . . . . . . w(m-

1)m

tmm s –rm(m-

1)

. s –rm1 s –vm6 s –

vm5

s –vm4 s –vm3 s –vm2 s –vm1 s –

pm1

. s –pm(m-1) wmm

where m = n – 2,

,...... )1(16543211)1( mmmmmmmmmmmmmmmm rrvvvvvvpppnsr

,...... )1(16543211)1( mmmmmmmmmmmmmmmm wwuuuuuupppnsw

.)2(...... )1(16543211)1( snwrrvvvvvvppt mmmmmmmmmmmmmmmm

For example, we define the nested semi magic square 8 by 8 with a 6 by 6 pandiagonal square as the following

square:

Page 6: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

316

r11 v16 v15 v14 v13 v12 v11 p11

s – u11 K L –L –K –H

–G –F –C

–B –A +

9/2 s

K–I–

D+F+A

L – J + G

– E + B

– L –K + J +I

+H + E + D +

C

– 3/2 s

u11

s – u21

F

G

H

I

J

–J –I –H –G–

F+ 3s

u21

s – u31

A

B

C

D

E

–E –D –C –B–

A+ 3s

u31

s – u41 s – K –

F +D –

A +I

s – L

+J –

G+ E

–B

L + K – J

– I –H –E

–D – C +

5/2s

s –K s – L L + K + H + G

+ F + C + B +

A – 7/2 s

u41

s – u51

s – I

s – J

J + I + H

+ G +F –

2s

s – F

s – G

s – H

u51

s – u61

s – D

s – E E+D+C +

B+A –2s

s – A

s – B

s –C u61

t11 s – v16 s–v15 s–v14 s – v13 s – v12 s – v11 w11

where

swvvvvvvt

uuuuuupsw

vvvvvvpsr

2

4

4

1116151413121111

6151413121111111

1615141312111111

2. MAIN RESULTS

We will prove several statements about the nullspace of the mentioned nested magic squares. By doing this we will

use mathematical induction. Hence, some results will be used for proving others. We start with

Proposition 1: The nested semi magic square 6 by 6 with a pandiagonal magic square 4 by 4 has the following

space

as a subspace of the nullspace of this square.

Proof: We search for real numbers 61 ,,... aa such that

0... 6611 CaCa

where the capital letters denote the columns of the matrix. We set

61 aa and 1saq . We set

RRz

CA

CBAs

AC

sCBA

z

1

1

1

1

1

1

1

},:

2

222

2

222

{

Page 7: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

317

)2(.......................

1

1

1

1

222

22

5

4

3

2

s

q

CA

CBAs

AC

sCBA

z

a

a

a

a

where z is a unknown real number. Now, the expression

6611 ... CaCa

is the result of matrix multiplication of the square with the vector

6

5

4

3

2

1

a

a

a

a

a

a

The result of this operation will be according to our choice a vector which has the following middle entries

1411

1311

1211

1111

1

1

1

1

141

131

121

111

apsa

apsa

apsa

apsa

sa

sa

sa

sa

ap

ap

ap

ap

Hence, the middle entries are zero and we have to equate the first and last entry of the vector to zero. We will use

this requirement to determine the values of 1a and z. Thus, we solve the following two equations:

0111514413312211111 adababababar

0)()()()( 111514413312211111 afabsabsabsabsae

This system can be simplified to

)3(...............0)( 51441331221111111 ababababadr

0)()( 514413312211543211111 ababababaaaasafe

According to the definition of the variables (see (1) and (2)) we have

141312111111 3 bbbbsdr

sbbbbfe 141312111111

15432 22

as

qaaaa

Note that we used the sign properties of the vectors belonging to the nullspace of the 4 by 4 square. Upon using the

last relations we convert the system (3) into

0)3( 514413312211114131211 abababababbbbs

0)3( 514413312211114131211 ababababasbbbb

We recognize that one equation is redundant. We substitute the values of 2a , 3a , 4a and 5a . Then, we obtain

from the last equation

0 ))()22()()22(()2(2

314131211114131211 zCAbCBAsbACbsCBAbabbbbs

If the coefficient of 1a is not zero, then we conclude that

za 11

Upon substituting this value for 1a we are done with the proof. If the coefficient of 1a is zero, then we conclude

that 1a can be any number, while z might be zero. In this case we can say

Ra u ,1 ,u 111

Page 8: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

318

and the proof is done with u instead of z.

Remark: 1) We note that the sum of all entries of any vector in the subspace is zero.

2) When we consider the following numerical example for a nested semi magic square 6 by 6

–26 8 1 4 7 9

– 4 –3 0 3 2 5

–1 –3 8 –9 6 2

1 –2 –1 4 1 0

–2 10 –5 4 –7 3

35 –7 0 –3 –6 –16

We obtain the following reduced row echelon form

00000011

810000

11

4601000

11

1900100

11

3500010

100001

Hence, the nullity of the square is one. Therefore, the described subspace in proposition 1 is actually the nullspace of

the square.

Proposition 2: The multi-nested semi magic square 2n by 2n with a pandiagonal magic square 4 by 4 has the

following space

}:

2

1

23

1

2

2

34

.

.

.

1

2...4

3

3

21

1

2...2

1

1

2...2

122

1

2...2

1

1

2...2

122

1

2...4

3

3

21

.

.

.

1

2

2

34

1

23

2

{ Rz

n

n

nn

n

n

n

nn

n

n

n

nCA

n

nCBAs

n

nAC

n

nsCBA

n

n

n

n

n

nn

n

nn

n

z

for all 3n as a subspace of the nullspace of this square.

Proof: We will use mathematical induction in our proof. We start with

Page 9: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

319

Basis step: when 3 n we obtain the semi magic square 6 by 6, which has according to proposition 1 a subspace

as claimed.

We continue now with

Induction step: we suppose that the given form of the nullspace is true for kn , i. e. there exists a subspace of

the nullspace of any multi-nested square kk 2by 2 with a pandiagonal magic square 4 by 4, which has the

following structure

Rz

k

k

kk

k

k

k

kk

k

k

k

kCA

k

kCBAs

k

kAC

k

ksCBA

k

k

k

k

k

kk

k

kk

k

z

kx

kx

kx

x

x

,

2

1

23

1

2

2

34

.

.

.

1

2...4

3

3

21

1

2...2

1

1

2...2

122

1

2...2

1

1

2...2

122

1

2...4

3

3

21

.

.

.

1

2

2

34

1

23

2

2

.

.

.

1

.

.

.

2

1

We construct now a subspace of the nullspace of the multi-nested square 22by 22 kk . We search for

221 ,,... kaa such that the following relation holds

0... 222211 kk CaCa

where the capital letters denote the columns of the square. We choose 221 kaa , 1saq . We choose further

)4(.......

1

1

1

.

.

.

1

1

1

2

.

.

.

1

.

.

.

2

1

12

.

.

.

4

3

2

ks

q

kx

kx

kx

x

x

z

ka

a

a

a

Page 10: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

320

Since the statement of the proposition holds for kn , we conclude that the multiplication of the multi-nested

kk 2by 2 square inside the multi-nested square 22by 22 kk by this vector yields a vector, where each

entry is equal to q . Hence, the multiplication of the multi-nested square 22by 22 kk by

22

.

.

.

3

2

1

ka

a

a

a

yields

Therefore, all the entries are zero except the first and last entry. We will use this requirement to determine z and 1a

. We obtain therefore the following equations

0...

...

1)1)(1(41)1(34)1(

23)1(12)1(1)1(11)1(2)1(1)1)(1(

adadab

abababararar

mmkmkm

kmkmkmkmmmmm

0...)()()(

)()()(...)(

1)1)(1(41)1(34)1(23)1(

12)1(1)1(11)1(2)1(1)1)(1(

afadsabsabs

absabsarsarsae

mmkmkmkm

kmkmkmmmmm

This linear system can be simplified to

0...

...)(

12)1(41)1(34)1(

23)1(12)1(1)1(11)1(2)1(1)1)(1()1)(1(

kmmkmkm

kmkmkmkmmmmmmm

adadab

abababararadr

1)1(1

.

.

.

1)1(21

1)1(11

1)1(41

1)1(31

1)1(21

1)1(11

1)1(11

1)1(21

.

.

.

1)1)(1(1

1)1(1

1

.

.

.

1

1

1

1

1

1

1

1

.

.

.

1

1

1)1(

.

.

.

1)1(2

1)1(1

1)1(4

1)1(3

1)1(2

1)1(1

1)1(1

1)1(2

.

.

.

1)1)(1(

1)1(

amm

esa

am

esa

am

esa

am

psa

am

psa

am

psa

am

psa

am

rsa

am

rsa

amm

rsa

amm

rsa

sa

sa

sa

sa

sa

sa

sa

sa

sa

sa

sa

amm

e

am

e

am

e

am

p

am

p

am

p

am

p

am

r

am

r

amm

r

amm

r

Page 11: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

321

0...

...)...()(

12)1(41)1(34)1(23)1(12)1(

1)1(11)1(2)1(12321)1)(1()1)(1(

kmmkmkmkmkm

kmkmmmkmmmm

adadababab

abararaaasafe

According to the definition of our variables (see (4)) we have

mmmmmm

mmmmmmmmmm

ddbbb

brrrskdr

)1(1)1(4)1(3)1(2)1(

1)1(1)1()1)(1()1()1)(1()1)(1(

...

...)1(

skdd

bbbbrrfe

mmm

mmmmmmmmmmm

)1(...

...

)1(1)1(

4)1(3)1(2)1(1)1(1)1()1()1)(1()1)(1(

11232 22

... as

qaaa k

According to the definition of )1)(1( mmf and )1)(1( mmd we obtain the following linear system

0...

...

)......)1((

12)1(41)1(

34)1(23)1(12)1(1)1(11)1(2)1(

1)1(1)1(4)1(3)1(2)1(1)1(1)1()1(

kmmkm

kmkmkmkmkmmm

mmmmmmmmmm

adad

ababababarar

addbbbbrrsk

0...

...

))1(......(

12)1(41)1(

34)1(23)1(12)1(1)1(11)1(2)1(

1)1(1)1(4)1(3)1(2)1(1)1(1)1()1(

kmmkm

kmkmkmkmkmmm

mmmmmmmmmm

adad

ababababarar

askddbbbbrr

We recognize that one equation is redundant. We substitute the values of 2a , …, 12 ka and obtain the following

equation:

0)...

...(

)......(1

2)1(31)1(

24)1(13)1(2)1(11)1(21)1(1)1(

1)1(1)1(4)1(3)1(2)1(1)1(1)1()1(

zxdxd

xbxbxbxbxrxr

addbbbbrrksk

k

kmmkm

kmkmkmkmkmmm

mmmmmmmmmm

We can say using a similar argument to the one used in the proof of proposition 1

za k 11

In analogy to that proof we are done.

Remark: We note that the sum of all entries of any vector in the subspace is zero.

We turn our attention now to the squares, which have a pandiagonal magic square 6 by 6 of the special structure

in the centre. We can prove very similar results for this type of squares like the results for multi-nested squares with

4 by 4 square in the centre.

Proposition 3: The nested semi magic square 8 by 8 with a 6 by 6 pandiagonal square has the following space

Page 12: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

322

} :

1

3

13

3

12

3

11

3

13

3

12

3

11

1

{ Rz

x

x

x

x

x

x

z

as a subspace of the nullspace of the square.

Proof: We search for real numbers 81 ,,... aa such that

0... 8811 CaCa

where the capital letters denote the columns of the matrix. We set 81 aa

and 1saq . We set

Rzs

q

x

x

x

x

x

x

z

a

a

a

a

a

a

,

1

1

1

1

1

1

3

3

2

1

3

2

1

7

6

5

4

3

2

where z is an unknown real number. Now, the expression

8811 ... CaCa

is the result of matrix multiplication of the square with the vector

8

7

6

5

4

3

2

1

a

a

a

a

a

a

a

a

The result of this operation will be according to our choice a vector which has the following middle entries

1611

1511

1411

1311

1211

1111

1

1

1

1

1

1

161

151

141

131

121

111

ausa

ausa

ausa

ausa

ausa

ausa

sa

sa

sa

sa

sa

sa

au

au

au

au

au

au

Hence, the middle entries are zero and we have to equate the first and last entry of the vector to zero. We will use

this requirement to determine the values of 1a and z. Thus, we solve the following two equations:

0111716615514413312211111 aravavavavavavap

Page 13: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

323

01117

)16

(6

)15

(

5)

14(

4)

13(

3)

12(

2)

11(

111

atavsavs

avsavsavsavsaw

This system can be simplified to

0)( 71661551441331221111111 avavavavavavarp

0716615514413

312211)

765432(

1)

1111(

avavavav

avavaaaaaasatw

According to the definition of the variables we have

1615141312111111 4 vvvvvvsrp

svvvvvvtw 21615141312111111

12

2

765432a

s

qaaaaaa

Note that we used the sign properties of the vectors belonging to the nullspace of the 6 by 6 square. Upon using the

last relations we convert the system into

0)4( 7166155144133122111161514131211 avavavavavavavvvvvvs

0)4( 7166155144133122111161514131211 avavavavavavasvvvvvv

We recognize that one equation is redundant. We substitute the values of 2a , 3a , 4a , 5a , 6a and 7a . Then, we

obtain from the last equation

0)()3(3

43162151143132121111161514131211 zxvxvxvxvxvxvavvvvvvs

If the coefficient of 1a is not zero, then we conclude that

za 11

Upon substituting this value for 1a we are done with the proof. If the coefficient of 1a is zero, then we conclude

that 1a can be any number, while z might be zero. In this case we can say

Ra u ,1 ,u 111

and we have the proof done with u instead of z.

Remark: 1) We note that the sum of all entries of any vector in the subspace is zero.

2) When we consider the following numerical example for a nested semi magic square 8 by 8

–17 7 3 1 0 4 2 8

– 4 –2 1 4 0 2 1 6

0 4 0 1 1 0 0 2

–3 0 4 –3 1 3 1 5

–1 2 0 1 4 1 –2 3

2 1 2 2 –2 2 1 0

1 1 –1 1 2 –2 5 1

30 –5 –1 1 2 –2 0 –17

We obtain the following reduced row echelon form

Page 14: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

324

0000000063

231000000

63

5050100000

7

170010000

63

650001000

63

4630000100

21

370000010

10000001

Hence, the nullity of the square is one. Therefore, the described subspace in proposition 3 is actually the nullspace of

the square.

Proposition 4: The nested semi magic square 2n by 2n with a 6 by 6 pandiagonal square has the following space

}:

3

1

34

1

3

2

45

.

.

.

1

3...5

3

4

21

1

3...4

2

3

13

.

1

3...4

2

3

12

1

3...4

2

3

11

1

3...4

2

3

13

1

3...4

2

3

12

1

3...4

2

3

11

1

3...5

3

4

21

.

.

.

1

3

2

45

1

34

3

{ Rz

n

n

nn

n

n

n

nn

n

n

n

nx

n

nx

n

nx

n

nx

n

nx

n

nx

n

n

n

n

n

nn

n

nn

n

z

as a subspace of the nullspace of the square for all .4n

Proof: We will use mathematical induction in our proof. We start with

Basis step: when 4n we obtain the semi magic square 8 by 8, which has according to proposition 3 a subspace

as claimed.

We continue now with

Page 15: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

325

Induction step: we suppose that the given form of the nullspace is true for kn , i.e. there exists a subspace of

the nullspace of the multi-nested square kk 2by 2 , which has the following structure

Rz

k

k

kk

k

k

k

kk

k

k

k

kx

k

kx

k

kx

k

kx

k

kx

k

kx

k

k

k

k

k

kk

k

kk

k

z

ky

ky

ky

y

y

,

3

1

34

1

3

2

45

.

.

.

1

3...5

3

4

21

1

3...4

2

3

13

.

1

3...4

2

3

12

1

3...4

2

3

11

1

3...4

2

3

13

1

3...4

2

3

12

1

3...4

2

3

11

1

3...5

3

4

21

.

.

.

1

3

2

45

1

34

3

2

.

.

.

1

.

.

.

2

1

We construct now a subspace of the nullspace of the multi-nested square 22by 22 kk . We search for

221 ,,... kaa such that the following relation holds

0... 222211 kk CaCa

where the capital letters denote the columns of the square. We choose 221 kaa , 1saq . We choose further

1

1

1

.

.

.

1

1

1

2

.

.

.

1

.

.

.

2

1

12

.

.

.

4

3

2

ks

q

ky

ky

ky

y

y

z

ka

a

a

a

Page 16: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

326

Since the statement of the proposition holds for kn we conclude that the multiplication of the multi-

nested kk 2by 2 square inside the multi-nested square 22by 22 kk by this vector yields a vector, where

each entry is equal to q . Hence, the multiplication of the multi-nested square 22by 22 kk by

)

22

.

.

.

3

2

1

ka

a

a

a

yields

1)1(1

1)1)(1(1

1)1(11

1)1(61

1)1(51

1)1(41

1)1(31

1)1(21

1)1(11

1)1(11

1)1)(1(1

1)1(1

1

1

1

1

1

1

1

1

1

1

1

1

1)1(

1)1)(1(

1)1(1

1)1(6

1)1(5

1)1(4

1)1(3

1)1(2

1)1(1

1)1(1

1)1)(1(

1)1(

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

awsa

awsa

awsa

ausa

ausa

ausa

ausa

ausa

ausa

apsa

apsa

apsa

sa

sa

sa

sa

sa

sa

sa

sa

sa

sa

sa

sa

aw

aw

aw

au

au

au

au

au

au

ap

ap

ap

mm

mm

m

m

m

m

m

m

m

m

mm

mm

mm

mm

m

m

m

m

m

m

m

m

mm

mm

All the entries are zero except the first and last entry. We will use this requirement to determine z and 1a . We

obtain therefore the following equations

0...

...

1)1)(1(51)1(46)1(35)1(24)1(

13)1(2)1(11)1(21)1(2)1(1)1)(1(

araravavav

avavavapapap

mmkmkmkmkm

kmkmkmkmmmmm

0...)(

)()()()(

)()()(...)(

1)1)(1(51)1(

46)1(35)1(24)1(13)1(

2)1(11)1(21)1(2)1(1)1)(1(

atars

avsavsavsavs

avsavsapsapsaw

mmkm

kmkmkmkm

kmkmkmmmmm

This linear system can be simplified to

0...

...)(

12)1(51)1(46)1(35)1(24)1(

13)1(2)1(11)1(21)1(2)1(1)1)(1()1)(1(

kmmkmkmkmkm

kmkmkmkmmmmmmm

araravavav

avavavapaparp

Page 17: THE NULLSPACE OF NESTED MAGIC SQUARES · When we want to obtain pandiagonal magic squares 6 by 6, having a similar structure to that of the pandiagonal magic squares 4 by 4, we consider

IJRRAS 8 (3) ● September 2011 ElShokry & Al-Ashhab ● The Nullspace of Nested Magic Squares

327

0...

...)...()(

12)1(

51)1(46)1(35)1(24)1(13)1(2)1(

11)1(21)1(2)1(12321)1)(1()1)(1(

kmm

kmkmkmkmkmkm

kmkmmmkmmmm

ar

aravavavavav

avapapaaasatw

According to the definition of our variables we have

mmmmmmmm

mmmmmmmmmm

rrvvvvv

vpppskrp

)1(1)1(6)1(5)1(4)1(3)1(2)1(

1)1(1)1()1)(1()1()1)(1()1)(1(

...

...)1(

skrrvv

vvvvpptw

mmmmm

mmmmmmmmmmm

)1(...

...

)1(1)1(6)1(5)1(

4)1(3)1(2)1(1)1(1)1()1()1)(1()1)(1(

11232 22

... as

qaaa k

According to the definition of )1)(1( mmr and )1)(1( mmt we obtain the following linear system

0...

...)...

...)1((

12)1(51)1(46)1(35)1(24)1(

13)1(2)1(11)1(21)1(2)1(1)1(1)1(

6)1(5)1(4)1(3)1(2)1(1)1(1)1()1(

kmmkmkmkmkm

kmkmkmkmmmmmm

mmmmmmmmm

araravavav

avavavapaparr

vvvvvvppsk

0...

...))1(...

...(

12)1(51)1(46)1(35)1(24)1(13)1(

2)1(11)1(21)1(2)1(1)1(

1)1(6)1(5)1(4)1(3)1(2)1(1)1(1)1()1(

kmmkmkmkmkmkm

kmkmkmmmmm

mmmmmmmmmm

araravavavav

avavapapaskr

rvvvvvvpp

We recognize that one equation is redundant. We substitute the values of 2a , …, 12 ka and obtain the following

equation

0)...

...()...

...(1

2)1(41)1(36)1(25)1(14)1(

3)1(12)1(21)1(31)1(1)1(1)1(1)1(

6)1(5)1(4)1(3)1(2)1(1)1(1)1()1(

zyryryvyvyv

yvyvyvypyparr

vvvvvvppksk

k

kmmkmkmkmkm

kmkmkmkmmmmmm

mmmmmmmmm

We can say using a similar argument to the one in the proof of proposition 3

za k 11

In analogy to that proof we are done.

ACKNOWLEDGMENT

This paper is extracted from a Msc. Thesis by Ayoub ElShokry (supervised by Saleem Al-Ashhab) at Al-Albayt

University in 2007

REFERENCES

[1]. Al-Ashhab, S., Computer Solutions of Magic 44 Squares and Semi – Magic 44 Squares Problem , Dirasat,

Natural and Engineering Sciences, Vol. , 25 , No , 3 , 1998 , pp . (445-450).

[2]. Al-Ashhab, S., Theory of Magic Squares / Programming and Mathematics, Royal Scientific Society, Jordan,

2000 (in Arabic).

[3]. Anton, H., Elementary Linear Algebra, 7th

edition, Jon Wiley, New York, 1994.

[4]. Rosser, B. & Walker, R., J., On the Transformation Group for Diabolic Magic Squares of Order Four, Amer.

Math. Soc., Bult XLIV, 1938, pp. 416-420.

[5]. Trenkler, D. & Trenkler, G., Magic Squares, Melancholy and The Moore-Penrose Inverse, The Bulletin of

The International Linear Algebra Society, No.27 , 2001, pp (3-10).