I am reading Theorem 2 from Atkin-Lehner's Hecke operators on $\Gamma_0(m)$. Let $u=(u_1(\tau),u_2(\tau),..,u_n(\tau))$ be an orthonormal basis for the space of cusp forms on $\Gamma_0(m)$ with weight $k$. Let $A_p$ denote the matrix associated with each Hecke operator $T_p$ with respect to $u$. Then we take $A$ to be a unitary matrix which can simultaneously diagonalise all $A_p.$
Then how does it follow that each element of the new basis $f=Au$ is an eigenfunction of all the operators $T_p$?
My attempt: Need $T_p(f_i) = \lambda_pf_i$ for all $p$. Since $A$ can simultaneously diagonalise all $A_p,$ I have $A_p = ADA^{-1}$ ($D$ is diagonal). Then, right multiply with $Au$ leading to $A_p(Au) = ADA^{-1}Au, = ADu. $ I can't proceed further.
Will this construction of eigenforms work for any set of operators?
Let me know if any more clarifications are needed.