Eigenenergies and eigenkets given the Hamiltonian For a two level system the Hamiltonian is:
$$
H=a(|1\rangle \langle1|-|2\rangle\langle2|+|1\rangle\langle2|+|2\rangle\langle1|)
$$
where $a$ is a number with the dimension of an energy. 
I need to find the energy eigenvalues and the corresponding eigenkets (as a combination of $|1\rangle$ and $|2\rangle$).
I used:
$$
H |ψ\rangle=E|ψ\rangle
$$
And using the fact that : $|a\rangle = \sum_i c_i |a_i\rangle$
I wrote $|ψ\rangle$ as a combination of the two system kets $|ψ\rangle=c_1|1\rangle + c_2|2\rangle$ ($c_1$,$c_2$ are complex numbers).
so
$$\begin{aligned}
H|ψ\rangle =& a(|1\rangle\langle1|-|2\rangle\langle2|+|1\rangle\langle2|+|2\rangle\langle1|)\cdot(c_1|1\rangle+c_2|2\rangle)
      \\   =& a(c1|1\rangle-c_2|2\rangle+c_2|1\rangle c_1|2\rangle)=a ((c1+c2)|1\rangle+(c1-c2)|2\rangle)
      \\   =& E|ψ\rangle.
\end{aligned}$$
How do I continue?
 A: Finding eigenvalues of matrices is a straightforward process, so to solve this problem we'll begin by writing the Hamiltonian in a matrix form in the basis of $|1\rangle$ and $|2\rangle$.
To find the matrix form of any linear transformation in linear algebra, we can apply the transformation to the basis vectors. In our case, we find $H|1\rangle$ and $H|2\rangle$:
$$\begin{aligned}
H|1\rangle &= a(|1\rangle \langle1|-|2\rangle\langle2|+|1\rangle\langle2|+|2\rangle\langle1|)|1\rangle \\
&= a(|1\rangle \langle1|1\rangle -|2\rangle\langle2|1\rangle + |1\rangle\langle2|1\rangle+|2\rangle\langle1|1\rangle)
\end{aligned}$$
Since $|1\rangle$ and $|2\rangle$ are orthonormal basis vectors, we know that the inner product of two different vectors is 0 and the same vectors is 1. We can use this fact to greatly simplify the above:
$$a(|1\rangle \langle1|1\rangle -|2\rangle\langle2|1\rangle + |1\rangle\langle2|1\rangle+|2\rangle\langle1|1\rangle) = a(|1\rangle + |2\rangle)$$
A similar process reveals that
$$H|2\rangle = a(|1\rangle - |2\rangle) $$
Now, we can write the Hamiltonian as a matrix in the basis provided:
$$H = a \begin{bmatrix}
1 & 1 \\
1 & -1
\end{bmatrix}$$
Find the eigenvectors of this matrix to determine the eigenkets.
(By the way, you may notice some parallels between the given Hamiltonian expression and calculated Hamiltonian matrix. Think about how this could be used to expedite the process of finding the Hamiltonian matrix for problems in this format.)
A: $$\begin{aligned}
H|ψ\rangle =...=a ((c1+c2)|1\rangle+(c1-c2)|2\rangle)=& E|ψ\rangle.
\end{aligned}$$
Now you just have to remember how you have defined $|ψ\rangle$. Apply this definition in the equation above and knowing that $|1\rangle$ and $|2\rangle$ are independent, you can easily find $c_i$.
