 Magic Squares are infamous; so famous that even the number of letters on its Wikipedia Page is more than that of Mathematics itself. People hardly talk about Magic Rectangles.

Ya, Magic Rectangles! Have you heard of it? No, right? Not me either!

So, I set off to discover the math behind it.

#### Does there exist a Magic Rectangle?

First, we have to write the condition mathematically.

Take a table of dimension $m$ x $n$. Now fill in the tables with positive integers so that the sum of the rows, columns, and diagonals are equal. Does there exist such a rectangle?

Let’s start building it from scratch.

Now let’s check something else. Let’s calculate the sum of the elements of the table in two different ways.

Let’s say the column, row and diagonal sum be $S$. There are $m$ rows and $n$ columns.

#### Row – wala Viewpoint

The Rows say the sum of the elements of the table is $S.m$. See the picture below.

#### Column – wala Viewpoint

The Rows say the sum of the elements of the table is $S.n$. See the picture below.

Now, magically it comes that the $S.m = S.n$. Therefore the number of rows and columns must be equal.

Whoa! That was cute!

Visit this post to know about Magic Square more.

Edit 1: Look into the comments for a nice observation that if we allowed integers, and the common sum is 0, then we may not have got the result. Also we need to define the sum of the entries of a diagonal of a rectangle.