# dividing rectangle into grid(squares) with known n number of squares

Let's assume we have:

a = 15
b = 10
number_of_squares = 12


Meaning:

Overall = 150
one_unit_overall = 150/12 = 12.5
one_unit_a = square root of 12.5 = 3.53


This means if I cut rectangle on $12$ equal pieces, $4 \cdot 3$ for example, the width and height of square will not fit in $a \cdot b$ rectangle. What am I mising?

I would appreciate it.

I get:

a_square = 14.12 != a_rectangle (15)
b_square = 10.59 != b_rectangle (10)

• You have solved $$12x^2=150\to x=\sqrt{12.5}$$ but another condition is $$nx=10;\;mx=15;\;mn=12$$ $x$ must be integer – Raffaele Nov 17 '17 at 10:51
• @Raffaele This can not be solved if x is not integer? – Testing man Nov 17 '17 at 10:53
• To rephrase what Raffaele said in more geometrical terms, if a "square tiling" exists, you solved for the side length of the tiling square (what Raffaele called $x$, what you denoted one_unit_a). The other condition given by Raffaele is about how many squares you have to line up horizontally/vertically to actually tile the rectangle: $n$ would be the number of squares in a column (if $b=10$ is the height) and $m$ the number per line (if $a=15$ is the width). To achieve what you want, you need $n,m$ to exist and be integers, or there is no solution. – N.Bach Nov 17 '17 at 12:13
• The constraint $n,m$ integers, and the equalities $$nx=10;\ mx=15$$ implies that $x$ must at least be rational. Problem here is that $$x=\sqrt{\frac{25}2}=\frac 5{\sqrt 2}$$ is not rational (because $\sqrt 2$ is not). – N.Bach Nov 17 '17 at 12:17