Just very quickly, to clarify:
- A rectangle is any two-dimensional shape with four right-angled corners.
- A square is a rectangle in which all four sides are the same length.
- Therefore all squares are rectangles, but not all rectangles are squares.
I hope that clears things up.