Английская версия этой статьи печатается в журнале “Numerical Analysis and Applications” № 3, Vol. 19, 2026 Пусть нужно проверить, конгруэнтны ли заданные квадратные матрицы A и B. Если A и B невырождены, то к проверке можно привлечь такие полезные инструменты, как коквадраты обеих матриц. Как свести случай вырожденных A и B к невырожденному случаю? Сергейчук и Хорн в 2006 г. предложили метод, который посредством конечной последовательности конгруэнций приводит заданную вырожденную матрицу A к виду прямой суммы невырожденной подматрицы и одной или нескольких нильпотентных жордановых клеток. Эти клетки составляют сингулярную часть канонической формы матрицы A относительно конгруэнций. Их удаление из A и дает искомый способ замены входной вырожденной матрицы невырожденной подматрицей меньшего порядка. Метод Сергейчука-Хорна не был реализован авторами как работающая процедура. В данной статье описана наша реализация этого метода в форме алгоритма для рациональных матриц или же комплексных матриц, элементами которых являются рациональные гауссовы числа. Алгоритм использует безошибочную арифметику рациональных чисел, предоставляемую пользователям вычислительной среды Matlab. Работа алгоритма проиллюстрирована двумя численными примерами. Suppose one needs to check whether given square matrices A and B are congruent. If A and B are nonsingular, one can use such useful instruments as the cosquares of both matrices. How can one reduce the case of singular A and B to a nonsingular one? Sergeichuk and Horn in 2006 proposed a method that brings a given singular matrix A by a finite sequence of congruences to a direct sum of a nonsingular submatrix and one or several nilpotent Jordan blocks. The blocks constitute the singular part of the canonical form of A with respect to congruences. Removing them from A yields the desired method that replaces the input singular matrix by a nonsingular submatrix of smaller order. The method of Horn-Sergeichuk was not implemented by its authors as a working procedure. In this paper, we describe our implementation of this method in the form of an algorithm for rational matrices or complex matrices whose entries are rational Gaussian numbers. The algorithm is based on the error-free arithmetic of rational numbers, which is provided to the users of the computational environment Matlab. The performance of the algorithm is illustrated by two numerical examples.