Matrices Count

How many 4 × 4 4 \times 4 matrices with entries from { 0 , 1 } \{0, 1\} have odd determinant?

20160 32767 49152 57343 65520

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.

1 solution

Mark Hennings
Jun 19, 2017

A matrix has odd determinant if and only if its determinant is congruent to 1 1 modulo 2 2 , and hence is nonzero when regarded as an element of the 2 2 -element field Z 2 \mathbb{Z}_2 .

Thus we want to know the number of nonsingular 4 × 4 4\times4 matrices over Z 2 \mathbb{Z}_2 , and this is equal to the number of bases for the 4 4 -dimensional vector space Z 2 4 \mathbb{Z}_2^4 . This number is ( 2 4 1 ) ( 2 4 2 ) ( 2 4 4 ) ( 2 4 8 ) = 20160 (2^4-1)(2^4-2)(2^4-4)(2^4-8) \; = \; \boxed{20160} since there are 2 4 1 2^4-1 choices for the first basis element, then 2 4 2 2^4-2 choices for the second basis element, and so on.

"The number of bases....." - I cant understand this part .Can u explain a little bit ?

Kushal Bose - 3 years, 11 months ago

Log in to reply

That's the plural of basis .

Calvin Lin Staff - 3 years, 11 months ago

A vector space over a field has, if finite dimensional, a basis , which is a set of vectors in the space such that every element of the space can be written uniquely as a linear combination of the elements of the basis. Have a hunt for a book on Linear Algebra, and the theory of finite-dimensional vector spaces.

Mark Hennings - 3 years, 11 months ago

Log in to reply

What is the general version of this formula ?

Kushal Bose - 3 years, 11 months ago

Log in to reply

@Kushal Bose The most general finite field contains p n p^n elements for some prime number p p and some integer n n . You are asking for the number of bases for an N N dimensional space over the field with p n p^n elements.

The first element of the basis must be a nonzero vector. There are p n N 1 p^{nN}-1 of these.

The second element of the basis cannot belong to the span of the first vector. There are p n p^n vectors in that span, so there are p n N p n p^{nN} - p^n choices.

The third element of the basis cannot belong to the span of the first two vectors. This span contains p 2 n p^{2n} elements, so there are p n N p 2 n p^{nN} - p^{2n} choices for the third basis element.

I will leave completing the argument to you, now.

Mark Hennings - 3 years, 11 months ago

Can u suggest a good book on Linear Algebra and Finite dimensional vector spaces ???If u have a pdf can u send me ????

Kushal Bose - 3 years, 11 months ago

Amazing! I just wrote code (in Matlab) to get the answer lol XD. I'm not sure how we were suppose to do this one, but I tried considering a set of combinations, building your way up from 2x2 matrices (which had 6), but it was more tedious than I was willing to deal with. A=zeros(4,4); counter=0; for i = 0:(2^16-1) for j=0:15 A(floor(j/4)+1,j-4*floor(j/4)+1)=mod(floor(i/2^j),2); end if mod(abs(det(A)),2)==1 counter = counter + 1; end end

James Wilson - 3 years, 8 months ago

Log in to reply

Thinking about the "number of linearly independent sets of 4 vectors, IE basis" is the right way to go.

In a similar manner, we can extend this argument to Z p \mathbb{Z}_p , and calculate the number of matrices with determinant 1.

Calvin Lin Staff - 3 years, 8 months ago

Log in to reply

Oh ok, thanks. That part of linear algebra is outside my current knowledge base I'm afraid.

James Wilson - 3 years, 8 months ago

Log in to reply

@James Wilson We have an upcoming Linear Algebra course that would help you work through that.

The general case is not that much different from Mark's solution above.

  1. Can you calculate the number of matrices with a non-zero determinant? Hint: The vectors are linearly dependent.
  2. Can you create a bijection between matrices with non-zero determinant i , j i, j . Hint: Multiply the first row by i j 1 i j ^ { -1 } .
  3. Hence, conclude that there are x x matrices of determinant 1.

Calvin Lin Staff - 3 years, 8 months ago

Log in to reply

@Calvin Lin Thanks, I've been working on this since you posted it. I can't seem to make my way past step 1. However, looking at steps 2 and 3, I'm a bit confused because I know in this case there are 10,020 matrices with determinant 1, 10,020 with determinant -1, 1200 with determinant -2, 1200 with determinant 2, 60 with determinant -3, and 60 with determinant 3.

James Wilson - 3 years, 8 months ago

Log in to reply

@James Wilson To clarify, the generalized question is

How many n × n n \times n matrices are there in Z p \mathbb{Z}_p with determinant 1?

Part 1 - Do you see why there are ( p n 1 ) ( p n p ) ( p n p n 1 ) (p^n-1)(p^n-p) \ldots (p^n - p^{n-1}) matrices with a non-zero determinant?

Calvin Lin Staff - 3 years, 8 months ago

Log in to reply

@Calvin Lin Ah ok. To be honest, I have no idea. XD

James Wilson - 3 years, 8 months ago

Log in to reply

@James Wilson Think about picking the (column) vectors of a matrix, so that the vectors are linearly independent.

How many options are there for the first vector? We only have to avoid the 0 vector, so there are p n 1 p^n - 1 options.
How many options are there for the second vector? We have to avoid the span of the first vector, so there are p n p p^n - p options.
How many options are there for the third vector? We have to avoid the span of the first and second vector, so there are p n p 2 p^n - p^2 options.
\vdots
How many options are there for the last vector? We have to avoid the span of the n 1 n-1 other vectors, so there are p n p n 1 p^n - p^{n-1} options.

Hence, by the rule of product, the result follows.

Calvin Lin Staff - 3 years, 8 months ago

Log in to reply

@Calvin Lin Ok I get it now! Thanks for your help. :)

James Wilson - 3 years, 8 months ago

Log in to reply

@James Wilson I still don't understand Steps 2 and 3 for the general case though. Perhaps I'll ponder on it for a while.

James Wilson - 3 years, 8 months ago

@James Wilson Great. Figure out part 2 and 3 then.

This problem showcases the importance of thinking about linear algebra "correctly" and exploiting their multiple definitions / interpretations.

Calvin Lin Staff - 3 years, 8 months ago

Log in to reply

@Calvin Lin Okay. This will give me something to think about for a while.

James Wilson - 3 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...