In accelerator physics where we study/control the electron beam in the storage ring, we describe magnetic elements with matrices and have some math and terminology to describe the optics (e.g. beta functions or Twiss parameters, emittance, etc). The electron beam produces a photon beam that then goes down the beamline. I understand one can use a ray tracing code to follow the photons through mirrors, CRL's etc. And one talks of focusing optics and other optics. But is there a commonly used matrix formalism to describe the linear optics of beamlines? Can someone point me to a reference?