Square (Coordinate Geometry)

A 4-sided regular polygon with all sides equal, all interior angles 90° and whose location on the coordinate plane is determined by the coordinates of the four vertices (corners).
Try this Drag any vertex of the square below. It will remain a square and its dimensions calculated from its coordinates. You can also drag the origin point at (0,0), or drag the square itself.

In coordinate geometry, a square is similar to an ordinary square (See Square definition ) with the addition that its position on the coordinate plane is known. Each of the four vertices (corners) have known coordinates. From these coordinates, various properties such as width, height etc can be found.
It has all the same properties as a familiar square, such as:

See Square definition for more.

Dimensions of a square

The dimensions of the square are found by calculating the distance between various corner points. Recall that we can find the distance between any two points if we know their coordinates. (See Distance between Two Points ) So in the figure above:

This method will work even if the square is rotated on the plane (click on "rotated" above). But if the sides of the square are parallel to the x and y axes, then the calculations can be a little easier.
In the above figure uncheck the "rotated" box and note that The side length is the difference in y-coordinates of any left and right point - for example A and B.


The example below assumes you know how to calculate the distance between two points, as described in Distance between Two Points. In the figure above, click 'reset', 'rotated' and 'show diagonals'

Area and perimeter

These are described on a separate page. See Area and perimeter of a square (coordinate geometry)

Things to try

In the figure at the top of the page, click on "hide details" . Then drag the square or any of its corners to create an arbitrary square. Calculate the width, height and the length of the diagonals. Click 'show details' and "show diagonals" to verify your answer.


In the interest of clarity in the applet above, the coordinates are rounded off to integers and the lengths rounded to one decimal place. This can cause calculatioons to be slightly off.

For more see Teaching Notes

Other Coordinate Geometry topics