Harmonic Oscillators and Two-by‑two Matrices in Symmetry Problems in Physics