There are $512$ matrix due to $2^9$. Is there a way instead of by hand to find how many of the matrix may equal $1, 2, 3....,$ etc. with the entries being $1$ and $-1$?
Thanks in adavance.
There are $512$ matrix due to $2^9$. Is there a way instead of by hand to find how many of the matrix may equal $1, 2, 3....,$ etc. with the entries being $1$ and $-1$?
Thanks in adavance.
On
The theorems regarding the determinants of matrices can be applied to cut down the amount of direct counting considerably. The greatest effect comes from the fact that a matrix with identical rows or columns, or in which one row or column is a non-zero multiple of another, has a determinant of zero; this greatly reduces the number of configurations of elements that need to be considered. A further significant reduction is possible from the fact that $ \ \det \mathbf{A}^T \ = \ \det \mathbf{A} \ $ ; once a distinct configuration has its determinant evaluated, we also know the determinant for its transpose.
A property which reduces the amount of calculation to find the determinants of matrices of related configurations is that multiplying one row or column by a constant multiplies the determinant by that constant. So multiplying any single row or column by (-1) to "flip" the signs will gives us $ \ -\det \mathbf{A} \ . $ Multiplying two rows by (-1) then leaves the original determinant unchanged [since $ \ (-1)^2 \ = \ 1 \ $ ] , and multiplying all three rows by (-1) will produce the "negative" of the original matrix, for which $ \ \det (-\mathbf{A}) \ = \ (-1)^3 \ \det \mathbf{A} \ = \ -\det \mathbf{A} \ $ .
We don't need to go further than positioning four (-1) entries, since a matrix with five such entries can be produced by taking the "negative" of a "four-entry" matrix. We must have at least two (-1) entries in order to avoid duplication of rows or columns.
The types of matrices which are non-singular would then appear to be the following. To reduce the difficulty in reading these, I mark the location of a (-1) entry by a cross (the rest of the entries are the "1"s ; each prototype shown represents a set whose members only differ by row or column exchanges or transposition.
One (-1) entry in two rows, none in one -- $ \quad \quad \quad \quad \quad \ \left[\begin{array}{cc}\times&-&-\\-&\times&-\\-&-&-\end{array}\right] $ ;
one (-1) entry in each row -- $ \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \ \ \ \left[\begin{array}{cc}\times&-&-\\-&\times&-\\-&-&\times\end{array}\right] $ ; and
two (-1) entries in one row, one in one, none in one -- $ \ \left[\begin{array}{cc}\times&\times&-\\\times&-&-\\-&-&-\end{array}\right] $ .
[Note -- In the process of preparing this post, I found a category which in fact can be bypassed as singular, two (-1) entries in one row, one in two rows -- $ \ \ \ \left[\begin{array}{cc}\times&\times&-\\\times&-&-\\-&-&\times\end{array}\right] \ \ $ . Since the entries are exclusively +1 or -1 , the first and third rows are negatives of one another.]
As an illustration, we have determinants of the third type above,
$$ \left|\begin{array}{cc} \ -1&1&-1\\-1&-1&-1\\-1&1&1 \ \end{array}\right| \ \ = \ -\left|\begin{array}{cc} \ 1&-1&1\\1&1&1\\1&-1&-1 \ \end{array}\right| \ \ = \ +\left|\begin{array}{cc} \ 1&-1&-1\\1&1&1\\1&-1&1 \ \end{array}\right| $$
$$ = \ -\left|\begin{array}{cc} \ 1&-1&-1\\1&-1&1\\1&1&1 \ \end{array}\right| \ \ = \ +\left|\begin{array}{cc} \ -1&1&-1\\-1&1&1\\1&1&1 \ \end{array}\right| \ \ = \ -\left|\begin{array}{cc} \ -1&-1&1\\-1&1&1\\1&1&1 \ \end{array}\right| \ \ , $$
having multiplied the first determinant by (-1), then exchanging the first and third rows, the second and third rows, the first and second columns, and finally the second and third columns, showing the relations among these. (There are, of course, other row/column operations which could be performed to pass from the first to the last more directly.) The value of the first determinant is +4 .
This indicates that non-singular $ \ 3 \times 3 \ $ matrices of the sort described in this question are rather in the minority.
Start by considering matrices that have all elements in the first row and column equal to $1.$ There are only $2^4=16$ of these, and it's easy to determine which of these are singular. Only a handful of matrices will remain. Then work out what the effect is of negating selected rows and/or columns.
By the way, it is not hard to prove that the determinant of an $n$-by-$n$ matrix with elements $\pm1$ is divisible by $2^{n-1}.$
Added: Call a matrix normalized if all elements in the first row and column equal $1.$ There are $2^4=16$ normalized matrices. Call two matrices equivalent if one can be transformed into the other be suitable negations of rows and columns. Equivalent matrices have the same determinant up to a sign. Every matrix is equivalent to a normalized matrix.
Each equivalence class has $2^5=32$ members. It's $2^5$ because, although there are six row or column negations that can be performed, performing a given set of negations results in the same matrix as performing the complementary set of negations. E.g., negating row $1,$ column $1,$ and column $3$ results in the same matrix as negating row $2,$ row $3,$ and column $2.$
If $d$ is the magnitude of the determinant of matrices in an equivalence class, then either $d=0,$ or the class has $16$ members with determinant $d$ and $16$ members with determinant $-d.$
To enumerate the equivalence classes, enumerate the normalized matrices, $$ \begin{bmatrix}1 & 1 & 1\\ 1 & a & b\\ 1 & c & d\end{bmatrix}. $$ A normalized matrix is singular if $a=b=1$ or $c=d=1$ or if $a=c$ and $b=d.$ The number of singular normalized matrices is therefore $10.$ The remaining six normalized matrices all have determinant $\pm4.$ They can, in fact, all be obtained from one another using the operations of permuting rows, permuting columns, negating rows, and negating columns.
Hence there are $6\cdot16=96$ matrices with determinant $4,$ another $96$ with determinant $-4,$ and $10\cdot32=320$ with determinant $0$.