# Generating a random Eisenstein integer matrix whose inverse has Eisenstein integer entries

Thanks to a question I previously asked, I realized that a Gaussian integer matrix should have a determinant of $\pm 1$ or $\pm i$ for it to have an Gaussian integer inverse. From that, I gather that if one considers an Eisenstein integer matrix, it should have a determinant of $\pm 1$, $\pm \exp(\pm 2\pi i/3)$. For the Gaussian integer case at least, I can generate random Gaussian integer matrices through the reduction to Hermite normal form.

I now ask if there is an algorithm for generating a random Eisenstein integer matrix whose inverse has Eisenstein integer entries.

-
Depends a bit on what you mean by "random". –  Gerry Myerson Jul 8 '11 at 4:38
(For Gerry; mods, please transfer this into the comments section if you can) I'm not entirely sure what probability distribution do these special Eisenstein integer matrices follow, so I didn't specify. Maybe an answerer can help me out here? –  gorilla Jul 8 '11 at 4:52
I think the point is that there is no particular distinguished probability distribution, just as there is none on the integers. –  Robert Israel Jul 8 '11 at 6:41
add comment

## 1 Answer

As Gerry pointed out, your question is a bit imprecise. However, if you simply want to generate large sets of invertible matrices with entries in the prescribed ring (Gaussian integers, or Eisensteinian integers) here's what you can do.

1) Start with the identity matrix.

2) Perform a number (one or more) of elementary row operations of the familiar types: A) swap two rows, B) add a scalar multiple of one row to another, C) multiply a row with a scalar. Warning: contrary to what you learned in a linear algebra class you have to be a little bit careful here: For a row operation of type B the scalar needs to be an element of your ring. For a row operation of type C the scalar needs to be a unit of your ring (only finitely many choices for both of these rings).

3) Either exit or perform a number of column operations subject to the same constraints.

4) Either exit or go to step two.

This is a bit vague in the sense that I don't know what to say about the resulting distribution. If you draw your scalar multipliers from some distribution, may be something can be said. Depends on your needs, whether this is useful or not. I use something like this for the purposes of generating exam problems for my courses. Works the same with the rational integers also :-)

-
add comment