# how to count the number of integer matrices with inverse equal to transpose?

let S be set of all $3\times 3$ matrices with integer entries such that the product of A with its transpose is identity matrix. then cardinality of S is $48$.

how to look for this? i count them but got only $24$ matrices.

• An aside: when viewed as linear transformations of $\Bbb{R}^3$ those 48 orthogonal (=distance preserving) transformations are exactly the symmetries of the cube $[-1,1]^3$. I took the liberty of editing your title with a view of making it more "searchable" – Jyrki Lahtonen Feb 18 '16 at 7:05

$AA^t=1$ translates into two conditions:

• All columns have length $1$.
• Any two columns are orthogonal.

The first condition is really restrictive, since the entries are integers. Thus any column has one $\pm 1$ and two $0$'s. The second condition say that two $\pm 1$'s cannnot occur in the same row.

You can freely choose the permutation in $S_3$ given by the position of the $\pm 1$'s and you can freely choose the $3$ signs.

Hence you have $6 \cdot 2^3 = 48$ choices.

• What will be the general answer for $n \times n$ matrices? Will it be $2^n \cdot n! ?$ – SARTHAK GUPTA Dec 6 '19 at 18:52

Note that $S$ consists of all matrices having orthonormal rows. A row of length one has only one non-zero entry which is equal to $-1$ or $+1$. This gives you 6 choices for the first row. The second has to be perpendicular to the first. This leaves you 4 choices. For the last row you have only one choice left to fill in a non-zero entry, which gives two choices. In total you hence have $6 \cdot 4 \cdot 2 = 48$ choices.