How to ... exit MathMate
Choose
Exit
in the menu.