If your density matrix is ρ = Σ|i>pij<j| in the original basis with states |i> and probabilities pij, and the new basis states are |α>, then expand the old basis in terms of the new: |i> = Σ|α><α|i>. This gives you ρ = ΣΣΣ|α><α|i>pij<j|β><β| = Σ|α>Pαβ<β| where Pαβ = ΣΣ<α|i>pij<j|β>.

By using the matrix identities:
[tex]
\mathbf{\rho} \cdot \mathbf{U} = \mathbf{U} \cdot \mathbf{\Lambda}
[/tex]
where U is a unitary matrix ([itex]\mathbf{U}^{\dagger} \cdot \mathbf{U} = \mathbf{U} \cdot \mathbf{U}^{\dagger} = 1[/itex]) whose columns are the normalized eigenvectors of the density matrix, and [itex]\Lambda[/itex] is a diagonal matrix with the corresponding eigenvalues along the main diagonal.