We find the unitary operator for diagonalizing the Hamiltonian of a tr
iatomic linear molecule. The unitary operator is expressed in a coordi
nate representation that brings convenience for deriving the density m
atrix rho(x(1),x(2),x(3);x(1)'x(2)'x(3)',beta). The unitary transforma
tion approach is simple because the derivation can be reduced to the c
alculation of two independent harmonic-oscillator density matrices and
one free-particle density matrix. The average of the potential energy
and the kinetic of the molecule is calculated by using the density ma
trix.