Ma · Mathematics

What Equation Describes a Rectangle with a Given Perimeter?

Published By the 9to5Science editorial team

At a glance

  1. 1. Write the perimeter

    For side lengths length and width, use perimeter = 2 × (length + width).

  2. 2. Substitute the given value

    Set the perimeter expression equal to the known perimeter.

  3. 3. Solve for a side

    Rearrange to express one side in terms of the other.

  4. 4. Use any extra condition

    If area is also known, substitute the side relation into the area formula.

If you know a rectangle’s perimeter, its length and width are related by a simple equation. The perimeter alone does not usually determine both side lengths: many different rectangles can have the same perimeter.

The standard equation is P=2l+2wP=2l+2w, where ll is the length, ww is the width, and PP is the perimeter. If you know the area as well, you can combine this equation with the area formula to determine the dimensions.

The perimeter equation

A rectangle has two sides of length ll and two sides of width ww. Adding all four sides gives

P=l+w+l+w=2l+2w=2(l+w).P=l+w+l+w=2l+2w=2(l+w).

If the perimeter PP is given, rearrange to express one side in terms of the other:

w=P2−l.w=\frac{P}{2}-l.

This is the equation relating the side lengths. It shows that once you choose a length, the width is fixed if the perimeter must stay the same. For a genuine rectangle, both dimensions must be positive, so 0<l<P/20<l<P/2 and 0<w<P/20<w<P/2.

If the area is also given

The area of a rectangle is A=lwA=lw. Substitute w=P/2−lw=P/2-l into that formula:

A=l(P2−l).A=l\left(\frac{P}{2}-l\right).

This gives the area in terms of one side and the fixed perimeter. If both PP and AA are known, solve the resulting quadratic equation for ll:

l2−P2l+A=0.l^2-\frac{P}{2}l+A=0.

The two roots, when they are valid, give the rectangle’s side lengths. They may appear in either order because swapping length and width describes the same rectangle.

Worked example: perimeter 40 and area 96

Suppose a rectangle has perimeter 4040 units and area 9696 square units. First use the perimeter equation:

40=2(l+w)⟹l+w=20⟹w=20−l.40=2(l+w) \quad\Longrightarrow\quad l+w=20 \quad\Longrightarrow\quad w=20-l.

Now substitute this into the area equation:

96=l(20−l).96=l(20-l).

Rearranging gives

l2−20l+96=0.l^2-20l+96=0.

Factor the quadratic:

(l−8)(l−12)=0.(l-8)(l-12)=0.

Thus l=8l=8 or l=12l=12. Since the two sides add to 2020, the corresponding widths are 1212 and 88. The rectangle’s side lengths are therefore 88 units and 1212 units. Check: 2(8+12)=402(8+12)=40 and 8⋅12=968\cdot12=96.

What the perimeter alone tells you

For a fixed perimeter, there are many possible rectangles. For example, perimeter 4040 gives l+w=20l+w=20, so side lengths 55 and 1515, 88 and 1212, or 1010 and 1010 all satisfy the perimeter condition. Their areas differ, even though their perimeters are equal.

Among rectangles with a fixed perimeter, the square has the greatest area. To see this, write

A=l(P2−l)=−(l−P4)2+P216.A=l\left(\frac{P}{2}-l\right) = -\left(l-\frac{P}{4}\right)^2+\frac{P^2}{16}.

The squared term is never negative, so the area is largest when it is zero: l=P/4l=P/4. Then w=P/4w=P/4 as well, and the maximum area is P2/16P^2/16.

For perimeter 4040, the maximum area is 402/16=10040^2/16=100 square units, achieved by a 1010-by-1010 square. An area of 9696 is possible, as in the worked example, while an area greater than 100100 is not possible with that perimeter.

Common mistakes

  • Using P=l+wP=l+w. That is the sum of two adjacent sides, not the full perimeter. The correct equation is P=2(l+w)P=2(l+w).
  • Assuming one perimeter gives one rectangle. Without another condition, such as the area or one side length, the dimensions are not uniquely determined.
  • Mixing units. Perimeter is measured in linear units; area is measured in square units. For instance, a perimeter of 4040 cm and an area of 9696 cm2^2 use different units for different quantities.
  • Accepting impossible roots. A solution must give positive side lengths. If a proposed area exceeds P2/16P^2/16, no rectangle with that perimeter has that area.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.