Why are the walls in a Mosque decprated with patterns and calligraphy?

they are decorated with tiles that are belived to be respectful to god or Allah.