Let $T: H \to H$ be a self adjoint linear operator on the unitary space $H=\mathbb{C}^n$.
Assume that the operator $T$ has $n$ different eigenvalues $$ \lambda_1 < \lambda_2 <...<\lambda_n$$.
Then $T$ has an orthonormal set of $n$ eigenvectors $$ x_1, x_2 , ...,x_n$$
This is a basis for $H$ so that every $x \in H$ has unique representation $$x=\sum^n _{j=1} \gamma_j x_j$$.
In this unique representation, what is $\gamma$?
If $x=\sum_{j=1}^n\gamma_jx_j$ and $(\cdot,\cdot)$ is the inner product, then $$(x,x_i)=\Big(\sum_{j=1}^n\gamma_jx_j,x_i\Big)=\sum_{j=1}^n\gamma_j(x_j,x_i)=\gamma_i$$
Therefore $\gamma_i=(x,x_i)$ for all $i$. This is a general property of orthonormal bases.