Degenerate perturbation theory is an extension of standard perturbation theory which allows us to handle systems where one or more states of the system have non-distinct energies. Normal perturbation theory fails in these cases because the denominators of the expressions for the first-order corrected wave function and for the second-order corrected energy go to zero.
For example, as stated by Chris in his writeup on non-degenerate perturbation, the second-order correction to energy Gn can be found:
Gn = -sum(|<r|H'|n>|²/(εr - εn), r ≠ n
where H' is the Hamiltonian operator that describes the perturbation on the system, εl is the energy for a given state l, and r and n are wave functions for the unperturbed system.
***If r is equal to n, this expression blows up.***
In order to circumvent such difficulties, we need to turn to an alternate treatment of the mathematics behind quantum mechanics by introducing the matrix approach. In this treatment, any operator O can be considered as a matrix, where the elements Oij of the matrix are defined:
Oij = <i|O|j>
As such, we can consider the Hamiltonian for the system as a matrix. The way to get out of the difficulty associated with the denominators in these expressions blowing up is to cast the entire problem into a different basis set by diagonalizing the matrix of the perturbing Hamiltonian; in other words, we choose to manipulate the expression for the Hamiltonian so that <r|H'|n> goes to zero for all cases r ≠ n. One can then apply the standard equation for the first-order energy correction, noting that the change in energy will apply to the energy states described by the new basis set. (In general, the new basis will consist of some linear superposition of the existing state vectors of the original system.)