|a〉 and |b〉 are eigenstates of a Hermitian operator A with eigenvalues a and b, a ≠ b. The Hamiltonian operator is

    Ĥ = |a〉 δ 〈a| + |b〉 δ 〈b|, with δ a real number.

a) The eigenstates of the Hamiltonian can be determined by diagonalizing the Hamiltonian operator's matrix representation. In general, 

Ĥ ≐
    ⎛ 〈a|Ĥ|a〉 〈a|Ĥ|b〉 ⎞
    ⎝ 〈b|Ĥ|a〉 〈b|Ĥ|b〉 ⎠.

Calculating the individual components:

    〈a|Ĥ|a〉 = 〈a|(|a〉 δ 〈a| + |b〉 δ 〈b|)|a〉 =

    〈a|Ĥ|a〉 = 〈a|a〉 δ 〈a|a〉 + 〈a|b〉 δ 〈b|a〉 =

    〈a|Ĥ|a〉 = δ(1 + 〈a|b〉〈b|a〉),

and because H is a hermitian operator, 〈a|b〉 = 〈b|a〉, so

    〈a|Ĥ|a〉 = δ(1 + |〈a|b〉|²);

    〈a|Ĥ|b〉 = 〈a|a〉 δ 〈a|b〉 + 〈a|b〉 δ 〈b|b〉 =

    〈a|Ĥ|b〉 = δ (〈a|b〉 + 〈a|b〉) = δ 2〈a|b〉;

because of the hermition property, 
    〈b|Ĥ|a〉 = 〈a|Ĥ|b〉 = δ 2〈a|b〉; 

finally,
    
    〈b|Ĥ|b〉 = 〈b|(|a〉 δ 〈a| + |b〉 δ 〈b|)|b〉 =

    〈b|Ĥ|b〉 = 〈b|a〉 δ 〈a|b〉 + 〈b|b〉 δ 〈b|b〉 =

    〈b|Ĥ|b〉 = δ(〈b|a〉〈a|b〉 + 1),

    〈b|Ĥ|b〉 = δ(1 + |〈a|b〉|²).

So, the Hamiltonian operator Ĥ ≐

    δ ⎛ 1 + |〈a|b〉|²  2〈a|b〉       ⎞ 
      ⎝ 2〈a|b〉        1 + |〈a|b〉|² ⎠.

The eigenstates, which I will call |1〉 and |2〉 can be obtained by diagonalizing the Hamiltonian matrix. The first eigenvalue equations are

    Ĥ|1〉 = E₁|1〉 and Ĥ|2〉 = E₂|2〉, with the eigenstates represented by the vector matrices, respectively,

    ⎛α₁⎞     ⎛α₂⎞
    ⎝β₁⎠ and ⎝β₂⎠.

    δ ⎛ 1 + |〈a|b〉|²  2〈a|b〉       ⎞ ⎛α₁⎞ = E₁ ⎛α₁⎞
      ⎝ 2〈a|b〉        1 + |〈a|b〉|² ⎠ ⎝β₁⎠      ⎝β₁⎠.

This gives the equation α₁ + α₁|〈a|b〉|² + 2β₁〈a|b〉 = E₁α₁, and therefore the ratio between α₁ and β₁,

    ͟β͟₁͟ = ͟E͟₁͟ ͟-͟ ͟1͟ ͟-͟ ͟|͟〈͟a͟|͟b͟〉͟|͟²͟, or
    α₁      2〈a|b〉

    β₁ = ͟α͟₁͟(͟E͟₁͟ ͟-͟ ͟1͟ ͟-͟ ͟|͟〈͟a͟|͟b͟〉͟|͟²͟)͟
             2〈a|b〉

Using the normalization condition, the values of each constant can be obtained. Plugging the value for α₁ into the equation reveals a quadratic equation.



    |α₁|² + |β₁|² = 1, so

    |α₁|² + | ͟α͟₁͟(͟E͟₁͟ ͟-͟ ͟1͟ ͟-͟ ͟|͟〈͟a͟|͟b͟〉͟|͟²͟)͟ |² = 1.
            |     2〈a|b〉            |





    α₁(1 - E₁) + 2β₁〈a|b〉 + α₁|〈a|b〉|² = 0 and
           _________
    α₁ = ±√1 - |β₁|², so
      _________                         _________
    ±√̅1 - |β₁|² (1 - E₁) + 2β₁〈a|b〉 + ±√1 - |β₁|² |〈a|b〉|² = 0.

    The quadratic formula therefore says that