1: \begin{abstract}
2: The discrete Toda lattice preserves the eigenvalues of tridiagonal matrices, and convergence of dependent variables to the eigenvalues can be proved under appropriate conditions.
3: We show that the ultradiscrete Toda lattice preserves invariant factors of a certain bidiagonal matrix over a principal ideal domain,
4: and prove convergence of dependent variables to invariant factors using properties of box and ball system.
5: Using this fact, we present a new method for computing the Smith normal form of a given matrix.
6: \end{abstract}
7: