The problem of computing the free distance of TCM signal sequence has been discussed, a new algorithm--the matrix algorithm, is proposed, and the estimation problem of state transition number required for computing the free distance of TCM signal sequence has been theoretically solved. The matrix algorithm is derived from the Viterbi algorithm, and is an implementation of Viterbi algorithm in the form of matrix. Compared with other algorithms, the matrix algorithm gains two advantages: (1) The explicit solution, and its relatively less complexity. (2) more flexible ability to the signal space distance variation. As some examples, the results of some TCM signal sequence on additive Gaussian white noise(AWGN) channel and fading channels have been presented.