Flipped matrix ordering for cavity/exciton modes