# Unimodular transformation matrix of LLL algorithm

I also asked this question on sage-support.

I have a matrix `M1`

with integer entries with 90 rows and 6 columns. After applying the LLL algorithm to M1, I get `M2 = M1.LLL()`

. I want to get the corresponding unimodular transformation matrix `T`

such that `T * M1 = M2`

.

We can find `T`

by `T = M2 * M1.pseudoinverse()`

or `T = M1.solve_left(M2)`

, but determinant of `T`

becomes `0`

i.e., `T.det()`

equals `0`

. I want `T.det()`

to equal `1`

.

Providing this is the object of

In the meantime, explore fpylll to figure out how to do it.