Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Magic square
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
===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}}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Magic square
(section)
Add topic