how exactly does it work and how is it useful in qm?
All these questions you keep asking are found either on wikipedia or in any textbook on the subject.
Also, its sort of pointless to explain what nonabelian anomalies are if you don't know what diagonalization means and is used for. There's a seperation of about 4 years worth of undergrad material before the latter makes sense.
So if you truly are interested in all this physics material, I highly recommend starting from the beginning and working your way through step by step. Otherwise its all going to be hopelessly opaque and serves no purpose other than to clutter the board up.
The stationary Schroedinger equation
[tex] H | \Psi_n \rangle = E_n|\Psi_n \rangle [/tex]..........(1)
is used to find eigenvectors [itex] | \Psi_n \rangle [/itex] and eigenvalues [itex] E_n [/itex] (allowed energy spectrum) of the Hamiltonian [itex] H [/itex]. Since Hamiltonian [itex] H [/itex] is a linear operator, it can be represented by a matrix in an appropriate basis. Then eq. (1) becomes the traditional matrix diagonalization problem.
Separate names with a comma.