Text this: Betatron coupling: Merging Hamiltonian and matrix approaches