On low rank classical groups in string theory, gauge theory and matrix models