Iranian architecture has achieved a high level of beauty and perfection. It is evident that advanced geometry was used by the prominent architects at that time. Geometry was used not only to solve structural problems, but also in the details of the designs of various structures. These range from the immense high entrances of Friday Mosques in important cities, to entrances of ordinary homes. By reviewing examples of medieval Iranian architecture, one becomes aware of its close relationship to scientific fields such as mathematics, geometry, cosmology, and astrology. This Relationship made it possible to achieve perfection, monumentality and poetic beauty. It is wisdom within art.