Questions & Answers about En un rectángulo, cada ángulo es recto.
Un rectángulo is used because the sentence is talking about any rectangle, not one specific rectangle.
- En un rectángulo... = in a rectangle / in any rectangle
- En el rectángulo... = in the rectangle, meaning a specific rectangle already mentioned
So the indefinite article un gives a general, definition-like meaning.