How can a square be a rectangle?

All squares are rectangles, but not all rectangles are squares. The definition of a rectangle is a 4 sided figure with 4 right angles. So all squares are rectangles.