Drag any vertex of the rectangle below. It will remain a rectangle and its dimensions calculated from its coordinates.
You can also drag the origin point at (0,0).
A rectangle is similar to an ordinary rectangle
(See Rectangle definition )
with the addition that its position on the
Each of the four vertices (corners) have known
From these coordinates, various properties such as width, height etc can be found.
It has all the same properties as a familiar rectangle:
The dimensions of the rectangle 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:
The height of the rectangle is the distance between A and B (or C,D).
The width is the distance between B and C (or A,D).
The length of a diagonals is the distance between opposite corners, say B and D (or A,C since the diagonals are congruent).
This method will work even if the rectangle is rotated on the plane, as in the figure above. But
if the sides of the rectangle are parallel to the x and y axes,
then the calculations can be a little easier.
In the above figure uncheck the "rotated" box to create this condition
and note that:
The height is the difference in y-coordinates of any top and bottom point - for example A and B.
The width is the difference in x-coordinates of any left and right point - for example B and D
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' and 'show diagonals'
The height of the rectangle is the distance between the points A and B. (Using C,D will produce the same result).
Using the formula for the distance between two points, this is