Is the spectral decomposition of self-adjoint compact operators unique? Given a compact, self-adjoint operator $T$ on a Hilbert space $H$, then there is the Spectral Theorem which says that $T=\sum_i \lambda_i P_i$ where the sum is over the number of eigenvalues of $T$, which are countable and $P_i$ are  finite-rank operators. 
Now, an almost immediate corollary is that there exist $\{\mu_n\} \subset \mathbb{R}, \{e_n\}$ orthonormal base for $N$(ker$T$) (the orthogonal space of the ker) such that for every $h\in H$, $Th= \sum_n \mu_n (h,e_n)e_n$.
Now, my question is: these two representations of $T$ are unique under change of orthonormal basis? The first one actuallu doesn't require the choice of a basis so I think that it is unique, but the second one?
Also is there a relationship between the second representation of $T$ and its eigenvalues? I.e. can one recover the eigenvalues from that given representation? 
 A: I don't know what "unique under change of orthonormal basis" means but here is what we can say about uniqueness.  If $T$ is a compact self-adjoint operator, then there exists a unique set of pairs $\{(\lambda_i,P_i)\}_{i}$ such that each $\lambda_i$ is a nonzero scalar, the $\lambda_i$ are all distinct, each $P_i$ is a nonzero projection operator, the $P_i$ are pairwise orthogonal, and $$T=\sum_i \lambda_iP_i.$$  Moreover, the $\lambda_i$ are exactly the nonzero eigenvalues of $T$, $P_i$ is the projection onto the eigenspace of $T$ with eigenvalue $\lambda_i$, and each $P_i$ has finite rank.
For the second representation $$Th=\sum_n \mu_n (h,e_n)e_n,$$ the only uniqueness statement we can say is that coefficients $\mu_n$ are uniquely determined (up to permutation) by $T$.  Indeed, these coefficients $\mu_n$ are none other than the eigenvalues of $T$, listed with multiplicity.  This formula should not look mysterious at all: if we were in a finite-dimensional space and $\{e_n\}$ was the standard (finite) basis, this would literally just be saying that $T$ is the diagonal matrix with the $\mu_n$ as the diagonal entries.  So this formula is saying that there exists an orthonormal basis in which $T$ is a diagonal matrix.  As usual for diagonal matrices, the diagonal entries are just the eigenvalues (with multiplicity).  The orthonormal basis $\{e_n\}$ with respect to which $T$ is diagonal is not unique, just as a diagonalizable matrix does not have a unique basis of eigenvectors.
To relate the two representations, note that if $e_{i_1},\dots,e_{i_k}$ is an orthonormal basis for the eigenspace of $T$ with eigenvalue $\lambda_i$, then the projection $P_i$ onto that eigenspace is just $$P_ih=\sum_{j=1}^k (h,e_{i_j})e_{i_j}.$$  The second representation is obtained from the first representation by just picking an orthonormal basis for each eigenspace in this way and then using this formula for $P_i$.  The non-uniqueness of the second representation comes from the fact that there are many different orthonormal bases for each eigenspace.
