Matrix quantum mechanics at a finite temperature is considered, which is equivalent to the one-dimensional compactified string field theory with vortex excitations. It is explicitly demonstrated that states transforming under nontrivial U(N) representations describe different vortex-antivortex configurations. For example, for the adjoint representation, corresponding Feynman graphs always contain two big loops wrapping around the compactified t space, which corresponds to the vortex-antivortex pair. The technique is developed to calculate the partition functions in given representations for the standard matrix oscillator, and then the procedure of their analytical continuation to the upside-down case is worked out. This procedure enables us to obtain the partition function in the presence of the vortex-antivortex pair in the double scaling limit. Using this result, we calculate the critical temperature for the Berezinski-Kosterlitz-Thouless phase transition. A possible generalization of our technique for the D + 1 dimensional matrix model is sketched out.