devavrat wrote:
Hi can you please explain this problem in detail
Thanks
If the perimeter of the square is 20, then each side of the square has to be equal to 20/4 = 5.
Let us consider a square ABCD of side 5 units with A on the origin. There are two ways to draw such a square.
1) Please B on one of the axes and proceeding counter-clockwise. 4 such squares are possible, where B is on:
- positive x axis A(0,0), B(5,0), C(5,5), D(0,5)
- positive y axis A(0,0), B(0,5), C(-5,5), D(-5,0)
- negative x axis A(0,0), B(-5,0), C(-5,-5), D(0,-5)
- negative y axis A(0,0), B(0,-5), C(5,-5), D(5,0)
2) Place B at a point not on the x or y axis.
Any line segment from the origin on the co-ordinate plane (such as our side AB) can be considered to be the hypotenuse of a right angled triangle with one of the other 2 sides being parallel to (including coinciding with) x axis and other parallel to (including coinciding with) y axis.
Let this triangle be ABX. For B (which is the other vertex) to have integer co-ordinates, the lengths of AX and BX must be integers.
Pythagorus theorem tells us that with a hypotenuse AB of 5 units, the AX and BX must be 3,4 units (either one can be 3, the other 4). We can find 8 such locations for the point X [such that (AX = 3, BX = 4) or (AX = 4, BX = 3)]
- positive x axis [X(3,0), B(3,4)] and [X(4,0), B(4,3)]
- positive y axis [X(0,3), B(-4,3)] and [X(0,4), B(-3,4)]
- negative x axis [X(-3,0), B(-3,-4)] and [X(-4,0), B(-4,-3)]
- negative y axis [X(0,-3), B(4,-3)] and [X(0,-4), B(3,-4)]
Rules of reflection of points on the co-ordinate place imply that for these co-ordinates of A(0,0) and B(as above), C and D must also have integer co-ordinates.
Hope this clarifies.
_________________