Transfer matrix in plane-rotator model