Text this: Matrix models and phase transitions in gauge theories