Abstract—A matrix is said to be unitoid if it can be brought to diagonal form by a congruence transformation.We say that an algorithm is rational if it is finite and uses arithmetic operations only. There exist rational methods designed for checking the congruence of particular classes of unitoid matrices, for example, Hermitian, accretive, or dissipative matrices.We propose a rational algorithm for checking the congruence of general unitoid matrices. The algorithm is heuristic in the sense that the user is required to set values of two integral parameters, M and N. The choice of these values depends on the available a priori information about the proximity of neighboring canonical angles of the matrices being checked.