# Rectangle

In Euclidean plane geometry, a rectangle is a rectilinear convex polygon or a quadrilateral with four right angles. It can also be defined as: an equiangular quadrilateral, since equiangular means that all of its angles are equal (360°/4 = 90°); or a parallelogram containing a right angle. A rectangle with four sides of equal length is a square. The term "oblong" is used to refer to a non-square rectangle. A rectangle with vertices ABCD would be denoted as ABCD.
The word rectangle comes from the Latin rectangulus, which is a combination of rectus (as an adjective, right, proper) and angulus (angle).
A crossed rectangle is a crossed (self-intersecting) quadrilateral which consists of two opposite sides of a rectangle along with the two diagonals (therefore only two sides are parallel). It is a special case of an antiparallelogram, and its angles are not right angles and not all equal, though opposite angles are equal. Other geometries, such as spherical, elliptic, and hyperbolic, have so-called rectangles with opposite sides equal in length and equal angles that are not right angles.
Rectangles are involved in many tiling problems, such as tiling the plane by rectangles or tiling a rectangle by polygons.

## Characterizations

A convex quadrilateral is a rectangle if and only if it is any one of the following:
* a parallelogram with at least one right angle
* a parallelogram with diagonals of equal length
* a parallelogram ABCD where triangles ABD and DCA are congruent
* an equiangular quadrilateral
* a quadrilateral with four right angles
* a quadrilateral where the two diagonals are equal in length and bisect each other
* a convex quadrilateral with successive sides a, b, c, d whose area is ${\tfrac {1}{4}}(a+c)(b+d)$.$^{:fn.1}$
* a convex quadrilateral with successive sides a, b, c, d whose area is ${\tfrac {1}{2}}{\sqrt {(a^{2}+c^{2})(b^{2}+d^{2})}}.$

## Classification
### Traditional hierarchy

A rectangle is a special case of a parallelogram in which each pair of adjacent sides is perpendicular.
A parallelogram is a special case of a trapezium (known as a trapezoid in North America) in which both pairs of opposite sides are parallel and equal in length.
A trapezium is a convex quadrilateral which has at least one pair of parallel opposite sides.
A convex quadrilateral is
* Simple: The boundary does not cross itself.
* Star-shaped: The whole interior is visible from a single point, without crossing any edge.

### Alternative hierarchy

De Villiers defines a rectangle more generally as any quadrilateral with axes of symmetry through each pair of opposite sides. This definition includes both right-angled rectangles and crossed rectangles. Each has an axis of symmetry parallel to and equidistant from a pair of opposite sides, and another which is the perpendicular bisector of those sides, but, in the case of the crossed rectangle, the first axis is not an axis of symmetry for either side that it bisects.
Quadrilaterals with two axes of symmetry, each through a pair of opposite sides, belong to the larger class of quadrilaterals with at least one axis of symmetry through a pair of opposite sides. These quadrilaterals comprise isosceles trapezia and crossed isosceles trapezia (crossed quadrilaterals with the same vertex arrangement as isosceles trapezia).

## Properties
### Symmetry

A rectangle is cyclic: all corners lie on a single circle.
It is equiangular: all its corner angles are equal (each of 90 degrees).
It is isogonal or vertex-transitive: all corners lie within the same symmetry orbit.
It has two lines of reflectional symmetry and rotational symmetry of order 2 (through 180°).

### Rectangle-rhombus duality

The dual polygon of a rectangle is a rhombus, as shown in the table below.
| Rectangle | Rhombus |
| All angles are equal. | All sides are equal. |
| Alternate sides are equal. | Alternate angles are equal. |
| Its centre is equidistant from its vertices, hence it has a circumcircle. | Its centre is equidistant from its sides, hence it has an incircle. |
| Two axes of symmetry bisect opposite sides. | Two axes of symmetry bisect opposite angles. |
| Diagonals are equal in length. | Diagonals intersect at equal angles. |
* The figure formed by joining, in order, the midpoints of the sides of a rectangle is a rhombus and vice versa.

### Miscellaneous

A rectangle is a rectilinear polygon: its sides meet at right angles.
A rectangle in the plane can be defined by five independent degrees of freedom consisting, for example, of three for position (comprising two of translation and one of rotation), one for shape (aspect ratio), and one for overall size (area).
Two rectangles, neither of which will fit inside the other, are said to be incomparable.

## Formulae

If a rectangle has length $\ell$ and width $w$, then:
* it has area $A=\ell w\,$;
* it has perimeter $P=2\ell +2w=2(\ell +w)\,$;
* each diagonal has length $d={\sqrt {\ell ^{2}+w^{2}}}$; and
* when $\ell =w\,$, the rectangle is a square.

## Theorems

The isoperimetric theorem for rectangles states that among all rectangles of a given perimeter, the square has the largest area.
The midpoints of the sides of any quadrilateral with perpendicular diagonals form a rectangle.
A parallelogram with equal diagonals is a rectangle.
The Japanese theorem for cyclic quadrilaterals states that the incentres of the four triangles determined by the vertices of a cyclic quadrilateral taken three at a time form a rectangle.
The British flag theorem states that with vertices denoted A, B, C, and D, for any point P on the same plane of a rectangle:
    $\displaystyle (AP)^{2}+(CP)^{2}=(BP)^{2}+(DP)^{2}.$
For every convex body C in the plane, we can inscribe a rectangle r in C such that a homothetic copy R of r is circumscribed about C and the positive homothety ratio is at most 2 and $0.5{\text{ × Area}}(R)\leq {\text{Area}}(C)\leq 2{\text{ × Area}}(r)$.
There exists a unique rectangle with sides $a$ and $b$, where $a$ is less than $b$, with two ways of being folded along a line through its center such that the area of overlap is minimized and each area yields a different shape – a triangle and a pentagon. The unique ratio of side lengths is $\displaystyle {\frac {a}{b}}=0.815023701...$.

## Crossed rectangles

A crossed quadrilateral (self-intersecting) consists of two opposite sides of a non-self-intersecting quadrilateral along with the two diagonals. Similarly, a crossed rectangle is a crossed quadrilateral which consists of two opposite sides of a rectangle along with the two diagonals. It has the same vertex arrangement as the rectangle. It appears as two identical triangles with a common vertex, but the geometric intersection is not considered a vertex.
A crossed quadrilateral is sometimes likened to a bow tie or butterfly, sometimes called an "angular eight". A three-dimensional rectangular wire frame that is twisted can take the shape of a bow tie.
The interior of a crossed rectangle can have a polygon density of ±1 in each triangle, dependent upon the winding orientation as clockwise or counterclockwise.
A crossed rectangle may be considered equiangular if right and left turns are allowed. As with any crossed quadrilateral, the sum of its interior angles is 720°, allowing for internal angles to appear on the outside and exceed 180°.
A rectangle and a crossed rectangle are quadrilaterals with the following properties in common:
* Opposite sides are equal in length.
* The two diagonals are equal in length.
* It has two lines of reflectional symmetry and rotational symmetry of order 2 (through 180°).

## Other rectangles

In spherical geometry, a spherical rectangle is a figure whose four edges are great circle arcs which meet at equal angles greater than 90°. Opposite arcs are equal in length. The surface of a sphere in Euclidean solid geometry is a non-Euclidean surface in the sense of elliptic geometry. Spherical geometry is the simplest form of elliptic geometry.
In elliptic geometry, an elliptic rectangle is a figure in the elliptic plane whose four edges are elliptic arcs which meet at equal angles greater than 90°. Opposite arcs are equal in length.
In hyperbolic geometry, a hyperbolic rectangle is a figure in the hyperbolic plane whose four edges are hyperbolic arcs which meet at equal angles less than 90°. Opposite arcs are equal in length.

## Tessellations

The rectangle is used in many periodic tessellation patterns, in brickwork, for example, these tilings:
| Stacked bond | Running bond | Basket weave | Basket weave | Herringbone pattern |

## Squared, perfect, and other tiled rectangles

A rectangle tiled by squares, rectangles, or triangles is said to be a "squared", "rectangled", or "triangulated" (or "triangled") rectangle respectively. The tiled rectangle is perfect if the tiles are similar and finite in number and no two tiles are the same size. If two such tiles are the same size, the tiling is imperfect. In a perfect (or imperfect) triangled rectangle the triangles must be right triangles. A database of all known perfect rectangles, perfect squares and related shapes can be found at squaring.net. The lowest number of squares need for a perfect tiling of a rectangle is 9 and the lowest number needed for a perfect tilling a square is 21, found in 1978 by computer search.
A rectangle has commensurable sides if and only if it is tileable by a finite number of unequal squares. The same is true if the tiles are unequal isosceles right triangles.
The tilings of rectangles by other tiles which have attracted the most attention are those by congruent non-rectangular polyominoes, allowing all rotations and reflections. There are also tilings by congruent polyaboloes.

## Unicode

The following Unicode code points depict rectangles: