 Such equilibrium ensembles are a diagonal matrix in the orthogonal basis of states that simultaneously diagonalize each conserved variable.In bra–ket notation, the density matrix is
where the , indexed by , are the elements of a complete and orthogonal basis.