Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Magic square
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Transformations that preserve the magic property== ===For any magic square=== * The sum of any two magic squares of the same order by [[matrix addition]] is a magic square. * A magic square remains magic when all of its numbers undergo the same [[linear transformation]] (i.e., a function of the form {{math|''f''(''x'') {{=}} ''m'' ''x'' + ''b''}}). For example, a magic square remains magic when its numbers are multiplied by any constant.<ref name="Kraitchik1953"/> Moreover, a magic square remains magic when a constant is added or subtracted to its numbers, or if its numbers are subtracted from a constant. In particular, if every element in a normal magic square of order <math>n</math> is subtracted from <math>n^2+1</math>, the complement of the original square is obtained.<ref name="Kraitchik1953"/> In the example below, each element of the magic square on the left is subtracted from 17 to obtain the complement magic square on the right. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 10 || 3 || 13 || 8 |- | 5 || 16 || 2 || 11 |- | 4 || 9 || 7 || 14 |- | 15 || 6 || 12 || 1 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 7 || 14 || 4 || 9 |- | 12 || 1 || 15 || 6 |- | 13 || 8 || 10 || 3 |- | 2 || 11 || 5 || 16 |} {{col-end}} * A magic square remains magic when transformed by any element of {{math|D{{sub|4}}}}, the symmetry group of a square (see {{slink|Dihedral_group_of_order_8|The_symmetry_group_of_a_square:_dihedral_group_of_order_8}}). Every combination of one or more [[rotation (mathematics)|rotations]] of 90 degrees, [[reflection (mathematics)|reflections]], or both produce eight trivially distinct squares which are generally considered equivalent. The eight such squares are said to make up a single [[equivalence class]].<ref name=lost-theorem>{{cite journal | title = The lost theorem | first = Lee | last = Sallows | journal = [[The Mathematical Intelligencer]] | date = Fall 1997 | volume = 19 | issue = 4 | pages = 51β54 | orig-year = 9 January 2009 <!-- date published online --> | doi = 10.1007/BF03024415 | s2cid = 122385051 }}</ref><ref name="Kraitchik1953">{{cite book | first = Maurice | last = Kraitchik | chapter = Magic Squares | title = Mathematical Recreations | url = https://archive.org/details/mathematicalrecr0000krai | url-access = registration | edition = 2nd | pages = [https://archive.org/details/mathematicalrecr0000krai/page/142 142β192] | publisher = Dover Publications, Inc. | place = New York | date = 1953 | isbn = 9780486201634 }}</ref> The eight equivalent magic squares for the 3Γ3 magic square are shown below: {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- | 8 || 1 || 6 |- | 3 || 5 || 7 |- | 4 || 9 || 2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- | 6 || 1 || 8 |- | 7 || 5 || 3 |- | 2 || 9 || 4 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- | 2 || 7 || 6 |- | 9 || 5 || 1 |- | 4 || 3 || 8 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- | 4 || 3 || 8 |- | 9 || 5 || 1 |- | 2 || 7 || 6 |} {{col-end}} {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- | 2 || 9 || 4 |- | 7 || 5 || 3 |- | 6 || 1 || 8 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- | 4 || 9 || 2 |- | 3 || 5 || 7 |- | 8 || 1 || 6 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- | 8 || 3 || 4 |- | 1 || 5 || 9 |- | 6 || 7 || 2 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:6em;height:6em;table-layout:fixed;" |- | 6 || 7 || 2 |- | 1 || 5 || 9 |- | 8 || 3 || 4 |} {{col-end}} * A magic square of order <math>n</math> remains magic when both its rows and columns are symmetrically permuted by <math>p</math> such that <math> p(i) + p(n+1-i) = n + 1 </math> for <math> 1 \le i \le n </math>. Every permutation of the rows or columns preserves all row and column sums, but generally not the two diagonal sums. If the same permutation <math>p</math> is applied to both the rows and columns, then diagonal element in row <math>i</math> and column <math>i</math> is mapped to row <math>p(i)</math> and column <math>p(i)</math> which is on the same diagonal; therefore, applying the same permutation to rows and columns preserves the main (upper left to lower right) diagonal sum. If the permutation is symmetric as described, then the diagonal element in row <math>i</math> and column <math>n+1-i</math> is mapped to row <math>p(i)</math> and column <math>p(n+1-i) = n+1-p(i)</math> which is on the same diagonal; therefore, applying the same symmetric permutation to both rows and columns preserves both diagonal sums. For even <math>n</math>, there are <math>2^{\frac{n}{2}}\left(\frac{n}{2}\right)!</math> such symmetric permutations, and <math>2^{\frac{n-1}{2}}\left(\frac{n-1}{2}\right)!</math> for <math>n</math> odd. In the example below, the original magic square on the left has its rows and columns symmetrically permuted by <math>(4, 6, 5, 2, 1, 3)</math> resulting in the magic square on the right. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:12em;height:12em;table-layout:fixed;" |- | 1 || 32 || 33 || 4 || 35 || 6 |- | 30 || 8 || 27 || 28 || 11 || 7 |- | 13 || 23 || 22 || 21 || 14 || 18 |- | 24 || 17 || 16 || 15 || 20 || 19 |- | 12 || 26 || 10 || 9 || 29 || 25 |- | 31 || 5 || 3 || 34 || 2 || 36 |- |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:12em;height:12em;table-layout:fixed;" |- | 29 || 9 || 25 || 12 || 10 || 26 |- | 20 || 15 || 19 || 24 || 16 || 17 |- | 2 || 34 || 36 || 31 || 3 || 5 |- | 35 || 4 || 6 || 1 || 33 || 32 |- | 14 || 21 || 18 || 13 || 22 || 23 |- | 11 || 28 || 7 || 30 || 27 || 8 |- |} {{col-end}} * A magic square of order <math>n</math> remains magic when rows <math>i</math> and <math>(n+1-i)</math> are exchanged and columns <math>i</math> and <math>(n+1-i)</math> are exchanged because this is a symmetric permutation of the form described above.<ref name="Kraitchik1953"/><ref name="RouseBall1904"/> In the example below, the square on the right is obtained by interchanging the 1st and 4th rows and columns of the original square on the left. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | style="background-color: silver;"|'''1''' || style="background-color: silver;"|15 || style="background-color: silver;"|14 || style="background-color: silver;"|'''4''' |- | style="background-color: silver;"|12 || 6 || 7 || style="background-color: silver;"|9 |- | style="background-color: silver;"|8 || 10 || 11 || style="background-color: silver;"|5 |- | style="background-color: silver;"|'''13''' || style="background-color: silver;"|3 || style="background-color: silver;"|2 || style="background-color: silver;"|'''16''' |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 16 || 3 || 2 || 13 |- | 9 || 6 || 7 || 12 |- | 5 || 10 || 11 || 8 |- | 4 || 15 || 14 || 1 |} {{col-end}} * A magic square of order <math>n</math> remains magic when rows <math>i</math> and <math>j</math> are exchanged, rows <math>(n+1-i)</math> and <math>(n+1-j)</math> are exchanged, columns <math>i</math> and <math>j</math> are exchanged, and columns <math>(n+1-i)</math> and <math>(n+1-j)</math> are exchanged where <math>i<j<\frac{n+1}{2}</math> because this is another symmetric permutation of the form described above. In the example below, the left square is the original square, while the right square is the new square obtained by this transformation. In the middle square, rows 1 and 2 and rows 3 and 4 have been swapped. The final square on the right is obtained by interchanging columns 1 and 2 and columns 3 and 4 of the middle square. In this particular example, this transform rotates the quadrants 180 degrees. The middle square is also magic because the original square is associative. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 1 || 15 || 14 || 4 |- | 12 || 6 || 7 || 9 |- | 8 || 10 || 11 || 5 |- | 13 || 3 || 2 || 16 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 12 || 6 || 7 || 9 |- | 1 || 15 || 14 || 4 |- | 13 || 3 || 2 || 16 |- | 8 || 10 || 11 || 5 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 6 || 12 || 9 || 7 |- | 15 || 1 || 4 || 14 |- | 3 || 13 || 16 || 2 |- | 10 || 8 || 5 || 11 |} {{col-end}} * A magic square remains magic when its quadrants are diagonally interchanged because this is another symmetric permutation of the form described above. For even-order <math>n</math>, permute the rows and columns by permutation <math>p</math> where <math>p(i) = i+\frac{n}{2}</math> for <math>i\le\frac{n}{2}</math>, and <math>p(i) = i-\frac{n}{2}</math> for <math>i>\frac{n}{2}</math>. For odd-order <math>n</math>, permute rows and columns by permutation <math>p</math> where <math>p(i) = i+\frac{n+1}{2}</math> for <math>i<\frac{n+1}{2}</math>, and <math>p(i) = i-\frac{n+1}{2}</math> for <math>i>\frac{n+1}{2}</math>. For odd ordered square, the halves of the central row and column are also interchanged.<ref name="Kraitchik1953"/> Examples for order 4 and 5 magic squares are given below: {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | style="background-color: silver;"|1 || style="background-color: silver;"|15 || 14 || 4 |- | style="background-color: silver;"|12 || style="background-color: silver;"|6 || 7 || 9 |- | 8 || 10 || style="background-color: silver;"|11 || style="background-color: silver;"|5 |- | 13 || 3 || style="background-color: silver;"|2 || style="background-color: silver;"|16 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 11 || 5 || 8 || 10 |- | 2 || 16 || 13 || 3 |- | 14 || 4 || 1 || 15 |- | 7 || 9 || 12 || 6 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- | style="background-color: silver;"|17 || style="background-color: silver;"|24 || '''1''' || 8 || 15 |- | style="background-color: silver;"|23 || style="background-color: silver;"|5 || '''7''' || 14 || 16 |- | '''4''' || '''6''' || 13 || '''20''' || '''22''' |- | 10 || 12 || '''19''' || style="background-color: silver;"|21 || style="background-color: silver;"|3 |- | 11 || 18 || '''25''' || style="background-color: silver;"|2 || style="background-color: silver;"|9 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- | 21 || 3 || 19 || 10 || 12 |- | 2 || 9 || 25 || 11 || 18 |- | 20 || 22 || 13 || 4 || 6 |- | 8 || 15 || 1 || 17 || 24 |- | 14 || 16 || 7 || 23 || 5 |} {{col-end}} ===For associative magic squares=== * An associative magic square remains associative when two rows or columns equidistant from the center are interchanged.<ref name="White-Assoc-Magic">{{cite web | url = https://budshaw.ca/Associative.html | title = Associative Magic Squares | website = budshaw.ca | first1 = S. Harry | last1 = White}}</ref><ref name="Hawley2011">{{cite web | url = https://nrich.maths.org/1338 | title = Magic Squares II | website = nrich.maths.org | first = Del | last = Hawley | publisher = University of Cambridge | date = 2011 }}</ref> For an even square, there are ''n''/2 pairs of rows or columns that can be interchanged; thus 2<sup>''n''/2</sup> Γ 2<sup>''n''/2</sup> = 2<sup>''n''</sup> equivalent magic squares by combining such interchanges can be obtained. For odd square, there are (''n'' − 1)/2 pairs of rows or columns that can be interchanged; and 2<sup>''n''−1</sup> equivalent magic squares obtained by combining such interchanges. Interchanging all the rows flips the square vertically (i.e. reflected along the horizontal axis), while interchanging all the columns flips the square horizontally (i.e. reflected along the vertical axis). In the example below, a 4Γ4 associative magic square on the left is transformed into a square on the right by interchanging the second and third row, yielding the famous Durer's magic square. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 16 || 3 || 2 || 13 |- | style="background-color: silver;"|9 || style="background-color: silver;"|6 || style="background-color: silver;"|7 || style="background-color: silver;"|12 |- | style="background-color: silver;"|5 || style="background-color: silver;"|10 || style="background-color: silver;"|11 || style="background-color: silver;"|8 |- | 4 || 15 || 14 || 1 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 16 || 3 || 2 || 13 |- | 5 || 10 || 11 || 8 |- | 9 || 6 || 7 || 12 |- | 4 || 15 || 14 || 1 |} {{col-end}} * An associative magic square remains associative when two same sided rows (or columns) are interchanged along with corresponding other sided rows (or columns).<ref name="White-Assoc-Magic"/><ref name="Hawley2011"/> For an even square, since there are ''n''/2 same sided rows (or columns), there are ''n''(''n'' − 2)/8 pairs of such rows (or columns) that can be interchanged. Thus, 2<sup>''n''(''n'' − 2)/8</sup> Γ 2<sup>''n''(''n'' − 2)/8</sup> = 2<sup>''n''(''n'' − 2)/4</sup> equivalent magic squares can be obtained by combining such interchanges. For odd square, since there are (''n'' − 1)/2 same sided rows or columns, there are (''n'' − 1)(''n'' − 3)/8 pairs of such rows or columns that can be interchanged. Thus, there are 2<sup>(''n'' − 1)(''n'' − 3)/8</sup> Γ 2<sup>(''n'' − 1)(''n'' − 3)/8</sup> = 2<sup>(''n'' − 1)(''n'' − 3)/4</sup> equivalent magic squares obtained by combining such interchanges. Interchanging all the same sided rows flips each quadrants of the square vertically, while interchanging all the same sided columns flips each quadrant of the square horizontally. In the example below, the original square is on the left, whose rows 1 and 2 are interchanged with each other, along with rows 3 and 4, to obtain the transformed square on the right. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 1 || 15 || 14 || 4 |- | 12 || 6 || 7 || 9 |- | 8 || 10 || 11 || 5 |- | 13 || 3 || 2 || 16 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 12 || 6 || 7 || 9 |- | 1 || 15 || 14 || 4 |- | 13 || 3 || 2 || 16 |- | 8 || 10 || 11 || 5 |} {{col-end}} * An associative magic square remains associative when its entries are replaced with corresponding numbers from a set of ''s'' arithmetic progressions with the same common difference among ''r'' terms, such that ''r'' Γ ''s'' = ''n''<sup>2</sup>, and whose initial terms are also in arithmetic progression, to obtain a non-normal magic square. Here either ''s'' or ''r'' should be a multiple of ''n''. Let us have ''s'' arithmetic progressions given by ::<math> \begin{array}{lllll} a & a + c & a + 2c & \cdots & a + (r-1)c \\ a + d & a + c + d & a + 2c + d & \cdots & a + (r-1)c + d \\ a + 2d & a + c + 2d & a + 2c + 2d & \cdots & a + (r-1)c + 2d \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ a + (s-1)d & a + c + (s-1)d & a + 2c + (s-1)d & \cdots & a + (r-1)c + (s-1)d \\ \end{array} </math> :where ''a'' is the initial term, ''c'' is the common difference of the arithmetic progressions, and ''d'' is the common difference among the initial terms of each progression. The new magic constant will be ::<math> M = na + \frac{n}{2} \big[ (r-1)c+ (s-1)d \big]. </math> :If ''s'' = ''r'' = ''n'', then follows the simplification ::<math> M = na + \frac{n}{2}(n-1)(c+d). </math> :With ''a'' = ''c'' = 1 and ''d'' = ''n'', the usual ''M'' = ''n''(''n''<sup>2</sup>+1)/2 is obtained. For given ''M'' the required ''a'', ''c'', and ''d'' can be found by solving the [[linear Diophantine equation]]. In the examples below, there are order 4 normal magic squares on the left most side. The second square is a corresponding non-normal magic square with ''r'' = 8, ''s'' = 2, ''a'' = 1, ''c'' = 1, and ''d'' = 10 such that the new magic constant is ''M'' = 38. The third square is an order 5 normal magic square, which is a 90 degree clockwise rotated version of the square generated by De la Loubere method. On the right most side is a corresponding non-normal magic square with ''a'' = 4, ''c'' = 1, and ''d'' = 6 such that the new magic constant is ''M'' = 90. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 1 || 15 || 14 || 4 |- | 12 || 6 || 7 || 9 |- | 8 || 10 || 11 || 5 |- | 13 || 3 || 2 || 16 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 1 || 17 || 16 || 4 |- | 14 || 6 || 7 || 11 |- | 8 || 12 || 13 || 5 |- | 15 || 3 || 2 || 18 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- | 11 || 10 || 4 || 23 || 17 |- | 18 || 12 || 6 || 5 || 24 |- | 25 || 19 || 13 || 7 || 1 |- | 2 || 21 || 20 || 14 || 8 |- | 9 || 3 || 22 || 16 || 15 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- | 16 || 14 || 7 || 30 || 23 |- | 24 || 17 || 10 || 8 || 31 |- | 32 || 25 || 18 || 11 || 4 |- | 5 || 28 || 26 || 19 || 12 |- | 13 || 6 || 29 || 22 || 20 |} {{col-end}} ===For pan-diagonal magic squares=== * A pan-diagonal magic square remains a pan-diagonal magic square under cyclic shifting of rows or of columns or both.<ref name="Kraitchik1953" /> This allows us to position a given number in any one of the ''n''<sup>2</sup> cells of an ''n'' order square. Thus, for a given pan-magic square, there are ''n''<sup>2</sup> equivalent pan-magic squares. In the example below, the original square on the left is transformed by shifting the first row to the bottom to obtain a new pan-magic square in the middle. Next, the 1st and 2nd column of the middle pan-magic square is circularly shifted to the right to obtain a new pan-magic square on the right. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | style="background-color: silver;"|10 || style="background-color: silver;"|3 || style="background-color: silver;"|13 || style="background-color: silver;"|8 |- | 5 || 16 || 2 || 11 |- | 4 || 9 || 7 || 14 |- | 15 || 6 || 12 || 1 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | style="background-color: silver;"|5 || style="background-color: silver;"|16 || 2 || 11 |- | style="background-color: silver;"|4 || style="background-color: silver;"|9 || 7 || 14 |- | style="background-color: silver;"|15 || style="background-color: silver;"|6 || 12 || 1 |- | style="background-color: silver;"|10 || style="background-color: silver;"|3 || 13 || 8 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- | 2 || 11 || 5 || 16 |- | 7 || 14 || 4 || 9 |- | 12 || 1 || 15 || 6 |- | 13 || 8 || 10 || 3 |} {{col-end}} ===For bordered magic squares=== * A bordered magic square remains a bordered magic square after permuting the border cells in the rows or columns, together with their corresponding complementary terms, keeping the corner cells fixed. Since the cells in each row and column of every concentric border can be permuted independently, when the order ''n'' β₯ 5 is odd, there are <math>((n-2)! (n-4)! \dots \cdot 3!)^2</math> equivalent bordered squares. When ''n'' β₯ 6 is even, there are <math>((n-2)! (n-4)! \dots \cdot 4!)^2</math> equivalent bordered squares. In the example below, a square of order 5 is given whose border row has been permuted and (3!)<sup>2</sup> = 36 such equivalent squares can be obtained. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- | 1 || '''23''' || '''16''' || 4 || 21 |- | 15 || style="background-color: silver;"|14 || style="background-color: silver;"|7 || style="background-color: silver;"|18 || 11 |- | 24 || style="background-color: silver;"|17 || style="background-color: silver;"|13 || style="background-color: silver;"|9 || 2 |- | 20 || style="background-color: silver;"|8 || style="background-color: silver;"|19 || style="background-color: silver;"|12 || 6 |- | 5 || '''3''' || '''10''' || 22 || 25 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- | 1 || 16 || 23 || 4 || 21 |- | 15 || style="background-color: silver;"|14 || style="background-color: silver;"|7 || style="background-color: silver;"|18 || 11 |- | 24 || style="background-color: silver;"|17 || style="background-color: silver;"|13 || style="background-color: silver;"|9 || 2 |- | 20 || style="background-color: silver;"|8 || style="background-color: silver;"|19 || style="background-color: silver;"|12 || 6 |- | 5 || 10 || 3 || 22 || 25 |} {{col-end}} * A bordered magic square remains a bordered magic square after each of its concentric borders are independently rotated or reflected with respect to the central core magic square. If there are ''b'' borders, then this transform will yield 8<sup>''b''</sup> equivalent squares. In the example below of the 5Γ5 magic square, the border has been rotated 90 degrees anti-clockwise. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- | 1 || 23 || 16 || 4 || 21 |- | 15 || style="background-color: silver;"|14 || style="background-color: silver;"|7 || style="background-color: silver;"|18 || 11 |- | 24 || style="background-color: silver;"|17 || style="background-color: silver;"|13 || style="background-color: silver;"|9 || 2 |- | 20 || style="background-color: silver;"|8 || style="background-color: silver;"|19 || style="background-color: silver;"|12 || 6 |- | 5 || 3 || 10 || 22 || 25 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:10em;height:10em;table-layout:fixed;" |- | 21 || 11 || 2 || 6 || 25 |- | 4 || style="background-color: silver;"|14 || style="background-color: silver;"|7 || style="background-color: silver;"|18 || 22 |- | 16 || style="background-color: silver;"|17 || style="background-color: silver;"|13 || style="background-color: silver;"|9 || 10 |- | 23 || style="background-color: silver;"|8 || style="background-color: silver;"|19 || style="background-color: silver;"|12 || 3 |- | 1 || 15 || 24 || 20 || 5 |} {{col-end}} ===For composite magic squares=== * A composite magic square remains a composite magic square when the embedded magic squares undergo transformations that do not disturb the magic property (e.g. rotation, reflection, shifting of rows and columns, and so on).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)