- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# In a “magic square”, the sum of the numbers in each row, in each column and along the diagonals is the same. Is this a magic square?

$\frac{4}{11}$ | $\frac{9}{11}$ | $\frac{2}{11}$ |

$\frac{3}{11}$ | $\frac{5}{11}$ | $\frac{7}{11}$ |

$\frac{8}{11}$ | $\frac{1}{11}$ | $\frac{6}{11}$ |

To do:

We have to find whether the given square is a magic square.

Solution:

A magic square is an array of numbers where the sum of rows, columns, and diagonal elements are equal.

On adding the numbers in each row we get,

Sum of the first row $=\frac{4}{11}+\frac{9}{11}+\frac{2}{11}$

$=\frac{4+9+2}{11}$

$=\frac{15}{11}$

Sum of the second row $=\frac{3}{11}+\frac{5}{11}+\frac{7}{11}$

$=\frac{3+5+7}{11}$

$=\frac{15}{11}$

Sum of the third row $=\frac{8}{11}+\frac{1}{11}+\frac{6}{11}$

$=\frac{8+1+6}{11}$

$=\frac{15}{11}$

On adding the numbers in each column we get,

Sum of the first column $=\frac{4}{11}+\frac{3}{11}+\frac{8}{11}$

$=\frac{4+3+8}{11}$

$=\frac{15}{11}$

Sum of the second column $=\frac{9}{11}+\frac{5}{11}+\frac{1}{11}$

$=\frac{9+5+1}{11}$

$=\frac{15}{11}$

Sum of the third column $=\frac{2}{11}+\frac{7}{11}+\frac{6}{11}$

$=\frac{2+7+6}{11}$

$=\frac{15}{11}$

On adding the numbers of the diagonals we get,

Sum of the first diagonal $=\frac{4}{11}+\frac{5}{11}+\frac{6}{11}$

$=\frac{4+5+6}{11}$

$=\frac{15}{11}$

Sum of the second diagonal $=\frac{8}{11}+\frac{5}{11}+\frac{2}{11}$

$=\frac{8+5+2}{11}$

$=\frac{15}{11}$

Here, the sum of the numbers in each row, in each column, and along the diagonals is the same.

**Hence, the given square is a magic square.**

- Related Questions & Answers
- Magic Square
- Fill missing entries of a magic square in C++
- Check given matrix is magic square or not in C++
- Count the same value of each row in a MySQL column?
- C++ program to find the Sum of each Row and each Column of a Matrix
- Return the sum along diagonals of the masked array in Numpy
- Check if a number is magic (Recursive sum of digits is 1) in C++
- Row-wise common elements in two diagonals of a square matrix in C++
- Sum of Square Numbers in C++
- Difference between sum of square and square of sum in JavaScript
- Print the Non Square Numbers in C
- Difference between sum of the squares of and square of sum first n natural numbers.
- Maximum sum of elements from each row in the matrix in C++
- Print n numbers such that their sum is a perfect square
- How to find the row sum for each column by row name in an R matrix?
- How to add columns with square of each column in R data frame?