Count the $ntimes n$ binary matrices with odd/even determinant.












0












$begingroup$


To be specific :
How many $4times4$ matrices with entries from $0$, $1$ have odd determinant?



P.S : Please do post comment/answer by fully reading it first and which satisfies what I asked for which I cleared at my best possible.



Approach :
I didn't go for combinatorial approach as it was a multiple choice question .
So what i thought of is :

Consider Half of them are even and remaining are odd.
Total is $2^{4times 4}$ so half would be $65536/2$ hence 2 of the options i have eliminated.
Now, One option was "20160" and other was "32767" but reason i choose 1st option because there are some matrices with "0" determinant so it wont be "32767" , actually less than that so i go for "20160" .



But though I got correct answer , i wasn't satisfied by own intuition so tried it for $2times 2$ matrix.
What I found is "10" zero matrices , "6" odd and "0" even matrices.
( I didn't considered "0" in the category of even just to separate it from odd/even)



With the $2times 2$ matrix it didn't satisfy my above intuition of dividing into half.
So my question is :




  1. Whether I got the correct answer by luck?


  2. Where my intuition gone wrong?


  3. How to proceed with generalisation?











share|cite|improve this question











$endgroup$








  • 3




    $begingroup$
    The ones with odd determinant are the ones that are nonsingular when considered as matrices over the field of two elements, and there is a standard way to count those.
    $endgroup$
    – Gerry Myerson
    Nov 29 '18 at 6:48










  • $begingroup$
    Your comment didn't clear my doubt but i didn't go for standard way as this question need to be solve in 3 min and max 5 min. More than that wont be worth. And the standard method i found bit difficult. Any suggestions for solving this would be appreciated.
    $endgroup$
    – CHETAN RAJPUT
    Nov 29 '18 at 6:58












  • $begingroup$
    Look at math.stackexchange.com/questions/1189346/…
    $endgroup$
    – Robert Z
    Nov 29 '18 at 7:02






  • 1




    $begingroup$
    It doesn't take very long to count the number of $4 times 4$ invertible matrices over a field of size $p$.
    $endgroup$
    – Joppy
    Nov 29 '18 at 7:16










  • $begingroup$
    how its related ? And that link didn't explain it well i guess but though thanx for sharing. Please answer the query if possible as its frequently asked in exams.
    $endgroup$
    – CHETAN RAJPUT
    Nov 29 '18 at 7:18
















0












$begingroup$


To be specific :
How many $4times4$ matrices with entries from $0$, $1$ have odd determinant?



P.S : Please do post comment/answer by fully reading it first and which satisfies what I asked for which I cleared at my best possible.



Approach :
I didn't go for combinatorial approach as it was a multiple choice question .
So what i thought of is :

Consider Half of them are even and remaining are odd.
Total is $2^{4times 4}$ so half would be $65536/2$ hence 2 of the options i have eliminated.
Now, One option was "20160" and other was "32767" but reason i choose 1st option because there are some matrices with "0" determinant so it wont be "32767" , actually less than that so i go for "20160" .



But though I got correct answer , i wasn't satisfied by own intuition so tried it for $2times 2$ matrix.
What I found is "10" zero matrices , "6" odd and "0" even matrices.
( I didn't considered "0" in the category of even just to separate it from odd/even)



With the $2times 2$ matrix it didn't satisfy my above intuition of dividing into half.
So my question is :




  1. Whether I got the correct answer by luck?


  2. Where my intuition gone wrong?


  3. How to proceed with generalisation?











share|cite|improve this question











$endgroup$








  • 3




    $begingroup$
    The ones with odd determinant are the ones that are nonsingular when considered as matrices over the field of two elements, and there is a standard way to count those.
    $endgroup$
    – Gerry Myerson
    Nov 29 '18 at 6:48










  • $begingroup$
    Your comment didn't clear my doubt but i didn't go for standard way as this question need to be solve in 3 min and max 5 min. More than that wont be worth. And the standard method i found bit difficult. Any suggestions for solving this would be appreciated.
    $endgroup$
    – CHETAN RAJPUT
    Nov 29 '18 at 6:58












  • $begingroup$
    Look at math.stackexchange.com/questions/1189346/…
    $endgroup$
    – Robert Z
    Nov 29 '18 at 7:02






  • 1




    $begingroup$
    It doesn't take very long to count the number of $4 times 4$ invertible matrices over a field of size $p$.
    $endgroup$
    – Joppy
    Nov 29 '18 at 7:16










  • $begingroup$
    how its related ? And that link didn't explain it well i guess but though thanx for sharing. Please answer the query if possible as its frequently asked in exams.
    $endgroup$
    – CHETAN RAJPUT
    Nov 29 '18 at 7:18














0












0








0





$begingroup$


To be specific :
How many $4times4$ matrices with entries from $0$, $1$ have odd determinant?



P.S : Please do post comment/answer by fully reading it first and which satisfies what I asked for which I cleared at my best possible.



Approach :
I didn't go for combinatorial approach as it was a multiple choice question .
So what i thought of is :

Consider Half of them are even and remaining are odd.
Total is $2^{4times 4}$ so half would be $65536/2$ hence 2 of the options i have eliminated.
Now, One option was "20160" and other was "32767" but reason i choose 1st option because there are some matrices with "0" determinant so it wont be "32767" , actually less than that so i go for "20160" .



But though I got correct answer , i wasn't satisfied by own intuition so tried it for $2times 2$ matrix.
What I found is "10" zero matrices , "6" odd and "0" even matrices.
( I didn't considered "0" in the category of even just to separate it from odd/even)



With the $2times 2$ matrix it didn't satisfy my above intuition of dividing into half.
So my question is :




  1. Whether I got the correct answer by luck?


  2. Where my intuition gone wrong?


  3. How to proceed with generalisation?











share|cite|improve this question











$endgroup$




To be specific :
How many $4times4$ matrices with entries from $0$, $1$ have odd determinant?



P.S : Please do post comment/answer by fully reading it first and which satisfies what I asked for which I cleared at my best possible.



Approach :
I didn't go for combinatorial approach as it was a multiple choice question .
So what i thought of is :

Consider Half of them are even and remaining are odd.
Total is $2^{4times 4}$ so half would be $65536/2$ hence 2 of the options i have eliminated.
Now, One option was "20160" and other was "32767" but reason i choose 1st option because there are some matrices with "0" determinant so it wont be "32767" , actually less than that so i go for "20160" .



But though I got correct answer , i wasn't satisfied by own intuition so tried it for $2times 2$ matrix.
What I found is "10" zero matrices , "6" odd and "0" even matrices.
( I didn't considered "0" in the category of even just to separate it from odd/even)



With the $2times 2$ matrix it didn't satisfy my above intuition of dividing into half.
So my question is :




  1. Whether I got the correct answer by luck?


  2. Where my intuition gone wrong?


  3. How to proceed with generalisation?








linear-algebra matrices






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 29 '18 at 7:59









Robert Z

96.3k1065136




96.3k1065136










asked Nov 29 '18 at 6:42









CHETAN RAJPUTCHETAN RAJPUT

205




205








  • 3




    $begingroup$
    The ones with odd determinant are the ones that are nonsingular when considered as matrices over the field of two elements, and there is a standard way to count those.
    $endgroup$
    – Gerry Myerson
    Nov 29 '18 at 6:48










  • $begingroup$
    Your comment didn't clear my doubt but i didn't go for standard way as this question need to be solve in 3 min and max 5 min. More than that wont be worth. And the standard method i found bit difficult. Any suggestions for solving this would be appreciated.
    $endgroup$
    – CHETAN RAJPUT
    Nov 29 '18 at 6:58












  • $begingroup$
    Look at math.stackexchange.com/questions/1189346/…
    $endgroup$
    – Robert Z
    Nov 29 '18 at 7:02






  • 1




    $begingroup$
    It doesn't take very long to count the number of $4 times 4$ invertible matrices over a field of size $p$.
    $endgroup$
    – Joppy
    Nov 29 '18 at 7:16










  • $begingroup$
    how its related ? And that link didn't explain it well i guess but though thanx for sharing. Please answer the query if possible as its frequently asked in exams.
    $endgroup$
    – CHETAN RAJPUT
    Nov 29 '18 at 7:18














  • 3




    $begingroup$
    The ones with odd determinant are the ones that are nonsingular when considered as matrices over the field of two elements, and there is a standard way to count those.
    $endgroup$
    – Gerry Myerson
    Nov 29 '18 at 6:48










  • $begingroup$
    Your comment didn't clear my doubt but i didn't go for standard way as this question need to be solve in 3 min and max 5 min. More than that wont be worth. And the standard method i found bit difficult. Any suggestions for solving this would be appreciated.
    $endgroup$
    – CHETAN RAJPUT
    Nov 29 '18 at 6:58












  • $begingroup$
    Look at math.stackexchange.com/questions/1189346/…
    $endgroup$
    – Robert Z
    Nov 29 '18 at 7:02






  • 1




    $begingroup$
    It doesn't take very long to count the number of $4 times 4$ invertible matrices over a field of size $p$.
    $endgroup$
    – Joppy
    Nov 29 '18 at 7:16










  • $begingroup$
    how its related ? And that link didn't explain it well i guess but though thanx for sharing. Please answer the query if possible as its frequently asked in exams.
    $endgroup$
    – CHETAN RAJPUT
    Nov 29 '18 at 7:18








3




3




$begingroup$
The ones with odd determinant are the ones that are nonsingular when considered as matrices over the field of two elements, and there is a standard way to count those.
$endgroup$
– Gerry Myerson
Nov 29 '18 at 6:48




$begingroup$
The ones with odd determinant are the ones that are nonsingular when considered as matrices over the field of two elements, and there is a standard way to count those.
$endgroup$
– Gerry Myerson
Nov 29 '18 at 6:48












$begingroup$
Your comment didn't clear my doubt but i didn't go for standard way as this question need to be solve in 3 min and max 5 min. More than that wont be worth. And the standard method i found bit difficult. Any suggestions for solving this would be appreciated.
$endgroup$
– CHETAN RAJPUT
Nov 29 '18 at 6:58






$begingroup$
Your comment didn't clear my doubt but i didn't go for standard way as this question need to be solve in 3 min and max 5 min. More than that wont be worth. And the standard method i found bit difficult. Any suggestions for solving this would be appreciated.
$endgroup$
– CHETAN RAJPUT
Nov 29 '18 at 6:58














$begingroup$
Look at math.stackexchange.com/questions/1189346/…
$endgroup$
– Robert Z
Nov 29 '18 at 7:02




$begingroup$
Look at math.stackexchange.com/questions/1189346/…
$endgroup$
– Robert Z
Nov 29 '18 at 7:02




1




1




$begingroup$
It doesn't take very long to count the number of $4 times 4$ invertible matrices over a field of size $p$.
$endgroup$
– Joppy
Nov 29 '18 at 7:16




$begingroup$
It doesn't take very long to count the number of $4 times 4$ invertible matrices over a field of size $p$.
$endgroup$
– Joppy
Nov 29 '18 at 7:16












$begingroup$
how its related ? And that link didn't explain it well i guess but though thanx for sharing. Please answer the query if possible as its frequently asked in exams.
$endgroup$
– CHETAN RAJPUT
Nov 29 '18 at 7:18




$begingroup$
how its related ? And that link didn't explain it well i guess but though thanx for sharing. Please answer the query if possible as its frequently asked in exams.
$endgroup$
– CHETAN RAJPUT
Nov 29 '18 at 7:18










2 Answers
2






active

oldest

votes


















2












$begingroup$

Note that in $mathbb{F}_2$ the only possible odd determinant has value $1$ and the only even determinant has value $0$, implying the matrix is not invertible and thus the columns are not linearly independent.



Now this is just a counting problem that asks: How many matrices are there in $text{M}_{4 times
4}left(mathbb{F}_2right)$
with linearly independent columns?



For the first column, there are $2^4-1$ options, all columns except the $0$ column. For the second column, the only stipulation is that it cannot be the same exact column and it cannot be $0$, and it is linearly independent. So there are $2^4-2$ possibilities. For the third, it cannot be either of those columns or the sum or $0$, so there are $2^4-4$ possibilities. And for the remaining column, any possible candidates would have to be not the sum of any combination of the three columns, for which there are $2^3$ sums (including $0$, the sum of none of them).



Thus, $(2^4-1)(2^4-2)(2^4-4)(2^4-2^3) = 20,160$.



I think your intuition would work reasonably well for fields with more elements, where the determinant would act more randomly.






share|cite|improve this answer









$endgroup$





















    2












    $begingroup$

    "Half of them are even and remaining are odd." is not correct.



    According to Consider the set of all $ntimes n$ matrices, how many of them are invertible modulo $p$., the number of $ntimes n$ invertible matrices modulo $p$ is
    $$prod_{i=0}^{n-1} (p^n- p^i).$$
    In your case $p=2$ and a matrices modulo $2$ is invertible if and only if its determinant is non-zero modulo $2$, i.e. it is odd. For $n=4$, the above formula yields
    $$(2^4-1)(2^4-2)(2^4-4)(2^4-8)=20160.$$
    On the other hand, the number of binary matrices with even determinant for $n=4$ is the cardinality of the complement:
    $$2^{16}-20160=45376.$$



    P.S. The number of binary matrices whose determinant is exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. As a reference see http://oeis.org/A046747.






    share|cite|improve this answer











    $endgroup$













    • $begingroup$
      Among 2^16 permutations , if we remove #Odd matrices , How many of them are "Zero" Det. matrices from remaining 45376 ? Just add that so that I can select your answer
      $endgroup$
      – CHETAN RAJPUT
      Nov 29 '18 at 8:01












    • $begingroup$
      I stated that because I have not considered 0 matruces in even set.
      $endgroup$
      – CHETAN RAJPUT
      Nov 29 '18 at 8:05










    • $begingroup$
      Exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. See oeis.org/A046747
      $endgroup$
      – Robert Z
      Nov 29 '18 at 8:09











    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3018289%2fcount-the-n-times-n-binary-matrices-with-odd-even-determinant%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2












    $begingroup$

    Note that in $mathbb{F}_2$ the only possible odd determinant has value $1$ and the only even determinant has value $0$, implying the matrix is not invertible and thus the columns are not linearly independent.



    Now this is just a counting problem that asks: How many matrices are there in $text{M}_{4 times
    4}left(mathbb{F}_2right)$
    with linearly independent columns?



    For the first column, there are $2^4-1$ options, all columns except the $0$ column. For the second column, the only stipulation is that it cannot be the same exact column and it cannot be $0$, and it is linearly independent. So there are $2^4-2$ possibilities. For the third, it cannot be either of those columns or the sum or $0$, so there are $2^4-4$ possibilities. And for the remaining column, any possible candidates would have to be not the sum of any combination of the three columns, for which there are $2^3$ sums (including $0$, the sum of none of them).



    Thus, $(2^4-1)(2^4-2)(2^4-4)(2^4-2^3) = 20,160$.



    I think your intuition would work reasonably well for fields with more elements, where the determinant would act more randomly.






    share|cite|improve this answer









    $endgroup$


















      2












      $begingroup$

      Note that in $mathbb{F}_2$ the only possible odd determinant has value $1$ and the only even determinant has value $0$, implying the matrix is not invertible and thus the columns are not linearly independent.



      Now this is just a counting problem that asks: How many matrices are there in $text{M}_{4 times
      4}left(mathbb{F}_2right)$
      with linearly independent columns?



      For the first column, there are $2^4-1$ options, all columns except the $0$ column. For the second column, the only stipulation is that it cannot be the same exact column and it cannot be $0$, and it is linearly independent. So there are $2^4-2$ possibilities. For the third, it cannot be either of those columns or the sum or $0$, so there are $2^4-4$ possibilities. And for the remaining column, any possible candidates would have to be not the sum of any combination of the three columns, for which there are $2^3$ sums (including $0$, the sum of none of them).



      Thus, $(2^4-1)(2^4-2)(2^4-4)(2^4-2^3) = 20,160$.



      I think your intuition would work reasonably well for fields with more elements, where the determinant would act more randomly.






      share|cite|improve this answer









      $endgroup$
















        2












        2








        2





        $begingroup$

        Note that in $mathbb{F}_2$ the only possible odd determinant has value $1$ and the only even determinant has value $0$, implying the matrix is not invertible and thus the columns are not linearly independent.



        Now this is just a counting problem that asks: How many matrices are there in $text{M}_{4 times
        4}left(mathbb{F}_2right)$
        with linearly independent columns?



        For the first column, there are $2^4-1$ options, all columns except the $0$ column. For the second column, the only stipulation is that it cannot be the same exact column and it cannot be $0$, and it is linearly independent. So there are $2^4-2$ possibilities. For the third, it cannot be either of those columns or the sum or $0$, so there are $2^4-4$ possibilities. And for the remaining column, any possible candidates would have to be not the sum of any combination of the three columns, for which there are $2^3$ sums (including $0$, the sum of none of them).



        Thus, $(2^4-1)(2^4-2)(2^4-4)(2^4-2^3) = 20,160$.



        I think your intuition would work reasonably well for fields with more elements, where the determinant would act more randomly.






        share|cite|improve this answer









        $endgroup$



        Note that in $mathbb{F}_2$ the only possible odd determinant has value $1$ and the only even determinant has value $0$, implying the matrix is not invertible and thus the columns are not linearly independent.



        Now this is just a counting problem that asks: How many matrices are there in $text{M}_{4 times
        4}left(mathbb{F}_2right)$
        with linearly independent columns?



        For the first column, there are $2^4-1$ options, all columns except the $0$ column. For the second column, the only stipulation is that it cannot be the same exact column and it cannot be $0$, and it is linearly independent. So there are $2^4-2$ possibilities. For the third, it cannot be either of those columns or the sum or $0$, so there are $2^4-4$ possibilities. And for the remaining column, any possible candidates would have to be not the sum of any combination of the three columns, for which there are $2^3$ sums (including $0$, the sum of none of them).



        Thus, $(2^4-1)(2^4-2)(2^4-4)(2^4-2^3) = 20,160$.



        I think your intuition would work reasonably well for fields with more elements, where the determinant would act more randomly.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Nov 29 '18 at 7:44









        Anthony TerAnthony Ter

        2816




        2816























            2












            $begingroup$

            "Half of them are even and remaining are odd." is not correct.



            According to Consider the set of all $ntimes n$ matrices, how many of them are invertible modulo $p$., the number of $ntimes n$ invertible matrices modulo $p$ is
            $$prod_{i=0}^{n-1} (p^n- p^i).$$
            In your case $p=2$ and a matrices modulo $2$ is invertible if and only if its determinant is non-zero modulo $2$, i.e. it is odd. For $n=4$, the above formula yields
            $$(2^4-1)(2^4-2)(2^4-4)(2^4-8)=20160.$$
            On the other hand, the number of binary matrices with even determinant for $n=4$ is the cardinality of the complement:
            $$2^{16}-20160=45376.$$



            P.S. The number of binary matrices whose determinant is exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. As a reference see http://oeis.org/A046747.






            share|cite|improve this answer











            $endgroup$













            • $begingroup$
              Among 2^16 permutations , if we remove #Odd matrices , How many of them are "Zero" Det. matrices from remaining 45376 ? Just add that so that I can select your answer
              $endgroup$
              – CHETAN RAJPUT
              Nov 29 '18 at 8:01












            • $begingroup$
              I stated that because I have not considered 0 matruces in even set.
              $endgroup$
              – CHETAN RAJPUT
              Nov 29 '18 at 8:05










            • $begingroup$
              Exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. See oeis.org/A046747
              $endgroup$
              – Robert Z
              Nov 29 '18 at 8:09
















            2












            $begingroup$

            "Half of them are even and remaining are odd." is not correct.



            According to Consider the set of all $ntimes n$ matrices, how many of them are invertible modulo $p$., the number of $ntimes n$ invertible matrices modulo $p$ is
            $$prod_{i=0}^{n-1} (p^n- p^i).$$
            In your case $p=2$ and a matrices modulo $2$ is invertible if and only if its determinant is non-zero modulo $2$, i.e. it is odd. For $n=4$, the above formula yields
            $$(2^4-1)(2^4-2)(2^4-4)(2^4-8)=20160.$$
            On the other hand, the number of binary matrices with even determinant for $n=4$ is the cardinality of the complement:
            $$2^{16}-20160=45376.$$



            P.S. The number of binary matrices whose determinant is exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. As a reference see http://oeis.org/A046747.






            share|cite|improve this answer











            $endgroup$













            • $begingroup$
              Among 2^16 permutations , if we remove #Odd matrices , How many of them are "Zero" Det. matrices from remaining 45376 ? Just add that so that I can select your answer
              $endgroup$
              – CHETAN RAJPUT
              Nov 29 '18 at 8:01












            • $begingroup$
              I stated that because I have not considered 0 matruces in even set.
              $endgroup$
              – CHETAN RAJPUT
              Nov 29 '18 at 8:05










            • $begingroup$
              Exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. See oeis.org/A046747
              $endgroup$
              – Robert Z
              Nov 29 '18 at 8:09














            2












            2








            2





            $begingroup$

            "Half of them are even and remaining are odd." is not correct.



            According to Consider the set of all $ntimes n$ matrices, how many of them are invertible modulo $p$., the number of $ntimes n$ invertible matrices modulo $p$ is
            $$prod_{i=0}^{n-1} (p^n- p^i).$$
            In your case $p=2$ and a matrices modulo $2$ is invertible if and only if its determinant is non-zero modulo $2$, i.e. it is odd. For $n=4$, the above formula yields
            $$(2^4-1)(2^4-2)(2^4-4)(2^4-8)=20160.$$
            On the other hand, the number of binary matrices with even determinant for $n=4$ is the cardinality of the complement:
            $$2^{16}-20160=45376.$$



            P.S. The number of binary matrices whose determinant is exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. As a reference see http://oeis.org/A046747.






            share|cite|improve this answer











            $endgroup$



            "Half of them are even and remaining are odd." is not correct.



            According to Consider the set of all $ntimes n$ matrices, how many of them are invertible modulo $p$., the number of $ntimes n$ invertible matrices modulo $p$ is
            $$prod_{i=0}^{n-1} (p^n- p^i).$$
            In your case $p=2$ and a matrices modulo $2$ is invertible if and only if its determinant is non-zero modulo $2$, i.e. it is odd. For $n=4$, the above formula yields
            $$(2^4-1)(2^4-2)(2^4-4)(2^4-8)=20160.$$
            On the other hand, the number of binary matrices with even determinant for $n=4$ is the cardinality of the complement:
            $$2^{16}-20160=45376.$$



            P.S. The number of binary matrices whose determinant is exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. As a reference see http://oeis.org/A046747.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Nov 29 '18 at 8:19

























            answered Nov 29 '18 at 7:46









            Robert ZRobert Z

            96.3k1065136




            96.3k1065136












            • $begingroup$
              Among 2^16 permutations , if we remove #Odd matrices , How many of them are "Zero" Det. matrices from remaining 45376 ? Just add that so that I can select your answer
              $endgroup$
              – CHETAN RAJPUT
              Nov 29 '18 at 8:01












            • $begingroup$
              I stated that because I have not considered 0 matruces in even set.
              $endgroup$
              – CHETAN RAJPUT
              Nov 29 '18 at 8:05










            • $begingroup$
              Exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. See oeis.org/A046747
              $endgroup$
              – Robert Z
              Nov 29 '18 at 8:09


















            • $begingroup$
              Among 2^16 permutations , if we remove #Odd matrices , How many of them are "Zero" Det. matrices from remaining 45376 ? Just add that so that I can select your answer
              $endgroup$
              – CHETAN RAJPUT
              Nov 29 '18 at 8:01












            • $begingroup$
              I stated that because I have not considered 0 matruces in even set.
              $endgroup$
              – CHETAN RAJPUT
              Nov 29 '18 at 8:05










            • $begingroup$
              Exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. See oeis.org/A046747
              $endgroup$
              – Robert Z
              Nov 29 '18 at 8:09
















            $begingroup$
            Among 2^16 permutations , if we remove #Odd matrices , How many of them are "Zero" Det. matrices from remaining 45376 ? Just add that so that I can select your answer
            $endgroup$
            – CHETAN RAJPUT
            Nov 29 '18 at 8:01






            $begingroup$
            Among 2^16 permutations , if we remove #Odd matrices , How many of them are "Zero" Det. matrices from remaining 45376 ? Just add that so that I can select your answer
            $endgroup$
            – CHETAN RAJPUT
            Nov 29 '18 at 8:01














            $begingroup$
            I stated that because I have not considered 0 matruces in even set.
            $endgroup$
            – CHETAN RAJPUT
            Nov 29 '18 at 8:05




            $begingroup$
            I stated that because I have not considered 0 matruces in even set.
            $endgroup$
            – CHETAN RAJPUT
            Nov 29 '18 at 8:05












            $begingroup$
            Exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. See oeis.org/A046747
            $endgroup$
            – Robert Z
            Nov 29 '18 at 8:09




            $begingroup$
            Exactly zero is harder to find. For $n=4$ they are $42976$ which is less than the even ones $45376$. See oeis.org/A046747
            $endgroup$
            – Robert Z
            Nov 29 '18 at 8:09


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3018289%2fcount-the-n-times-n-binary-matrices-with-odd-even-determinant%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?