It is fascinating to study $n\times n$ matrices with integer entries whose row vectors are orthogonal and all have the same magnitude, $m$ (the column vectors will then be orthogonal and have magnitude $m$ as well).

For example, consider $A=\begin{bmatrix}1 & 2\\ -2 & 1\end{bmatrix}$ with $m=\sqrt{5},$ or $B=\begin{bmatrix}2 & 2 & 1\\ -2 & 1 &2\\ 1 & -2 & 2\end{bmatrix}$ with $m=3.$

In particular, it is interesting to investigate which values of $m$ are possible for a given size of the matrix. Let's explore this issue with two True/False questions.

**
True or False?
**

- (I) In the case $n=9,$ the possible values of $m$ are all non-negative integers.
- (II) In the case $n=8,$ the possible values of $m$ are the square roots of all non-negative integers.

Bonus Question: Do all odd numbers "behave like" 9 in (I), and do all even numbers behave like 8 in (II)?

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

If $n$ is odd (for example, $n=9$ ) and $A$ is of the required form, having orthogonal rows of the same magnitude, $m$ , then $AA^T=qI_n$ where $q=m^2\in \mathbb{Z}$ . Thus $(\det A)^2=q^n$ and $|\det A|=q^{n/2}$ .Since $q^{n/2}$ is an integer, $q$ will be a perfect square, so that $m=\sqrt{q}$ is an integer, as claimed.

If $n=4$ and $q$ is any positive integer, then we can write $q=a^2+b^2+c^2+d^2$ for integers $a,b,c,d$ , by Lagrange's four-square theorem. Consider the matrix

$B=\begin{bmatrix} a&b&c&d\\-b&a&-d&c\\-c&d&a&-b\\-d&-c&b&a \end{bmatrix}$

that can be used to define the quaternion $a+bi+cj+dk$ . Note that $B$ has orthogonal rows with a common magnitude of $m=\sqrt{q}$ .

If $n=4m$ (for example, $n=8$ ), we can form a matrix $A$ that has $m$ $B$ 's along the diagonal and 0's elsewhere.