Example 6 (1) Find the maximum area of a rectangle with a fixed perimeter;
(2) Find the minimum perimeter of a rectangle with a fixed area.
Let the length and width of the rectangle be $a$ and $b$, then $a>0, b>0$.
(1) If the perimeter is a constant $C$, then the area of the rectangle
$$
S=a b \leqslant\left(\frac{a+b}{2}\right)^{2}=\frac{C^{2}}{16},
$$

the equality holds if and only if $a=b$.
Therefore, the maximum area is achieved when the rectangle is a square, which is $\frac{1}{16}$ of the square of the perimeter.
(2) If the area is a constant $S$, then the perimeter of the rectangle
$$
C=2(a+b) \geqslant 2 \times 2 \sqrt{a b}=4 \sqrt{S},
$$

the equality holds if and only if $a=b$.
Therefore, the minimum perimeter is achieved when the rectangle is a square, which is 4 times the square root of the area.