2. Main results

We prove first a simple result for a compound square of 4 � 4 squares. We then generalize this result for an arbitrary number of squares.

vij <sup>¼</sup> <sup>v</sup><sup>∗</sup>

Aij ¼

ij <sup>þ</sup> bijv∗∗

ij <sup>þ</sup> <sup>f</sup> ijv∗∗

ij � dijv∗∗

ij � hijv∗∗

ij � cijv<sup>∗</sup>

ij � gijv<sup>∗</sup>

ij <sup>þ</sup> aijv<sup>∗</sup>

ij <sup>þ</sup> eijv<sup>∗</sup>

rows in the matrix in Eq. (2) are redundant. Since we have the relations

the application of elementary row operations on the matrix in Eq. (2) yields to

<sup>r</sup><sup>12</sup> <sup>¼</sup> ð Þ <sup>a</sup><sup>11</sup> � <sup>c</sup><sup>11</sup> <sup>v</sup><sup>∗</sup>

<sup>r</sup><sup>21</sup> <sup>¼</sup> ð Þ <sup>a</sup><sup>12</sup> � <sup>c</sup><sup>12</sup> <sup>v</sup><sup>∗</sup>

<sup>q</sup><sup>11</sup> <sup>¼</sup> ð Þ <sup>a</sup><sup>21</sup> � <sup>c</sup><sup>21</sup> <sup>v</sup><sup>∗</sup>

<sup>q</sup><sup>12</sup> <sup>¼</sup> ð Þ <sup>a</sup><sup>21</sup> � <sup>c</sup><sup>21</sup> <sup>v</sup><sup>∗</sup>

This analysis enables us to conclude the following relations from (2):

ij � dijv∗∗ ij

ij � hijv∗∗ ij

> ij <sup>þ</sup> bijv∗∗ ij

1

0

BBBBBB@

CCCCCA ¼

Since the sum of two pandiagonal magic squares is pandiagonal magic, we deduce that four

<sup>a</sup><sup>11</sup> <sup>þ</sup> <sup>e</sup><sup>11</sup> <sup>¼</sup> <sup>c</sup><sup>11</sup> <sup>þ</sup> <sup>g</sup><sup>11</sup> ) <sup>a</sup><sup>11</sup> � <sup>c</sup><sup>11</sup> ¼ � <sup>e</sup><sup>11</sup> � <sup>g</sup><sup>11</sup> � � <sup>b</sup><sup>11</sup> <sup>þ</sup> <sup>f</sup> <sup>11</sup> <sup>¼</sup> <sup>d</sup><sup>11</sup> <sup>þ</sup> <sup>h</sup><sup>11</sup> ) <sup>b</sup><sup>11</sup> � <sup>d</sup><sup>11</sup> ¼ � <sup>f</sup> <sup>11</sup> � <sup>h</sup><sup>11</sup> � �

0 r<sup>12</sup> r<sup>21</sup> 0

q<sup>11</sup> q<sup>12</sup> r<sup>21</sup> þ q<sup>11</sup> q<sup>12</sup> � r<sup>12</sup> 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0

ij <sup>þ</sup> <sup>f</sup> ijv∗∗ ij

Further, we can assume that

Hence, we can assume that:

aij v<sup>∗</sup>

0

BBBBB@

eij v<sup>∗</sup>

�cij <sup>v</sup><sup>∗</sup>

�gij <sup>v</sup><sup>∗</sup>

Aijvij ¼

where

ij; v∗∗ ij ; �v<sup>∗</sup>

ij; �v∗∗ ij � �<sup>0</sup>

aij bij cij dij eij f ij gij hij s � cij s � dij s � aij s � bij s � gij s � hij s � eij s � f ij

, for i ¼ 1, j ¼ 1, 2

aij � cij � �v<sup>∗</sup>

eij � gij � �v<sup>∗</sup>

� aij � cij � �v<sup>∗</sup>

� eij � gij � �v<sup>∗</sup>

<sup>12</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>11</sup> � <sup>d</sup><sup>11</sup> <sup>v</sup>∗∗

<sup>11</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>12</sup> � <sup>d</sup><sup>12</sup> <sup>v</sup>∗∗

<sup>11</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>21</sup> � <sup>d</sup><sup>21</sup> <sup>v</sup>∗∗

<sup>12</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>21</sup> � <sup>d</sup><sup>21</sup> <sup>v</sup>∗∗

12

11

11

12

, i, j ¼ 1, 2

ij <sup>þ</sup> bij � dij � �v∗∗

ij <sup>þ</sup> <sup>f</sup> ij � hij � �v∗∗

ij � bij � dij � �v∗∗

ij � <sup>f</sup> ij � hij � �v∗∗

ij

Nullspace of Compound Magic Squares http://dx.doi.org/10.5772/intechopen.74678 63

ij

1

CCCCCCA

ij

ij

Proposition 1: The compound 8 � 8 magic square processes a three-dimensional subspace of its nullspace.

Proof: First we note that the vector

$$(1, 1, 1, 1, -1, -1, -1, -1)^{\prime}$$

is a nonzero vector, which belongs to the nullspace of the square, since the squares have the same magic constant.

Now, the square A<sup>11</sup> (res. A12) has a nonzero vector v<sup>11</sup> (res. v12), which belongs to the nullspace of the square, since A11(res. A12) is a pandiagonal magic square. We look for four numbers f <sup>11</sup>, f <sup>12</sup>, f <sup>21</sup>, f <sup>22</sup> such that the vector

$$\begin{pmatrix} f\_{11}v\_{11} + f\_{12}v\_{12} \\ f\_{21}v\_{11} + f\_{22}v\_{12} \end{pmatrix}$$

belongs to the nullspace of the square. To do this we compute the following matrix multiplication:

$$
\begin{pmatrix} A\_{11} & A\_{12} \\ A\_{21} & A\_{22} \end{pmatrix} \begin{pmatrix} f\_{11}v\_{11} + f\_{12}v\_{12} \\ f\_{21}v\_{11} + f\_{22}v\_{12} \end{pmatrix} = \begin{pmatrix} A\_{11}\left(f\_{11}v\_{11} + f\_{12}v\_{12}\right) + A\_{12}\left(f\_{21}v\_{11} + f\_{22}v\_{12}\right) \\ A\_{21}\left(f\_{11}v\_{11} + f\_{12}v\_{12}\right) + A\_{22}\left(f\_{21}v\_{11} + f\_{22}v\_{12}\right) \end{pmatrix}
$$

According to the choice of v<sup>11</sup> and v<sup>12</sup> we obtain the vector g1; g<sup>2</sup> � �<sup>0</sup> as the result of matrix multiplication, where:

$$\begin{aligned} g\_1 &= A\_{11} f\_{12} v\_{12} + A\_{12} f\_{21} v\_{11} \\ g\_2 &= A\_{21} v\_{11} f\_{11} + A\_{21} v\_{12} f\_{12} + (A\_{12} v\_{11} + A\_{21} v\_{11}) f\_{21} + (A\_{21} v\_{12} - A\_{11} v\_{12}) f\_{22} .\end{aligned}$$

Note that we used the relation A<sup>22</sup> ¼ A<sup>12</sup> þ A<sup>21</sup> � A11. We can rewrite the vector g1; g<sup>2</sup> � �<sup>0</sup> in the form.

$$
\begin{bmatrix}
0 & A\_{11}v\_{12} & A\_{12}v\_{11} & 0 \\ 
A\_{21}v\_{11} & A\_{21}v\_{12} & (A\_{12} + A\_{21})v\_{11} & (A\_{21} - A\_{11})v\_{12} \\ 
\end{bmatrix}
\begin{pmatrix}
f\_{11} \\ f\_{12} \\ f\_{21} \\ f\_{22} \\ f\_{22}
\end{pmatrix} \tag{2}
$$

According to Al-Ashhab (see [3]) we can assume that the vectors in the nullspace of the pandiagonal magic square are

$$\upsilon\_{i\dot{\jmath}} = \left(\upsilon\_{i\dot{\jmath}}^{\*}, \upsilon\_{i\dot{\jmath}}^{\*\*}, -\upsilon\_{i\dot{\jmath}}^{\*}, -\upsilon\_{i\dot{\jmath}}^{\*\*}\right)' \text{ for } i = 1, j = 1, 2$$

Further, we can assume that

2. Main results

62 Matrix Theory-Applications and Theorems

same magic constant.

A<sup>11</sup> A<sup>12</sup> A<sup>21</sup> A<sup>22</sup>

multiplication, where:

pandiagonal magic square are

form.

nullspace.

result for an arbitrary number of squares.

numbers f <sup>11</sup>, f <sup>12</sup>, f <sup>21</sup>, f <sup>22</sup> such that the vector

" # <sup>f</sup> <sup>11</sup>v<sup>11</sup> <sup>þ</sup> <sup>f</sup> <sup>12</sup>v<sup>12</sup>

g<sup>1</sup> ¼ A11f <sup>12</sup>v<sup>12</sup> þ A12f <sup>21</sup>v11,

f <sup>21</sup>v<sup>11</sup> þ f <sup>22</sup>v<sup>12</sup>

According to the choice of v<sup>11</sup> and v<sup>12</sup> we obtain the vector g1; g<sup>2</sup>

!

Proof: First we note that the vector

We prove first a simple result for a compound square of 4 � 4 squares. We then generalize this

Proposition 1: The compound 8 � 8 magic square processes a three-dimensional subspace of its

ð Þ 1; 1; 1; 1; �1; �1; �1; �1 <sup>0</sup>

is a nonzero vector, which belongs to the nullspace of the square, since the squares have the

Now, the square A<sup>11</sup> (res. A12) has a nonzero vector v<sup>11</sup> (res. v12), which belongs to the nullspace of the square, since A11(res. A12) is a pandiagonal magic square. We look for four

> f <sup>11</sup>v<sup>11</sup> þ f <sup>12</sup>v<sup>12</sup> f <sup>21</sup>v<sup>11</sup> þ f <sup>22</sup>v<sup>12</sup>

belongs to the nullspace of the square. To do this we compute the following matrix multiplication:

g<sup>2</sup> ¼ A21v11f <sup>11</sup> þ A21v12f <sup>12</sup> þ ð Þ A12v<sup>11</sup> þ A21v<sup>11</sup> f <sup>21</sup> þ ð Þ A21v<sup>12</sup> � A11v<sup>12</sup> f <sup>22</sup>:

Note that we used the relation A<sup>22</sup> ¼ A<sup>12</sup> þ A<sup>21</sup> � A11. We can rewrite the vector g1; g<sup>2</sup>

A21v<sup>11</sup> A21v<sup>12</sup> ð Þ A<sup>12</sup> þ A<sup>21</sup> v<sup>11</sup> ð Þ A<sup>21</sup> � A<sup>11</sup> v<sup>12</sup> � �

According to Al-Ashhab (see [3]) we can assume that the vectors in the nullspace of the

0 A11v<sup>12</sup> A12v<sup>11</sup> 0

<sup>¼</sup> <sup>A</sup><sup>11</sup> <sup>f</sup> <sup>11</sup>v<sup>11</sup> <sup>þ</sup> <sup>f</sup> <sup>12</sup>v<sup>12</sup>

A<sup>21</sup> f <sup>11</sup>v<sup>11</sup> þ f <sup>12</sup>v<sup>12</sup>

� � <sup>þ</sup> <sup>A</sup><sup>12</sup> <sup>f</sup> <sup>21</sup>v<sup>11</sup> <sup>þ</sup> <sup>f</sup> <sup>22</sup>v<sup>12</sup>

!

� � <sup>þ</sup> <sup>A</sup><sup>22</sup> <sup>f</sup> <sup>21</sup>v<sup>11</sup> <sup>þ</sup> <sup>f</sup> <sup>22</sup>v<sup>12</sup>

� �

� �

f 11 f 12 f 21 f 22 1

CCCCCCA

0

BBBBBB@

� �<sup>0</sup> as the result of matrix

� �<sup>0</sup>

in the

(2)

!

$$A\_{ij} = \begin{bmatrix} a\_{ij} & b\_{ij} & c\_{ij} & d\_{ij} \\ c\_{ij} & f\_{ij} & g\_{ij} & h\_{ij} \\ s - c\_{ij} & s - d\_{ij} & s - a\_{ij} & s - b\_{ij} \\ s - g\_{ij} & s - h\_{ij} & s - c\_{ij} & s - f\_{ij} \end{bmatrix}, i, j = 1, 2$$

Hence, we can assume that:

Aijvij ¼ aij v<sup>∗</sup> ij <sup>þ</sup> bijv∗∗ ij � cijv<sup>∗</sup> ij � dijv∗∗ ij eij v<sup>∗</sup> ij <sup>þ</sup> <sup>f</sup> ijv∗∗ ij � gijv<sup>∗</sup> ij � hijv∗∗ ij �cij <sup>v</sup><sup>∗</sup> ij � dijv∗∗ ij <sup>þ</sup> aijv<sup>∗</sup> ij <sup>þ</sup> bijv∗∗ ij �gij <sup>v</sup><sup>∗</sup> ij � hijv∗∗ ij <sup>þ</sup> eijv<sup>∗</sup> ij <sup>þ</sup> <sup>f</sup> ijv∗∗ ij 0 BBBBB@ 1 CCCCCA ¼ aij � cij � �v<sup>∗</sup> ij <sup>þ</sup> bij � dij � �v∗∗ ij eij � gij � �v<sup>∗</sup> ij <sup>þ</sup> <sup>f</sup> ij � hij � �v∗∗ ij � aij � cij � �v<sup>∗</sup> ij � bij � dij � �v∗∗ ij � eij � gij � �v<sup>∗</sup> ij � <sup>f</sup> ij � hij � �v∗∗ ij 0 BBBBBB@ 1 CCCCCCA

Since the sum of two pandiagonal magic squares is pandiagonal magic, we deduce that four rows in the matrix in Eq. (2) are redundant. Since we have the relations

$$\begin{aligned} a\_{11} + e\_{11} &= c\_{11} + g\_{11} & \Rightarrow & a\_{11} - c\_{11} = - (e\_{11} - g\_{11}) \\ b\_{11} + f\_{11} &= d\_{11} + h\_{11} & \Rightarrow & b\_{11} - d\_{11} = - (f\_{11} - h\_{11}) \end{aligned}$$

the application of elementary row operations on the matrix in Eq. (2) yields to

$$
\begin{bmatrix}
0 & r\_{12} & r\_{21} & 0 \\
 q\_{11} & q\_{12} & r\_{21} + q\_{11} & q\_{12} - r\_{12} \\
 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0
\end{bmatrix}
$$

where

$$\begin{aligned} r\_{12} &= (a\_{11} - c\_{11})v\_{12}^\* + (b\_{11} - d\_{11})v\_{12}^{\*\*} \\ r\_{21} &= (a\_{12} - c\_{12})v\_{11}^\* + (b\_{12} - d\_{12})v\_{11}^{\*\*} \\ q\_{11} &= (a\_{21} - c\_{21})v\_{11}^\* + (b\_{21} - d\_{21})v\_{11}^{\*\*} \\ q\_{12} &= (a\_{21} - c\_{21})v\_{12}^\* + (b\_{21} - d\_{21})v\_{12}^{\*\*} \end{aligned}$$

This analysis enables us to conclude the following relations from (2):

$$f\_{11} = -\frac{r\_{12}r\_{21} + q\_{11}r\_{12} - q\_{12}r\_{21}}{q\_{11}r\_{12}}f\_{21} + \frac{-q\_{12} + r\_{12}}{q\_{11}}f\_{22}, \\ f\_{12} = -\frac{r\_{21}}{r\_{12}}f\_{21}.$$

� 38 ; ; ; � <sup>722</sup>

; � <sup>85026</sup>

In fact, its nullity is 3. Thus, these two vectors together with

;

 ;

� <sup>216006</sup>

form a basis of its nullspace.

Proof: First we note that the vector

We look for scalars v1, v2, v3, v4, v5, v<sup>6</sup> such that

a<sup>11</sup> b<sup>11</sup> c<sup>11</sup> d<sup>11</sup> e<sup>11</sup> f <sup>11</sup> a<sup>12</sup> b<sup>12</sup> c<sup>12</sup> d<sup>12</sup> e<sup>12</sup> f <sup>12</sup>

k<sup>11</sup> l<sup>11</sup> g<sup>12</sup> h<sup>12</sup> i<sup>12</sup> j

s � d<sup>11</sup> s � e<sup>11</sup> s � f <sup>11</sup> s � a<sup>11</sup> s � b<sup>11</sup> s � c<sup>11</sup> s � d<sup>12</sup> s � e<sup>12</sup> s � f <sup>12</sup> s � a<sup>12</sup> s � b<sup>12</sup> s � c<sup>12</sup>

s � p<sup>11</sup> s � q<sup>11</sup> s � r<sup>11</sup> s � m11s � n<sup>11</sup> s � o<sup>11</sup> s � p<sup>12</sup> s � q<sup>12</sup> s � r<sup>12</sup> s � m12s � n<sup>12</sup> s � o<sup>12</sup>

s � d<sup>21</sup> s � e<sup>21</sup> s � f <sup>21</sup> s � a<sup>21</sup> s � b<sup>11</sup> s � c<sup>21</sup> s � d<sup>22</sup> s � e<sup>22</sup> s � f <sup>22</sup> s � a<sup>22</sup> s � b<sup>22</sup> s � c<sup>22</sup>

s � p<sup>21</sup> s � q<sup>21</sup> s � r<sup>21</sup> s � m21s � n<sup>21</sup> s � o<sup>21</sup> s � p<sup>22</sup> s � q<sup>22</sup> s � r<sup>22</sup> s � m22s � n<sup>22</sup> s � o<sup>22</sup>

m<sup>11</sup> n<sup>11</sup> o<sup>11</sup> p<sup>11</sup> q<sup>11</sup> r<sup>11</sup> m<sup>12</sup> n<sup>12</sup> o<sup>12</sup> p<sup>12</sup> q<sup>12</sup> r<sup>12</sup>

a<sup>21</sup> b<sup>21</sup> c<sup>21</sup> d<sup>21</sup> e<sup>21</sup> f <sup>21</sup> a<sup>22</sup> b<sup>22</sup> c<sup>22</sup> d<sup>22</sup> e<sup>22</sup> f <sup>22</sup>

m<sup>21</sup> n<sup>21</sup> o<sup>21</sup> p<sup>21</sup> q<sup>21</sup> r<sup>21</sup> m<sup>22</sup> n<sup>22</sup> o<sup>22</sup> p<sup>22</sup> q<sup>22</sup> r<sup>22</sup>

k<sup>21</sup> l<sup>21</sup> g<sup>22</sup> h<sup>22</sup> i<sup>22</sup> j

s � k<sup>11</sup> s � l<sup>11</sup> s � g<sup>11</sup> s � h<sup>11</sup> s � i11s � j

s � k<sup>21</sup> s � l<sup>21</sup> s � g<sup>21</sup> s � h<sup>21</sup> s � i21s � j

<sup>11</sup> � �v<sup>1</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>11</sup> � <sup>k</sup><sup>11</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>11</sup> � <sup>l</sup><sup>11</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>g</sup><sup>12</sup> � <sup>j</sup>

<sup>21</sup> � �v<sup>1</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>21</sup> � <sup>k</sup><sup>21</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>21</sup> � <sup>l</sup><sup>21</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>g</sup><sup>22</sup> � <sup>j</sup>

with a 6 � 6 one.

same magic constant.

s � j

s � j

g<sup>11</sup> � j

g<sup>21</sup> � j

g<sup>11</sup> h<sup>11</sup> i<sup>11</sup> j

g<sup>21</sup> h<sup>21</sup> i<sup>21</sup> j

tions. The system becomes

its nullspace.

<sup>5</sup> ; �170; �544; <sup>170</sup>; <sup>544</sup> � �<sup>t</sup>

 <sup>5</sup> ; <sup>3774</sup>; �71706; �3774; <sup>71706</sup> � �<sup>t</sup>

ð Þ 1; 1; 1; 1; �1; �1; �1; �1 <sup>0</sup>

We prove now a similar result to the previous proposition, where we replace the 4 � 4 square

Proposition 2: The compound 12 � 12 magic square possess a three-dimensional subspace of

ð Þ 1; 1; 1; 1; 1; 1 � 1; �1; �1; �1; �1; �1 <sup>0</sup>

is a nonzero vector, which belongs to the nullspace of the square, since the squares have the

k<sup>12</sup> l<sup>12</sup>

k<sup>22</sup> l<sup>22</sup>

We transform this equation into a linear system, in which we eliminate the redundant equa-

ð Þ <sup>a</sup><sup>11</sup> � <sup>d</sup><sup>11</sup> <sup>v</sup><sup>1</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>11</sup> � <sup>e</sup><sup>11</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> <sup>c</sup><sup>11</sup> � <sup>f</sup> <sup>11</sup> � �v<sup>3</sup> <sup>þ</sup> ð Þ <sup>a</sup><sup>12</sup> � <sup>d</sup><sup>12</sup> <sup>v</sup><sup>4</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>12</sup> � <sup>e</sup><sup>12</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> <sup>c</sup><sup>12</sup> � <sup>f</sup> <sup>12</sup> � �v<sup>6</sup> <sup>¼</sup> <sup>0</sup>

<sup>m</sup><sup>11</sup> � <sup>p</sup><sup>11</sup> � �v<sup>1</sup> <sup>þ</sup> <sup>n</sup><sup>11</sup> � <sup>q</sup><sup>11</sup> � �v<sup>2</sup> <sup>þ</sup> ð Þ <sup>o</sup><sup>11</sup> � <sup>r</sup><sup>11</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>m</sup><sup>12</sup> � <sup>p</sup><sup>12</sup> � �v<sup>4</sup> <sup>þ</sup> <sup>n</sup><sup>12</sup> � <sup>q</sup><sup>12</sup> � �v<sup>5</sup> <sup>þ</sup> ð Þ <sup>o</sup><sup>12</sup> � <sup>r</sup><sup>12</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup> ð Þ <sup>a</sup><sup>21</sup> � <sup>d</sup><sup>21</sup> <sup>v</sup><sup>1</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>21</sup> � <sup>e</sup><sup>21</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> <sup>c</sup><sup>21</sup> � <sup>f</sup> <sup>21</sup> � �v<sup>3</sup> <sup>þ</sup> ð Þ <sup>a</sup><sup>22</sup> � <sup>d</sup><sup>22</sup> <sup>v</sup><sup>4</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>22</sup> � <sup>e</sup><sup>22</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> <sup>c</sup><sup>22</sup> � <sup>f</sup> <sup>22</sup> � �v<sup>6</sup> <sup>¼</sup> <sup>0</sup>

<sup>m</sup><sup>21</sup> � <sup>p</sup><sup>21</sup> � �v<sup>1</sup> <sup>þ</sup> <sup>n</sup><sup>21</sup> � <sup>q</sup><sup>21</sup> � �v<sup>2</sup> <sup>þ</sup> ð Þ <sup>o</sup><sup>21</sup> � <sup>r</sup><sup>21</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>m</sup><sup>22</sup> � <sup>p</sup><sup>22</sup> � �v<sup>4</sup> <sup>þ</sup> <sup>n</sup><sup>22</sup> � <sup>q</sup><sup>22</sup> � �v<sup>5</sup> <sup>þ</sup> ð Þ <sup>o</sup><sup>22</sup> � <sup>r</sup><sup>22</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup>

s � k<sup>12</sup> s � l<sup>12</sup> s � g<sup>12</sup> s � h<sup>12</sup> s � i<sup>12</sup>

v1 v2 v3 �v<sup>1</sup> �v<sup>2</sup> �v<sup>3</sup> v4 v5 v6 �v<sup>4</sup> �v<sup>5</sup> �v<sup>6</sup>

Nullspace of Compound Magic Squares http://dx.doi.org/10.5772/intechopen.74678 :

s � k<sup>22</sup> s � l<sup>22</sup> s � g<sup>22</sup> s � h<sup>22</sup> s � i<sup>22</sup>

<sup>12</sup> � �v<sup>4</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>12</sup> � <sup>k</sup><sup>12</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>12</sup> � <sup>l</sup><sup>12</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup>

<sup>22</sup> � �v<sup>4</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>22</sup> � <sup>k</sup><sup>22</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>22</sup> � <sup>l</sup><sup>22</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup>

If we set

$$f\_{12} = 0, \; f\_{21} = 0, \; f\_{22} = \eta\_{11'}, \; f\_{11} = r\_{12} - \eta\_{12'}$$

which is consistent with the previous relations, we conclude that the vector

$$
\begin{pmatrix}
(r\_{12} - q\_{12})v\_{11} \\
 q\_{11}v\_{12}
\end{pmatrix}
$$

belongs to the nullspace of the square. We can make another choice as follows.

$$f\_{22} = 0,\\ f\_{21} = r\_{12}q\_{11'}f\_{12} = -r\_{21}q\_{11'}f\_{11} = r\_{21}q\_{12} - r\_{12}(r\_{21} + q\_{11})$$

and we obtain a vector belonging to the nullspace of the square, which is

$$\begin{pmatrix} \left(r\_{21}q\_{12} - r\_{12}\left(r\_{21} + q\_{11}\right)\right)v\_{11} - r\_{21}q\_{11}v\_{12} \\\\ -r\_{21}q\_{11}v\_{11} \end{pmatrix}$$

Now, the vectors v12, v<sup>11</sup> are linearly independent, since they correspond to different magic squares. Hence, the last two vectors are linearly independent. Also the vector

$$(1, 1, 1, 1, -1, -1, -1, -1)^{\prime}$$

is linearly independent with the last two vectors, since its first two entries are not the opposite of the third and fourth entry. ⎕

For example, the following square is a compound 8 � 8 magic square.


For this square we can construct as described the following two vectors in its nullspace

$$\left(-\frac{38}{5}, \frac{722}{5}, \frac{38}{5}, -\frac{722}{5}, -170, -544, 170, 544\right)^t$$

$$\left(-\frac{216006}{5}, -\frac{85026}{5}, \frac{216006}{5}, \frac{85026}{5}, 3774, -71706, -3774, 71706\right)^t$$

In fact, its nullity is 3. Thus, these two vectors together with

ð Þ 1; 1; 1; 1; �1; �1; �1; �1 <sup>0</sup>

form a basis of its nullspace.

<sup>f</sup> <sup>11</sup> ¼ � <sup>r</sup>12r<sup>21</sup> <sup>þ</sup> <sup>q</sup>11r<sup>12</sup> � <sup>q</sup>12r<sup>21</sup> q11r<sup>12</sup>

If we set

Matrix Theory-Applications and Theorems

<sup>f</sup> <sup>21</sup> <sup>þ</sup> �q<sup>12</sup> <sup>þ</sup> <sup>r</sup><sup>12</sup> q11

f <sup>12</sup> ¼ 0, f <sup>21</sup> ¼ 0, f <sup>22</sup> ¼ q11, f <sup>11</sup> ¼ r<sup>12</sup> � q12,

r<sup>12</sup> � q<sup>12</sup> � �v<sup>11</sup>

!

f <sup>22</sup> ¼ 0, f <sup>21</sup> ¼ r12q11, f <sup>12</sup> ¼ �r21q<sup>11</sup> , f <sup>11</sup> ¼ r21q<sup>12</sup> � r<sup>12</sup> r<sup>21</sup> þ q<sup>11</sup>

� � � � <sup>v</sup><sup>11</sup> � <sup>r</sup>21q11v<sup>12</sup>

Now, the vectors v12, v<sup>11</sup> are linearly independent, since they correspond to different magic

ð Þ 1; 1; 1; 1; �1; �1; �1; �1 <sup>0</sup>

is linearly independent with the last two vectors, since its first two entries are not the opposite

 14 �19 13 10 5 �22 15 �12 6 7 7 �20 13 12 3 �9 4 �10 26 �11 �6 �1 �3 �3 16 �2 �8 1 24 �9 �16 25 �17 16 �6 16 �20 18 �22 7 �75 7 3 �12 20 �21 24 �14 10 �12 �33 6 �3 1 11 �1

For this square we can construct as described the following two vectors in its nullspace

!

q11v<sup>12</sup>

which is consistent with the previous relations, we conclude that the vector

belongs to the nullspace of the square. We can make another choice as follows.

r21q<sup>12</sup> � r<sup>12</sup> r<sup>21</sup> þ q<sup>11</sup>

squares. Hence, the last two vectors are linearly independent. Also the vector

and we obtain a vector belonging to the nullspace of the square, which is

�r21q11v<sup>11</sup>

For example, the following square is a compound 8 � 8 magic square.

of the third and fourth entry. ⎕

<sup>f</sup> <sup>22</sup>, f <sup>12</sup> ¼ � <sup>r</sup><sup>21</sup>

r<sup>12</sup> f <sup>21</sup>:

� �

We prove now a similar result to the previous proposition, where we replace the 4 � 4 square with a 6 � 6 one.

Proposition 2: The compound 12 � 12 magic square possess a three-dimensional subspace of its nullspace.

Proof: First we note that the vector

$$(1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1)^{\prime}$$

is a nonzero vector, which belongs to the nullspace of the square, since the squares have the same magic constant.

We look for scalars v1, v2, v3, v4, v5, v<sup>6</sup> such that


We transform this equation into a linear system, in which we eliminate the redundant equations. The system becomes

ð Þ <sup>a</sup><sup>11</sup> � <sup>d</sup><sup>11</sup> <sup>v</sup><sup>1</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>11</sup> � <sup>e</sup><sup>11</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> <sup>c</sup><sup>11</sup> � <sup>f</sup> <sup>11</sup> � �v<sup>3</sup> <sup>þ</sup> ð Þ <sup>a</sup><sup>12</sup> � <sup>d</sup><sup>12</sup> <sup>v</sup><sup>4</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>12</sup> � <sup>e</sup><sup>12</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> <sup>c</sup><sup>12</sup> � <sup>f</sup> <sup>12</sup> � �v<sup>6</sup> <sup>¼</sup> <sup>0</sup> g<sup>11</sup> � j <sup>11</sup> � �v<sup>1</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>11</sup> � <sup>k</sup><sup>11</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>11</sup> � <sup>l</sup><sup>11</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>g</sup><sup>12</sup> � <sup>j</sup> <sup>12</sup> � �v<sup>4</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>12</sup> � <sup>k</sup><sup>12</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>12</sup> � <sup>l</sup><sup>12</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup> <sup>m</sup><sup>11</sup> � <sup>p</sup><sup>11</sup> � �v<sup>1</sup> <sup>þ</sup> <sup>n</sup><sup>11</sup> � <sup>q</sup><sup>11</sup> � �v<sup>2</sup> <sup>þ</sup> ð Þ <sup>o</sup><sup>11</sup> � <sup>r</sup><sup>11</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>m</sup><sup>12</sup> � <sup>p</sup><sup>12</sup> � �v<sup>4</sup> <sup>þ</sup> <sup>n</sup><sup>12</sup> � <sup>q</sup><sup>12</sup> � �v<sup>5</sup> <sup>þ</sup> ð Þ <sup>o</sup><sup>12</sup> � <sup>r</sup><sup>12</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup> ð Þ <sup>a</sup><sup>21</sup> � <sup>d</sup><sup>21</sup> <sup>v</sup><sup>1</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>21</sup> � <sup>e</sup><sup>21</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> <sup>c</sup><sup>21</sup> � <sup>f</sup> <sup>21</sup> � �v<sup>3</sup> <sup>þ</sup> ð Þ <sup>a</sup><sup>22</sup> � <sup>d</sup><sup>22</sup> <sup>v</sup><sup>4</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>22</sup> � <sup>e</sup><sup>22</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> <sup>c</sup><sup>22</sup> � <sup>f</sup> <sup>22</sup> � �v<sup>6</sup> <sup>¼</sup> <sup>0</sup> g<sup>21</sup> � j <sup>21</sup> � �v<sup>1</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>21</sup> � <sup>k</sup><sup>21</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>21</sup> � <sup>l</sup><sup>21</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>g</sup><sup>22</sup> � <sup>j</sup> <sup>22</sup> � �v<sup>4</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>22</sup> � <sup>k</sup><sup>22</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>22</sup> � <sup>l</sup><sup>22</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup> <sup>m</sup><sup>21</sup> � <sup>p</sup><sup>21</sup> � �v<sup>1</sup> <sup>þ</sup> <sup>n</sup><sup>21</sup> � <sup>q</sup><sup>21</sup> � �v<sup>2</sup> <sup>þ</sup> ð Þ <sup>o</sup><sup>21</sup> � <sup>r</sup><sup>21</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>m</sup><sup>22</sup> � <sup>p</sup><sup>22</sup> � �v<sup>4</sup> <sup>þ</sup> <sup>n</sup><sup>22</sup> � <sup>q</sup><sup>22</sup> � �v<sup>5</sup> <sup>þ</sup> ð Þ <sup>o</sup><sup>22</sup> � <sup>r</sup><sup>22</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup>

From the definition of the panmagic square we know that

$$a\_{\vec{\eta}} + g\_{\vec{\eta}} + m\_{\vec{\eta}} = d\_{\vec{\eta}} + j\_{\vec{\eta}} + p\_{\vec{\eta}} \quad \Rightarrow \ \left( a\_{\vec{\eta}} - d\_{\vec{\eta}} \right) + \left( g\_{\vec{\eta}} - j\_{\vec{\eta}} \right) = -\left( m\_{\vec{\eta}} - p\_{\vec{\eta}} \right) \tag{3}$$

We can generalize the previous result for an arbitrary number of squares involved in the

Theorem 1: Let Aij be the distinct pandiagonal magic square with magic constant 2s having the

aij bij cij dij

Nullspace of Compound Magic Squares http://dx.doi.org/10.5772/intechopen.74678 67

eij f ij gij hij

s � cij s � dij s � aij s � bij s � gij s � hij s � eij s � f ij

such that Aij ¼ A1<sup>j</sup> þ Ai<sup>1</sup> � A<sup>11</sup> for i, j ¼ 1, …, n. Assume that ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> 6¼ 0. Then,

A11A<sup>12</sup> A13…A1<sup>n</sup> A21A<sup>22</sup> A23…A2<sup>n</sup> A31A<sup>32</sup> A33…A3<sup>n</sup> ⋮ ⋮ ⋮ ⋮⋮

1

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCA

An1An<sup>2</sup> An3…Ann

�ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

�ð Þ b11-d11-b12 þ d12

ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

�ð Þ b11-d11-b12 þ d12

a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

ð Þ b11-d11-b12 þ d12

½ � 0 ⋮

½ � 0

�ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

possesses a 2n � 3 dimensional subspace of its nullspace, which is generated by the vectors

b11-d11-b12 þ d12

Aij ¼

0

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@

compound square.

the following 4n� 4n matrix

structure:

and

$$b\_{i\vec{\eta}} + h\_{i\vec{\eta}} + n\_{i\vec{\eta}} = \varepsilon\_{i\vec{\eta}} + k\_{i\vec{\eta}} + q\_{i\vec{\eta}} \quad \Rightarrow \left(b\_{i\vec{\eta}} - \varepsilon\_{i\vec{\eta}}\right) + \left(h\_{i\vec{\eta}} - \varepsilon\_{i\vec{\eta}}\right) = -\left(n\_{i\vec{\eta}} - q\_{i\vec{\eta}}\right) \tag{4}$$

$$c\_{i\bar{\eta}} + l\_{i\bar{\eta}} + o\_{i\bar{\eta}} = f\_{i\bar{\eta}} + l\_{i\bar{\eta}} + r\_{i\bar{\eta}} \quad \Rightarrow \ \left(c\_{i\bar{\eta}} - f\_{i\bar{\eta}}\right) + \left(l\_{i\bar{\eta}} - l\_{i\bar{\eta}}\right) = -\left(o\_{i\bar{\eta}} - r\_{i\bar{\eta}}\right) \tag{5}$$

Thus, due to Eqs. (3)–(5), we can reduce the linear system to the following

$$\begin{aligned} (a\_{11} - d\_{11})v\_1 + (b\_{11} - e\_{11})v\_2 + \left(c\_{11} - f\_{11}\right)v\_3 + (a\_{12} - d\_{12})v\_4 + (b\_{12} - e\_{12})v\_5 + \left(c\_{12} - f\_{12}\right)v\_6 &= 0 \\ (g\_{11} - j\_{11})v\_1 + (h\_{11} - k\_{11})v\_2 + (i\_{11} - l\_{11})v\_3 + \left(g\_{12} - j\_{12}\right)v\_4 + (h\_{12} - k\_{12})v\_5 + (i\_{12} - l\_{12})v\_6 &= 0 \\ (a\_{21} - d\_{21})v\_1 + (b\_{21} - e\_{21})v\_2 + \left(c\_{21} - f\_{21}\right)v\_3 + (a\_{22} - d\_{22})v\_4 + (b\_{22} - e\_{22})v\_5 + \left(c\_{22} - f\_{22}\right)v\_6 &= 0 \\ (g\_{21} - j\_{21})v\_1 + (h\_{21} - k\_{21})v\_2 + (i\_{21} - l\_{21})v\_3 + \left(g\_{22} - j\_{22}\right)v\_4 + (h\_{22} - k\_{22})v\_5 + (i\_{22} - l\_{22})v\_6 &= 0 \end{aligned}$$

We can verify using the computer that the coefficient matrix of this system has in general the rank four. Hence, we deduce that v1, v2, v3, v<sup>4</sup> depends on v<sup>5</sup> and v6. By letting v<sup>5</sup> and v<sup>6</sup> take the values 0 and 1 we obtain two linearly independent vectors in the nullspace. These two vectors do not possess the property that the first six elements are the opposite of the last six elements. Hence, they are independent of the vector 1ð Þ ; 1; 1; 1; 1; 1 � 1; �1; �1; �1; �1; �1 <sup>0</sup> .⎕

Remark: We did not here make use of the relation B<sup>22</sup> þ B<sup>11</sup> ¼ B<sup>12</sup> þ B21. It actually does not affect the proof.


For example, the following square is a compound 12 � 12 magic square.

Using the computer we can verify that its nullity is 3. In other words, the constructed subspace is the nullspace itself.

We can generalize the previous result for an arbitrary number of squares involved in the compound square.

Theorem 1: Let Aij be the distinct pandiagonal magic square with magic constant 2s having the structure:

$$A\_{ij} = \begin{bmatrix} a\_{ij} & b\_{ij} & c\_{ij} & d\_{ij} \\ \mathbf{c}\_{ij} & f\_{ij} & g\_{ij} & h\_{ij} \\ \mathbf{s} - \mathbf{c}\_{ij} & \mathbf{s} - d\_{ij} & \mathbf{s} - a\_{ij} & \mathbf{s} - b\_{ij} \\ \mathbf{s} - g\_{ij} & \mathbf{s} - h\_{ij} & \mathbf{s} - \mathbf{c}\_{ij} & \mathbf{s} - f\_{ij} \end{bmatrix}.$$

such that Aij ¼ A1<sup>j</sup> þ Ai<sup>1</sup> � A<sup>11</sup> for i, j ¼ 1, …, n. Assume that ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> 6¼ 0. Then, the following 4n� 4n matrix

$$\begin{bmatrix} A\_{11}A\_{12} & A\_{13}...A\_{1n} \\\\ A\_{21}A\_{22} & A\_{23}...A\_{2n} \\\\ A\_{31}A\_{32} & A\_{33}...A\_{3n} \\\\ \vdots & \vdots & \vdots & \vdots \\\\ A\_{n1}A\_{n2} & A\_{n3}...A\_{nn} \end{bmatrix}$$

possesses a 2n � 3 dimensional subspace of its nullspace, which is generated by the vectors

$$\begin{pmatrix} \mathbf{b\_{11}} \mathbf{-d\_{11}} \mathbf{-b\_{12}} + \mathbf{d\_{12}} \\\\ -(a\_{11} + c\_{12} - c\_{11} - a\_{12}) \\\\ -(\mathbf{b\_{11}} \mathbf{-d\_{11}} \mathbf{-b\_{12}} + \mathbf{d\_{12}}) \\\\ (a\_{11} + c\_{12} - c\_{11} - a\_{12}) \\\\ -(\mathbf{b\_{11}} \mathbf{-d\_{11}} \mathbf{-b\_{12}} + \mathbf{d\_{12}}) \\\\ a\_{11} + c\_{12} - c\_{11} - a\_{12} \\\\ (\mathbf{b\_{11}} \mathbf{-d\_{11}} \mathbf{-b\_{12}} + \mathbf{d\_{12}}) \\\\ -(a\_{11} + c\_{12} - c\_{11} - a\_{12}) \\\\ [0] \\\\ \vdots \\ [0] \end{pmatrix}$$

and

From the definition of the panmagic square we know that

bij þ hij þ nij ¼ eij þ kij þ qij ) bij � eij

cij þ lij þ oij ¼ f ij þ lij þ rij ) cij � f ij

Thus, due to Eqs. (3)–(5), we can reduce the linear system to the following

For example, the following square is a compound 12 � 12 magic square.

ij þ pij ) aij � dij

<sup>þ</sup> gij � <sup>j</sup>

<sup>þ</sup> hij � eij

ij 

þ iij � lij

<sup>v</sup><sup>3</sup> <sup>þ</sup> ð Þ <sup>a</sup><sup>12</sup> � <sup>d</sup><sup>12</sup> <sup>v</sup><sup>4</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>12</sup> � <sup>e</sup><sup>12</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> <sup>c</sup><sup>12</sup> � <sup>f</sup> <sup>12</sup>

<sup>v</sup><sup>3</sup> <sup>þ</sup> ð Þ <sup>a</sup><sup>22</sup> � <sup>d</sup><sup>22</sup> <sup>v</sup><sup>4</sup> <sup>þ</sup> ð Þ <sup>b</sup><sup>22</sup> � <sup>e</sup><sup>22</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> <sup>c</sup><sup>22</sup> � <sup>f</sup> <sup>22</sup>

12

22

We can verify using the computer that the coefficient matrix of this system has in general the rank four. Hence, we deduce that v1, v2, v3, v<sup>4</sup> depends on v<sup>5</sup> and v6. By letting v<sup>5</sup> and v<sup>6</sup> take the values 0 and 1 we obtain two linearly independent vectors in the nullspace. These two vectors do not possess the property that the first six elements are the opposite of the last six elements. Hence, they are independent of the vector 1ð Þ ; 1; 1; 1; 1; 1 � 1; �1; �1; �1; �1; �1 <sup>0</sup>

Remark: We did not here make use of the relation B<sup>22</sup> þ B<sup>11</sup> ¼ B<sup>12</sup> þ B21. It actually does not

�51 39 26 0 9 13 6 17 15 �60 4 54 �10 �2 �5 4 �5 20 5 2 0 9 0 �5 1 2 3 17 18 �24 6 7 8 19 20 12 3 �1 63 �27 �14 18 12 8 6 �5 �3 17 8 17 �42 22 14 12 3 12 �8 7 10 9 �5 �6 17 11 10 4 �7 �8 36 6 5 2 53 45 �131 33 34 59 31 34 �137 24 25 �10 0 10 11 12 13 �44 15 14 16 17 18 �89 21 22 23 29 30 �108 26 27 28 31 32 143 �21 �22 10 �41 �33 149 �12 �13 �47 �19 �22 1 0 �1 22 12 2 �4 �5 �6 56 �3 �2 �11 �17 �18 101 �9 �10 �16 �19 �20 120 �14 �15

Using the computer we can verify that its nullity is 3. In other words, the constructed subspace

¼ � nij � qij

¼ � oij � rij

<sup>v</sup><sup>4</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>12</sup> � <sup>k</sup><sup>12</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>12</sup> � <sup>l</sup><sup>12</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup>

<sup>v</sup><sup>4</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>22</sup> � <sup>k</sup><sup>22</sup> <sup>v</sup><sup>5</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>22</sup> � <sup>l</sup><sup>22</sup> <sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup>

¼ � mij � pij 

(5)

<sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup>

<sup>v</sup><sup>6</sup> <sup>¼</sup> <sup>0</sup>

(3)

(4)

.⎕

aij þ gij þ mij ¼ dij þ j

66 Matrix Theory-Applications and Theorems

ð Þ a<sup>11</sup> � d<sup>11</sup> v<sup>1</sup> þ ð Þ b<sup>11</sup> � e<sup>11</sup> v<sup>2</sup> þ c<sup>11</sup> � f <sup>11</sup>

ð Þ a<sup>21</sup> � d<sup>21</sup> v<sup>1</sup> þ ð Þ b<sup>21</sup> � e<sup>21</sup> v<sup>2</sup> þ c<sup>21</sup> � f <sup>21</sup>

<sup>v</sup><sup>1</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>11</sup> � <sup>k</sup><sup>11</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>11</sup> � <sup>l</sup><sup>11</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>g</sup><sup>12</sup> � <sup>j</sup>

<sup>v</sup><sup>1</sup> <sup>þ</sup> ð Þ <sup>h</sup><sup>21</sup> � <sup>k</sup><sup>21</sup> <sup>v</sup><sup>2</sup> <sup>þ</sup> ð Þ <sup>i</sup><sup>21</sup> � <sup>l</sup><sup>21</sup> <sup>v</sup><sup>3</sup> <sup>þ</sup> <sup>g</sup><sup>22</sup> � <sup>j</sup>

g<sup>11</sup> � j 11

g<sup>21</sup> � j 21

affect the proof.

is the nullspace itself.


$$\begin{aligned} & \left( (a\_{11} - c\_{11})(b\_{11} - d\_{11} - b\_{12} + d\_{12}) + (b\_{11} - d\_{11})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) - (a\_{12} - c\_{12})(b\_{11} - d\_{11} - b\_{12} + d\_{12}) - (b\_{12} - d\_{12})(b\_{11} - d\_{11}) \right) \\ & \left( (b\_{12} - d\_{12})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) \right) \\ & = \left( b\_{11} - d\_{11} - b\_{12} + d\_{12} \right) \left[ (a\_{11} - c\_{11}) - (a\_{12} - c\_{12}) \right] - \left\{ (a\_{11} - c\_{11} - a\_{12} + c\_{12}) \left[ (b\_{11} - d\_{11}) - (b\_{12} - d\_{12}) \right] \right\} = 0 \end{aligned}$$

$$(a\_{11} - c\_{11}) = -(e\_{11} - \mathfrak{g}\_{11}), \\ (b\_{11} - d\_{11}) = -(f\_{11} - h\_{11}).$$

$$\begin{aligned} &(a\_{21} - c\_{21})(b\_{11} - d\_{11} - b\_{12} + d\_{12}) + (b\_{21} - d\_{21})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) - \\ &(a\_{22} - c\_{22})(b\_{11} - d\_{11} - b\_{12} + d\_{12}) - (b\_{22} - d\_{22})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) = \\ &(b\_{11} - d\_{11} - b\_{12} + d\_{12})[(a\_{21} - c\_{21}) - (a\_{22} - c\_{22})] - \{(a\_{11} - c\_{11} - a\_{12} + c\_{12})[(b\_{21} - d\_{21}) - (b\_{22} - d\_{22})] \} \end{aligned}$$

$$\begin{aligned} a\_{22} &= a\_{12} + a\_{21} - a\_{11}, \\ c\_{22} &= c\_{12} + c\_{21} - c\_{11}, \\ c\_{22} &= c\_{12} + c\_{21} - c\_{11}, \end{aligned} \\ \begin{aligned} d\_{11} &= d\_{12} + d\_{21} - d\_{11}. \end{aligned}$$

$$\begin{aligned} & [(b\_{11} - d\_{11} - b\_{12} + d\_{12})] [(a\_{21} - c\_{21}) - (a\_{12} + a\_{21} - a\_{11} - c\_{12} - c\_{21} + c\_{11})] \\ & - \{ (a\_{11} - c\_{11} - a\_{12} + c\_{12}) [(b\_{21} - d\_{21}) - (b\_{12} + b\_{21} - b\_{11} - d\_{12} - d\_{21} + d\_{11})] \} \\ & = (b\_{11} - d\_{11} - b\_{12} + d\_{12}) [-(a\_{12} - a\_{11} - c\_{12} + c\_{11})] - (a\_{11} - c\_{11} - a\_{12} + c\_{12}) [-(b\_{12} - b\_{11} - d\_{12} + d\_{11})] = 0 \end{aligned}$$

$$\begin{aligned} &(a\_{n1} - c\_{n1})(b\_{11} - d\_{11} - b\_{12} + d\_{12}) + (b\_{n1} - d\_{n1})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) - \\ &(a\_{n2} - c\_{n2})(b\_{11} - d\_{11} - b\_{12} + d\_{12}) - (b\_{n2} - d\_{n2})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) = \\ &(b\_{11} - d\_{11} - b\_{12} + d\_{12})[(a\_{n1} - c\_{n1}) - (a\_{n2} - c\_{n2})] - (a\_{11} - c\_{11} - a\_{12} + c\_{12})[(b\_{n1} - d\_{n1}) - (b\_{n2} - d\_{n2})] \end{aligned}$$

$$\begin{aligned} a\_{n2} &= a\_{12} + a\_{n1} - a\_{11}, \\ c\_{n2} &= c\_{12} + c\_{n1} - c\_{11}, \\ d\_{n2} &= c\_{12} + c\_{n1} - c\_{11}, \end{aligned} \\ \begin{aligned} d\_{n1} &= d\_{n1} + d\_{n1} - d\_{n1} \end{aligned}$$

$$\begin{aligned} & \left[ (b\_{11} - d\_{11} - b\_{12} + d\_{12}) [ (a\_{n1} - c\_{n1}) - (a\_{12} + a\_{n1} - a\_{11} - c\_{12} - c\_{n1} + c\_{11}) ] \right] \\ & - \left\{ (a\_{11} - c\_{11} - a\_{12} + c\_{12}) [ (b\_{n1} - d\_{n1}) - (b\_{12} + b\_{n1} - b\_{11} - d\_{12} - d\_{n1} + d\_{11}) ] \right\} \\ & = (b\_{11} - d\_{11} - b\_{12} + d\_{12}) [ - (a\_{12} - a\_{11} - c\_{12} + c\_{11}) ] - (a\_{11} - c\_{11} - a\_{12} + c\_{12}) [ - (b\_{12} - b\_{11} - d\_{12} + d\_{11}) ] = 0 \end{aligned}$$

$$\begin{aligned} &(a\_{11}-c\_{11})(a\_{12}-c\_{12}-a\_{13}+c\_{13})-(a\_{12}-c\_{12})(a\_{11}-c\_{11}-a\_{13}+c\_{13})+(a\_{13}-c\_{11})(a\_{11}-c\_{11}-a\_{12}+c\_{12}) \\ &(a\_{11}-c\_{11})[(a\_{12}-c\_{12})-(a\_{13}-c\_{13})]-(a\_{12}-c\_{12})[(a\_{11}-c\_{11})-(a\_{13}-c\_{13})]+(a\_{13}-c\_{13})[(a\_{11}-c\_{11})-(a\_{12}-c\_{12})] \\ &-(a\_{11}-c\_{11})(a\_{12}-c\_{12})-(a\_{11}-c\_{11})(a\_{13}-c\_{13})-(a\_{12}-c\_{12})(a\_{11}-c\_{11})+(a\_{12}-c\_{12})(a\_{13}-c\_{13})+(a\_{13}-c\_{13})(a\_{11}-c\_{11}) \\ &-(a\_{11}-c\_{11})(a\_{12}-c\_{12})=0 \end{aligned}$$

$$\begin{aligned} (a\_{11} - c\_{11}) &= -(e\_{11} - g\_{11}) \\ (b\_{11} - d\_{11}) &= -(f\_{11} - h\_{11}) \end{aligned}$$

$$(a\_{21} - c\_{21})(a\_{12} - c\_{12} - a\_{13} + c\_{13}) - (a\_{22} - c\_{22})(a\_{11} - c\_{11} - a\_{13} + c\_{13}) + (a\_{23} - c\_{23})(a\_{11} - c\_{11} - a\_{12} + c\_{12})$$

$$a\_{22} = a\_{12} + a\_{21} - a\_{11}, \\ c\_{22} = c\_{12} + c\_{21} - c\_{11}$$

$$a\_{23} = a\_{13} + a\_{21} - a\_{11}, \\ c\_{23} = c\_{13} + c\_{21} - c\_{11}$$

$$\begin{aligned} &= (a\_{21} - c\_{21})[(a\_{12} - c\_{12}) - (a\_{13} - c\_{13})] - (a\_{12} + a\_{21} - a\_{11} - c\_{12} - c\_{21} + c\_{11})[(a\_{11} - c\_{11}) - (a\_{13} - c\_{13})] \\ &+ (a\_{13} + a\_{21} - a\_{11} - c\_{13} - c\_{21} + c\_{11})[(a\_{11} - c\_{11}) - (a\_{12} - c\_{12})] \\ &= (a\_{21} - c\_{21})(a\_{12} - c\_{12}) - (a\_{21} - c\_{21})(a\_{13} - c\_{13}) - (a\_{21} - c\_{21})(a\_{11} - c\_{11}) + (a\_{21} - c\_{21})(a\_{13} - c\_{13}) \\ &- (a\_{12} - c\_{12})(a\_{11} - c\_{11}) + (a\_{12} - c\_{12})(a\_{13} - c\_{13}) + (a\_{11} - c\_{11})^2 + (a\_{11} - c\_{11})(a\_{13} - c\_{13}) + (a\_{13} - c\_{13})(a\_{11} - c\_{11}) \\ &- (a\_{13} - c\_{13})(a\_{12} - c\_{12}) + (a\_{21} - c\_{21})(a\_{11} - c\_{11}) - (a\_{21} - c\_{21})(a\_{12} - c\_{12}) - (a\_{11} - c\_{11})^2 + (a\_{12} - c\_{12})(a\_{11} - c\_{11}) = 0 \end{aligned}$$

We continue checking the entries until we reach the last entry, which is

$$(a\_{n1} - c\_{n1})(a\_{12} - c\_{12} - a\_{13} + c\_{13}) - (a\_{n2} - c\_{n2})(a\_{11} - c\_{11} - a\_{13} + c\_{13}) + (a\_{n3} - c\_{n3})(a\_{11} - c\_{11} - a\_{12} + c\_{12})$$

When we reach the (2n � 3)th entry, we find that it is

We use the relations

to prove that this entry is

b<sup>11</sup> � d<sup>11</sup> � b<sup>12</sup> þ d<sup>12</sup> �ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �ð Þ b<sup>11</sup> � d<sup>11</sup> � b<sup>12</sup> þ d<sup>12</sup> ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �ð Þ b<sup>11</sup> � d<sup>11</sup> � b<sup>12</sup> þ d<sup>12</sup> a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> ð Þ b<sup>11</sup> � d<sup>11</sup> � b<sup>12</sup> þ d<sup>12</sup> �ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

that

0

k1

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@

ð Þ an<sup>1</sup> � cn<sup>1</sup> ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ þ ð Þ bn<sup>1</sup> � dn<sup>1</sup> ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ� ð Þ ann � cnn ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ � ð Þ bnn � dnn ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ ¼

> ann ¼ a1<sup>n</sup> þ an<sup>1</sup> � a<sup>11</sup> bnn ¼ b1<sup>n</sup> þ bn<sup>1</sup> � b<sup>11</sup> cnn ¼ c1<sup>n</sup> þ cn<sup>1</sup> � c<sup>11</sup> dnn ¼ d1<sup>n</sup> þ dn<sup>1</sup> � d<sup>11</sup>

¼ ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ �½ ð Þ a<sup>12</sup> � a<sup>11</sup> � c<sup>12</sup> þ c<sup>11</sup> � � ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ �½ ð Þ b1<sup>n</sup> � b<sup>11</sup> � d1<sup>n</sup> þ d<sup>11</sup> � ¼ 0

We prove now that the vectors are linearly independent. Let k1, k2, k3, …, k2n�<sup>4</sup>, k2n�<sup>3</sup> ∈R such

1

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCA

þ … þ k2n�<sup>3</sup>

0

0

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@

0

b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> �ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup>

Nullspace of Compound Magic Squares http://dx.doi.org/10.5772/intechopen.74678 71

1

1

0

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCA ¼ BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCA

b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup>

a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

�ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

a<sup>12</sup> þ c<sup>13</sup> � c<sup>12</sup> � a<sup>13</sup>

�ð Þ a<sup>12</sup> þ c<sup>13</sup> � c<sup>12</sup> � a<sup>13</sup>

�ð Þ a<sup>11</sup> � c<sup>11</sup> þ c<sup>13</sup> � a<sup>13</sup>

a<sup>11</sup> � c<sup>11</sup> þ c<sup>13</sup> � a<sup>13</sup>

a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

�ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup>

ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> ½ð Þ� an<sup>1</sup> � cn<sup>1</sup> ð Þ ann � cnn �� f g ð Þ a<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c<sup>12</sup> ½ � ð Þ� bn<sup>1</sup> � dn<sup>1</sup> ð Þ bnn � dnn

ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> ½ � ð Þ� an<sup>1</sup> � cn<sup>1</sup> ð Þ a<sup>12</sup> þ an<sup>1</sup> � a<sup>11</sup> � c<sup>12</sup> � cn<sup>1</sup> þ c<sup>11</sup> �f g ð Þ a<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c<sup>12</sup> ½ � ð Þ� bn<sup>1</sup> � dn<sup>1</sup> ð Þ b1<sup>n</sup> þ bn<sup>1</sup> � b<sup>11</sup> � d1<sup>n</sup> � dn<sup>1</sup> þ d<sup>11</sup>

0

0

0

0

0

0

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@

This leads us to the following vector which is a zero vector.

1

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCA þ k<sup>2</sup>

Using the relations

$$a\_{n2} = a\_{12} + a\_{n1} - a\_{11}, \\ c\_{n2} = c\_{12} + c\_{n1} - c\_{11}$$

$$a\_{n3} = a\_{13} + a\_{n1} - a\_{11}, \\ c\_{n3} = c\_{13} + c\_{n1} - c\_{11}$$

we get

$$\begin{aligned} &= (a\_{n1} - c\_{n1})[(a\_{12} - c\_{12}) - (a\_{13} - c\_{13})] - (a\_{12} + a\_{n1} - a\_{11} - c\_{12} - c\_{n1} + c\_{11})[(a\_{11} - c\_{11}) - (a\_{13} - c\_{13})] \\ &+ (a\_{13} + a\_{n1} - a\_{11} - c\_{n1} - c\_{n1} + c\_{11})[(a\_{11} - c\_{11}) - (a\_{12} - c\_{12})] \\ &= (a\_{n1} - c\_{n1})(a\_{12} - c\_{12}) - (a\_{n1} - c\_{n1})(a\_{13} - c\_{13}) - (a\_{n1} - c\_{n1})(a\_{11} - c\_{11}) + (a\_{n1} - c\_{n1})(a\_{13} - c\_{13}) \\ &- (a\_{12} - c\_{12})(a\_{11} - c\_{11}) + (a\_{12} - c\_{12})(a\_{13} - c\_{13}) + (a\_{11} - c\_{11})^2 + (a\_{11} - c\_{11})(a\_{13} - c\_{13}) + \\ &(a\_{13} - c\_{13})(a\_{11} - c\_{11}) - (a\_{13} - c\_{13})(a\_{12} - c\_{12}) + (a\_{n1} - c\_{n1})(a\_{11} - c\_{11}) - (a\_{n1} - c\_{n1})(a\_{12} - c\_{12}) - (a\_{n1} - c\_{n1})(a\_{11} - c\_{11}) \\ &- (a\_{11} - c\_{11})^2 + (a\_{12} - c\_{12})(a\_{11} - c\_{11}) = 0 \end{aligned}$$

Hence, the second vector belongs to the nullspace of the (4n � 4n)-matrix.

Similarly, we can check that all the other vectors are included in the nullspace of the (4n � 4n) matrix. We check the last vector (the (2n � 3)-th vector) belongs to the nullspace of the (4n � 4n) matrix. The first entry by matrix multiplication is:

$$\begin{aligned} (a\_{11} - c\_{11})(b\_{11} - d\_{11} - b\_{1n} + d\_{1n}) + (b\_{11} - d\_{11})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) - \\ (a\_{12} - c\_{12})(b\_{11} - d\_{11} - b\_{1n} + d\_{1n}) - (b\_{1n} - d\_{1n})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) &= \\ (b\_{11} - d\_{11} - b\_{1n} + d\_{1n})[(a\_{11} - c\_{11}) - (a\_{12} - c\_{12})] - (a\_{11} - c\_{11} - a\_{12} + c\_{12})[(b\_{11} - d\_{11}) - (b\_{1n} - d\_{1n})] &= 0 \end{aligned}$$

As before we deduce also that the second, third, and fourth entries are zero. The fifth entry is

ð Þ a<sup>21</sup> � c<sup>21</sup> ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ þ ð Þ b<sup>21</sup> � d<sup>21</sup> ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ� ð Þ a<sup>22</sup> � c<sup>22</sup> ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ � ð Þ b2<sup>n</sup> � d2<sup>n</sup> ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ ¼ ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> ½ð Þ� a<sup>21</sup> � c<sup>21</sup> ð Þ a<sup>22</sup> � c<sup>22</sup> � � ð Þ a<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c<sup>12</sup> ½ð Þ� b<sup>21</sup> � d<sup>21</sup> ð Þ b2<sup>n</sup> � d2<sup>n</sup> � ¼ ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> ½ � ð Þ� a<sup>21</sup> � c<sup>21</sup> ð Þ a<sup>12</sup> þ a<sup>21</sup> � a<sup>11</sup> � c<sup>12</sup> � c<sup>21</sup> þ c<sup>11</sup>

We use the relations

$$\begin{aligned} a\_{22} &= a\_{12} + a\_{21} - a\_{11} \\ b\_{2n} &= b\_{1n} + b\_{21} - b\_{11} \\ c\_{22} &= c\_{12} + c\_{21} - c\_{11} \\ d\_{2n} &= d\_{1n} + d\_{21} - d\_{11} \end{aligned}$$

### Therefore, this entry is

$$\begin{aligned} & (b\_{11} - d\_{11} - b\_{1n} + d\_{1n})[(a\_{21} - c\_{21}) - (a\_{12} + a\_{21} - a\_{11} - c\_{12} - c\_{21} + c\_{11})] \\ & - \{ (a\_{11} - c\_{11} - a\_{12} + c\_{12})[(b\_{21} - d\_{21}) - (b\_{1n} + b\_{21} - b\_{11} - d\_{1n} - d\_{21} + d\_{11})] \} \\ & = (b\_{11} - d\_{11} - b\_{1n} + d\_{1n})[-(a\_{12} - a\_{11} - c\_{12} + c\_{11})] - \{ (a\_{11} - c\_{11} - a\_{12} + c\_{12})[-(b\_{1n} - b\_{11} - d\_{1n} + d\_{11})] \} = 0 \end{aligned}$$

When we reach the (2n � 3)th entry, we find that it is

$$\begin{aligned} &(a\_{n1} - c\_{n1})(b\_{11} - d\_{11} - b\_{1n} + d\_{1n}) + (b\_{n1} - d\_{n1})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) - \\ &(a\_{nn} - c\_{nn})(b\_{11} - d\_{11} - b\_{1n} + d\_{1n}) - (b\_{nn} - d\_{nn})(a\_{11} - c\_{11} - a\_{12} + c\_{12}) = \\ &(b\_{11} - d\_{11} - b\_{1n} + d\_{1n})[(a\_{n1} - c\_{n1}) - (a\_{nn} - c\_{nn})] - \\ &\{(a\_{11} - c\_{11} - a\_{12} + c\_{12})[(b\_{n1} - d\_{n1}) - (b\_{nn} - d\_{nn})] \} \end{aligned}$$

We use the relations

We continue checking the entries until we reach the last entry, which is

þð Þ a<sup>13</sup> þ an<sup>1</sup> � a<sup>11</sup> � c<sup>13</sup> � cn<sup>1</sup> þ c<sup>11</sup> ½ � ð Þ� a<sup>11</sup> � c<sup>11</sup> ð Þ a<sup>12</sup> � c<sup>12</sup>

�ð Þ a<sup>12</sup> � c<sup>12</sup> ð Þþ a<sup>11</sup> � c<sup>11</sup> ð Þ a<sup>12</sup> � c<sup>12</sup> ð Þþ a<sup>13</sup> � c<sup>13</sup> ð Þ a<sup>11</sup> � c<sup>11</sup>

<sup>2</sup> <sup>þ</sup> ð Þ <sup>a</sup><sup>12</sup> � <sup>c</sup><sup>12</sup> ð Þ¼ <sup>a</sup><sup>11</sup> � <sup>c</sup><sup>11</sup> <sup>0</sup>

matrix. The first entry by matrix multiplication is:

ð Þ a<sup>21</sup> � c<sup>21</sup> ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ þ ð Þ b<sup>21</sup> � d<sup>21</sup> ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ� ð Þ a<sup>22</sup> � c<sup>22</sup> ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ � ð Þ b2<sup>n</sup> � d2<sup>n</sup> ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ ¼

ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> ½ � ð Þ� a<sup>21</sup> � c<sup>21</sup> ð Þ a<sup>12</sup> þ a<sup>21</sup> � a<sup>11</sup> � c<sup>12</sup> � c<sup>21</sup> þ c<sup>11</sup> �f g ð Þ a<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c<sup>12</sup> ½ � ð Þ� b<sup>21</sup> � d<sup>21</sup> ð Þ b1<sup>n</sup> þ b<sup>21</sup> � b<sup>11</sup> � d1<sup>n</sup> � d<sup>21</sup> þ d<sup>11</sup>

½ � ð Þ� a<sup>21</sup> � c<sup>21</sup> ð Þ a<sup>12</sup> þ a<sup>21</sup> � a<sup>11</sup> � c<sup>12</sup> � c<sup>21</sup> þ c<sup>11</sup>

We use the relations

Therefore, this entry is

Using the relations

70 Matrix Theory-Applications and Theorems

we get

ð Þ a<sup>11</sup> � c<sup>11</sup>

ð Þ an<sup>1</sup> � cn<sup>1</sup> ða<sup>12</sup> � c<sup>12</sup> � a<sup>13</sup> þ c13Þ � ð Þ an<sup>2</sup> � cn<sup>2</sup> ða<sup>11</sup> � c<sup>11</sup> � a<sup>13</sup> þ c13Þ þ ð Þ an<sup>3</sup> � cn<sup>3</sup> ð Þ a<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c<sup>12</sup>

an<sup>2</sup> ¼ a<sup>12</sup> þ an<sup>1</sup> � a11, cn<sup>2</sup> ¼ c<sup>12</sup> þ cn<sup>1</sup> � c<sup>11</sup> an<sup>3</sup> ¼ a<sup>13</sup> þ an<sup>1</sup> � a11, cn<sup>3</sup> ¼ c<sup>13</sup> þ cn<sup>1</sup> � c<sup>11</sup>

¼ ð Þ an<sup>1</sup> � cn<sup>1</sup> ½ð Þ� a<sup>12</sup> � c<sup>12</sup> ð Þ a<sup>13</sup> � c<sup>13</sup> � � ð Þ a<sup>12</sup> þ an<sup>1</sup> � a<sup>11</sup> � c<sup>12</sup> � cn<sup>1</sup> þ c<sup>11</sup> ½ � ð Þ� a<sup>11</sup> � c<sup>11</sup> ð Þ a<sup>13</sup> � c<sup>13</sup>

<sup>2</sup> <sup>þ</sup> ð Þ <sup>a</sup><sup>11</sup> � <sup>c</sup><sup>11</sup> ð Þþ <sup>a</sup><sup>13</sup> � <sup>c</sup><sup>13</sup>

¼ ð Þ an<sup>1</sup> � cn<sup>1</sup> ð Þ� a<sup>12</sup> � c<sup>12</sup> ð Þ an<sup>1</sup> � cn<sup>1</sup> ð Þ� a<sup>13</sup> � c<sup>13</sup> ð Þ an<sup>1</sup> � cn<sup>1</sup> ð Þþ a<sup>11</sup> � c<sup>11</sup> ð Þ an<sup>1</sup> � cn<sup>1</sup> ð Þ a<sup>13</sup> � c<sup>13</sup>

ð Þ a<sup>13</sup> � c<sup>13</sup> ð Þ� a<sup>11</sup> � c<sup>11</sup> ð Þ a<sup>13</sup> � c<sup>13</sup> ð Þþ a<sup>12</sup> � c<sup>12</sup> ð Þ an<sup>1</sup> � cn<sup>1</sup> ð Þ� a<sup>11</sup> � c<sup>11</sup> ð Þ an<sup>1</sup> � cn<sup>1</sup> ð Þ� a<sup>12</sup> � c<sup>12</sup>

Similarly, we can check that all the other vectors are included in the nullspace of the (4n � 4n) matrix. We check the last vector (the (2n � 3)-th vector) belongs to the nullspace of the (4n � 4n)-

ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> ½ð Þ� a<sup>11</sup> � c<sup>11</sup> ð Þ a<sup>12</sup> � c<sup>12</sup> � � ð Þ a<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c<sup>12</sup> ½ð Þ� b<sup>11</sup> � d<sup>11</sup> ð Þ b1<sup>n</sup> � d1<sup>n</sup> � ¼ 0

As before we deduce also that the second, third, and fourth entries are zero. The fifth entry is

ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> ½ð Þ� a<sup>21</sup> � c<sup>21</sup> ð Þ a<sup>22</sup> � c<sup>22</sup> � � ð Þ a<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c<sup>12</sup> ½ð Þ� b<sup>21</sup> � d<sup>21</sup> ð Þ b2<sup>n</sup> � d2<sup>n</sup> � ¼ ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup>

a<sup>22</sup> ¼ a<sup>12</sup> þ a<sup>21</sup> � a<sup>11</sup> b2<sup>n</sup> ¼ b1<sup>n</sup> þ b<sup>21</sup> � b<sup>11</sup> c<sup>22</sup> ¼ c<sup>12</sup> þ c<sup>21</sup> � c<sup>11</sup> d2<sup>n</sup> ¼ d1<sup>n</sup> þ d<sup>21</sup> � d<sup>11</sup>

¼ ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ �½ ð Þ a<sup>12</sup> � a<sup>11</sup> � c<sup>12</sup> þ c<sup>11</sup> ��fða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ �½ ð Þ b1<sup>n</sup> � b<sup>11</sup> � d1<sup>n</sup> þ d<sup>11</sup> �g ¼ 0

Hence, the second vector belongs to the nullspace of the (4n � 4n)-matrix.

ð Þ a<sup>11</sup> � c<sup>11</sup> ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ þ ð Þ b<sup>11</sup> � d<sup>11</sup> ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ� ð Þ a<sup>12</sup> � c<sup>12</sup> ðb<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1nÞ � ð Þ b1<sup>n</sup> � d1<sup>n</sup> ða<sup>11</sup> � c<sup>11</sup> � a<sup>12</sup> þ c12Þ ¼

$$\begin{aligned} a\_{\mathfrak{m}} &= a\_{1\mathfrak{n}} + a\_{\mathfrak{n}1} - a\_{11} \\ b\_{\mathfrak{m}} &= b\_{1\mathfrak{n}} + b\_{\mathfrak{n}1} - b\_{11} \\ c\_{\mathfrak{m}} &= c\_{1\mathfrak{n}} + c\_{\mathfrak{n}1} - c\_{11} \\ d\_{\mathfrak{m}} &= d\_{1\mathfrak{n}} + d\_{\mathfrak{n}1} - d\_{11} \end{aligned}$$

to prove that this entry is

$$\begin{aligned} & (b\_{11} - d\_{11} - b\_{1n} + d\_{1n})[(a\_{n1} - c\_{n1}) - (a\_{12} + a\_{n1} - a\_{11} - c\_{12} - c\_{n1} + c\_{11})] \\ & - \{ (a\_{11} - c\_{11} - a\_{12} + c\_{12})[(b\_{n1} - d\_{n1}) - (b\_{1n} + b\_{n1} - b\_{11} - d\_{1n} - d\_{n1} + d\_{11})] \} \\ & = (b\_{11} - d\_{11} - b\_{1n} + d\_{1n})[-(a\_{12} - a\_{11} - c\_{12} + c\_{11})] - (a\_{11} - c\_{11} - a\_{12} + c\_{12})[-(b\_{1n} - b\_{11} - d\_{1n} + d\_{11})] = 0 \end{aligned}$$

We prove now that the vectors are linearly independent. Let k1, k2, k3, …, k2n�<sup>4</sup>, k2n�<sup>3</sup> ∈R such that


This leads us to the following vector which is a zero vector.

k1ðb<sup>11</sup> � d<sup>11</sup> � b<sup>12</sup> þ d12Þ þ k2ða<sup>12</sup> þ c<sup>13</sup> � c<sup>12</sup> � a13Þ þ k3ðb<sup>11</sup> � d<sup>11</sup> � b<sup>13</sup> þ d13Þ þ …þ k2n�<sup>4</sup>ða<sup>12</sup> þ c1<sup>n</sup> � c<sup>12</sup> � a1nÞ þ k2n�<sup>3</sup>ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> �k1ða<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a12Þ � k3ða<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a12Þ � k2n�<sup>3</sup>ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �k1ðb<sup>11</sup> � d<sup>11</sup> � b<sup>12</sup> þ d12Þ � k2ða<sup>12</sup> þ c<sup>13</sup> � c<sup>12</sup> � a13Þ � k3ðb<sup>11</sup> � d<sup>11</sup> � b<sup>13</sup> þ d13Þ � …� k2n�<sup>4</sup>ða<sup>12</sup> þ c1<sup>n</sup> � c<sup>12</sup> � a1nÞ � k2n�<sup>3</sup>ð Þ b<sup>11</sup> � d<sup>11</sup> � b<sup>14</sup> þ d1<sup>n</sup> k1ða<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a12Þ þ k3ða<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a12Þ þ k2n�<sup>3</sup>ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �k1ðb<sup>11</sup> � d<sup>11</sup> � b<sup>12</sup> þ d12Þ � k2ða<sup>11</sup> � c<sup>11</sup> þ c<sup>13</sup> � a13Þ � k3ðb<sup>11</sup> � d<sup>11</sup> � b<sup>13</sup> þ d13Þ � …� k2n�<sup>4</sup>ða<sup>11</sup> � c<sup>11</sup> þ c1<sup>n</sup> � a1nÞ � k2n�<sup>3</sup>ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> k1ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> k1ðb<sup>11</sup> � d<sup>11</sup> � b<sup>12</sup> þ d12Þ þ k2ða<sup>11</sup> � c<sup>11</sup> þ c<sup>13</sup> � a13Þ þ k3ðb<sup>11</sup> � d<sup>11</sup> � b<sup>13</sup> þ d13Þ þ …þ k2n�<sup>4</sup>ða<sup>11</sup> � c<sup>11</sup> þ c1<sup>n</sup> � a1nÞ þ k2n�<sup>3</sup>ð Þ b<sup>11</sup> � d<sup>11</sup> � b1<sup>n</sup> þ d1<sup>n</sup> �k1ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> k2ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> k3ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �k2ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �k3ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> ⋮ k2n�<sup>4</sup>ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> k2n�<sup>3</sup>ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �k2n�<sup>4</sup>ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> �k2n�<sup>3</sup>ð Þ a<sup>11</sup> þ c<sup>12</sup> � c<sup>11</sup> � a<sup>12</sup> 0 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@ 1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCA

References

2003;44:25-28

nia, Davis: Mathematics Dep.; 2004

Monthly. 1960;67(2):143-152

Recreational Mathematics. 1989;21:179-181

[1] Ahmed M. Algebraic combinatorics of magic squares [Ph.D. thesis]. University of Califor-

Nullspace of Compound Magic Squares http://dx.doi.org/10.5772/intechopen.74678 73

[4] Al-Ashhab S, Mueller W, Semi pandiagonal magic 4 4 squares. Results in Mathematics.

[5] Andress W. Basic properties of pandiagonal magic squares. The American Mathematical

[6] Hendricks J. The determinant of a pandiagonal magic square of order 4 is zero. Journal of

[7] Rosser B, Walker R. On the transformation group for diabolic magic squares of order four.

[2] Al-Amerie M. Msc. thesis, Al-Albayt University, supervised by S. Al-Ashhab. 2007

[3] Al-Ashhab S. Theory of Magic Squares. Royal Scientific Society; 2000

Bulletin of the American Mathematical Society. 1938;44:416-420

[8] Kraitchik. La Mathématique des Jeux ou récréations mathématiques. p. 167

From the (4n � 2)-th row of this vector we obtain the equation

$$k\_{2n-3}(a\_{11} + c\_{12} - c\_{11} - a\_{12}) = 0$$

According to our assumptions we must have k2n�<sup>3</sup> ¼ 0. Similarly, we obtain k2n�<sup>4</sup> ¼ 0 from the (4n � 3)-th row. We continue checking all the rows up to the tenth row, which looks like this

$$k\_3(a\_{11} + c\_{12} - c\_{11} - a\_{12}) = 0$$

Hence, we conclude that k<sup>3</sup> ¼ 0. From the ninth (res. eighth) row we obtain k<sup>2</sup> ¼ 0 (res. k<sup>1</sup> ¼ 0). Since all k1, k2, k3, …, k2n�<sup>4</sup>, k2n�<sup>3</sup> are zero, we are done.⎕
