Book contents
- Frontmatter
- Contents
- Preface
- Part one Foundations
- Part two Investigations
- 8 Magic Squares
- 9 GCDs, Pseudoprimes and Miller's Test
- 10 Graphics: Curves and Envelopes
- 11 Zigzags and Fast Curves
- 12 Sequences of Real Numbers
- 13 Newton–Raphson Iteration and Fractals
- 14 Permutations
- 15 Iterations for Nonlinear Equations
- 16 Matrices and Solution of Linear Systems
- 17 Function Interpolations and Approximation
- 18 Ordinary Differential Equations
- Part three Modelling
- Appendix 1 MATLAB Command Summary
- Appendix 2 Symbolic Calculations within MATLAB
- Appendix 3 List of All M-files Supplied
- Appendix 4 How to Get Solution M-files
- Appendix 5 Selected MATLAB Resources on the Internet
- References
- Index
8 - Magic Squares
Published online by Cambridge University Press: 08 February 2010
- Frontmatter
- Contents
- Preface
- Part one Foundations
- Part two Investigations
- 8 Magic Squares
- 9 GCDs, Pseudoprimes and Miller's Test
- 10 Graphics: Curves and Envelopes
- 11 Zigzags and Fast Curves
- 12 Sequences of Real Numbers
- 13 Newton–Raphson Iteration and Fractals
- 14 Permutations
- 15 Iterations for Nonlinear Equations
- 16 Matrices and Solution of Linear Systems
- 17 Function Interpolations and Approximation
- 18 Ordinary Differential Equations
- Part three Modelling
- Appendix 1 MATLAB Command Summary
- Appendix 2 Symbolic Calculations within MATLAB
- Appendix 3 List of All M-files Supplied
- Appendix 4 How to Get Solution M-files
- Appendix 5 Selected MATLAB Resources on the Internet
- References
- Index
Summary
Aims of the project
Magic squares have been known for centuries. This project explores their properties from the perspective of matrix algebra, that is, using addition and multiplication of matrices. The project is not concerned with the number-theoretic problem of finding magic squares containing consecutive integers. The project is self-contained, but it may be of interest to know that several of the mathematical results come from the article [16]. This article also contains other results on the same subject.
Mathematical ideas used
Matrix multiplication, row reduced echelon form and solution of linear equations are used. Also, for example, 3 × 3 matrices are regarded as lying in nine-dimensional space R9, and subspaces of R9 are considered. (There is no requirement to know the definition of an abstract vector space: all spaces are contained in some Rn.) The ideas of linear independence and basis are used. It is necessary to know that, in a subspace X of dimension r in Rn, a set of r vectors in X which is linearly independent automatically spans X and so forms a basis. It is necessary to know the definitions of eigenvalues and eigenvectors, and to use these in a simple argument involving powers of matrices.
MATLAB techniques used
The project is about matrices, so you will need the techniques described in Chapter 2. At one point there is an M-file with several ‘for’ loops, and ‘if’ statements, so you will need to understand these ideas. See Chapter 3. Note that the project is somewhat ‘open-ended’: students who work quickly might like to go on to the final section, on 5 × 5 magic squares, which could be regarded as optional.
- Type
- Chapter
- Information
- Mathematical Explorations with MATLAB , pp. 101 - 107Publisher: Cambridge University PressPrint publication year: 1999