How to prove that the number of diagonals of a $M times N$ matrix is $M+N-1$?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Given a matrix $M times N$, how to prove that the number of diagonals that can be drawn, like in the figure below, is equal to $M + N - 1$?



enter image description here



My idea would be to prove it with induction and consider the 3 possible cases: $M=N$, $M>N$ and $M<N$. But I don't know how to do it.







share|cite|improve this question



















  • Induction on which variable?
    – greedoid
    Jul 29 at 10:39











  • @Angle For a moment I've thought it was possible to use the Induction principle both on $M$ and $N$, but I was so wrong
    – reuseman
    Jul 29 at 10:43










  • This is easy with induction. Fix $M$ and induct on $N$.
    – greedoid
    Jul 29 at 10:45










  • So this means that there are 3 cases to consider $M=N$, $M>N$, $M<N$ with $M$ fixed, and other 3 with $N$ fixed?
    – reuseman
    Jul 29 at 10:46










  • No, just go from a matrix $Mtimes N$ to a matrix with one more row, that is a matrix $Mtimes N+1$.
    – greedoid
    Jul 29 at 10:47















up vote
0
down vote

favorite












Given a matrix $M times N$, how to prove that the number of diagonals that can be drawn, like in the figure below, is equal to $M + N - 1$?



enter image description here



My idea would be to prove it with induction and consider the 3 possible cases: $M=N$, $M>N$ and $M<N$. But I don't know how to do it.







share|cite|improve this question



















  • Induction on which variable?
    – greedoid
    Jul 29 at 10:39











  • @Angle For a moment I've thought it was possible to use the Induction principle both on $M$ and $N$, but I was so wrong
    – reuseman
    Jul 29 at 10:43










  • This is easy with induction. Fix $M$ and induct on $N$.
    – greedoid
    Jul 29 at 10:45










  • So this means that there are 3 cases to consider $M=N$, $M>N$, $M<N$ with $M$ fixed, and other 3 with $N$ fixed?
    – reuseman
    Jul 29 at 10:46










  • No, just go from a matrix $Mtimes N$ to a matrix with one more row, that is a matrix $Mtimes N+1$.
    – greedoid
    Jul 29 at 10:47













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Given a matrix $M times N$, how to prove that the number of diagonals that can be drawn, like in the figure below, is equal to $M + N - 1$?



enter image description here



My idea would be to prove it with induction and consider the 3 possible cases: $M=N$, $M>N$ and $M<N$. But I don't know how to do it.







share|cite|improve this question











Given a matrix $M times N$, how to prove that the number of diagonals that can be drawn, like in the figure below, is equal to $M + N - 1$?



enter image description here



My idea would be to prove it with induction and consider the 3 possible cases: $M=N$, $M>N$ and $M<N$. But I don't know how to do it.









share|cite|improve this question










share|cite|improve this question




share|cite|improve this question









asked Jul 29 at 10:27









reuseman

145




145











  • Induction on which variable?
    – greedoid
    Jul 29 at 10:39











  • @Angle For a moment I've thought it was possible to use the Induction principle both on $M$ and $N$, but I was so wrong
    – reuseman
    Jul 29 at 10:43










  • This is easy with induction. Fix $M$ and induct on $N$.
    – greedoid
    Jul 29 at 10:45










  • So this means that there are 3 cases to consider $M=N$, $M>N$, $M<N$ with $M$ fixed, and other 3 with $N$ fixed?
    – reuseman
    Jul 29 at 10:46










  • No, just go from a matrix $Mtimes N$ to a matrix with one more row, that is a matrix $Mtimes N+1$.
    – greedoid
    Jul 29 at 10:47

















  • Induction on which variable?
    – greedoid
    Jul 29 at 10:39











  • @Angle For a moment I've thought it was possible to use the Induction principle both on $M$ and $N$, but I was so wrong
    – reuseman
    Jul 29 at 10:43










  • This is easy with induction. Fix $M$ and induct on $N$.
    – greedoid
    Jul 29 at 10:45










  • So this means that there are 3 cases to consider $M=N$, $M>N$, $M<N$ with $M$ fixed, and other 3 with $N$ fixed?
    – reuseman
    Jul 29 at 10:46










  • No, just go from a matrix $Mtimes N$ to a matrix with one more row, that is a matrix $Mtimes N+1$.
    – greedoid
    Jul 29 at 10:47
















Induction on which variable?
– greedoid
Jul 29 at 10:39





Induction on which variable?
– greedoid
Jul 29 at 10:39













@Angle For a moment I've thought it was possible to use the Induction principle both on $M$ and $N$, but I was so wrong
– reuseman
Jul 29 at 10:43




@Angle For a moment I've thought it was possible to use the Induction principle both on $M$ and $N$, but I was so wrong
– reuseman
Jul 29 at 10:43












This is easy with induction. Fix $M$ and induct on $N$.
– greedoid
Jul 29 at 10:45




This is easy with induction. Fix $M$ and induct on $N$.
– greedoid
Jul 29 at 10:45












So this means that there are 3 cases to consider $M=N$, $M>N$, $M<N$ with $M$ fixed, and other 3 with $N$ fixed?
– reuseman
Jul 29 at 10:46




So this means that there are 3 cases to consider $M=N$, $M>N$, $M<N$ with $M$ fixed, and other 3 with $N$ fixed?
– reuseman
Jul 29 at 10:46












No, just go from a matrix $Mtimes N$ to a matrix with one more row, that is a matrix $Mtimes N+1$.
– greedoid
Jul 29 at 10:47





No, just go from a matrix $Mtimes N$ to a matrix with one more row, that is a matrix $Mtimes N+1$.
– greedoid
Jul 29 at 10:47











2 Answers
2






active

oldest

votes

















up vote
0
down vote



accepted










This is a counting problem.



Start at the first row and count diagonals passing through elements on the first row. You get $N$ of those.



Now go down through the last column and you get $M$ of those.



There is one which is counted twice, so the total is $M+N-1$






share|cite|improve this answer





















  • Is this a valid way to prove it for all the possible values of $M$ and $N$?
    – reuseman
    Jul 29 at 10:44










  • Yes, it works for all values of $M $and $N$. Go through some examples and you figure it out.
    – Mohammad Riazi-Kermani
    Jul 29 at 10:46


















up vote
-1
down vote













Each entry of the matrix is given by the row number $i$ and the column number $j$, and we say that $(i,j)$ is the index of this entry. Notice that the $k$-th diagonal is defined by $(i,j)$-entries with $i+j=k+1$. Since $iin1,2,ldots,M$ and $jin1,2,ldots,N$, we see that
$$k=i+j-1in1,2,ldots,M+N-1,.$$



Each $kin1,2,ldots,M+N-1$ corresponds to a nonempty diagonal line. For $k=1,2,ldots,M$, the $k$-th diagonal contains the entry indexed by $(k-1,1)$. For $k=M+1,M+2,ldots,M+N-1$, the $k$-th diagonal contains the entry indexed by $(M,k+1-M)$.






share|cite|improve this answer





















    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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    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%2f2865964%2fhow-to-prove-that-the-number-of-diagonals-of-a-m-times-n-matrix-is-mn-1%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    This is a counting problem.



    Start at the first row and count diagonals passing through elements on the first row. You get $N$ of those.



    Now go down through the last column and you get $M$ of those.



    There is one which is counted twice, so the total is $M+N-1$






    share|cite|improve this answer





















    • Is this a valid way to prove it for all the possible values of $M$ and $N$?
      – reuseman
      Jul 29 at 10:44










    • Yes, it works for all values of $M $and $N$. Go through some examples and you figure it out.
      – Mohammad Riazi-Kermani
      Jul 29 at 10:46















    up vote
    0
    down vote



    accepted










    This is a counting problem.



    Start at the first row and count diagonals passing through elements on the first row. You get $N$ of those.



    Now go down through the last column and you get $M$ of those.



    There is one which is counted twice, so the total is $M+N-1$






    share|cite|improve this answer





















    • Is this a valid way to prove it for all the possible values of $M$ and $N$?
      – reuseman
      Jul 29 at 10:44










    • Yes, it works for all values of $M $and $N$. Go through some examples and you figure it out.
      – Mohammad Riazi-Kermani
      Jul 29 at 10:46













    up vote
    0
    down vote



    accepted







    up vote
    0
    down vote



    accepted






    This is a counting problem.



    Start at the first row and count diagonals passing through elements on the first row. You get $N$ of those.



    Now go down through the last column and you get $M$ of those.



    There is one which is counted twice, so the total is $M+N-1$






    share|cite|improve this answer













    This is a counting problem.



    Start at the first row and count diagonals passing through elements on the first row. You get $N$ of those.



    Now go down through the last column and you get $M$ of those.



    There is one which is counted twice, so the total is $M+N-1$







    share|cite|improve this answer













    share|cite|improve this answer



    share|cite|improve this answer











    answered Jul 29 at 10:36









    Mohammad Riazi-Kermani

    27.3k41851




    27.3k41851











    • Is this a valid way to prove it for all the possible values of $M$ and $N$?
      – reuseman
      Jul 29 at 10:44










    • Yes, it works for all values of $M $and $N$. Go through some examples and you figure it out.
      – Mohammad Riazi-Kermani
      Jul 29 at 10:46

















    • Is this a valid way to prove it for all the possible values of $M$ and $N$?
      – reuseman
      Jul 29 at 10:44










    • Yes, it works for all values of $M $and $N$. Go through some examples and you figure it out.
      – Mohammad Riazi-Kermani
      Jul 29 at 10:46
















    Is this a valid way to prove it for all the possible values of $M$ and $N$?
    – reuseman
    Jul 29 at 10:44




    Is this a valid way to prove it for all the possible values of $M$ and $N$?
    – reuseman
    Jul 29 at 10:44












    Yes, it works for all values of $M $and $N$. Go through some examples and you figure it out.
    – Mohammad Riazi-Kermani
    Jul 29 at 10:46





    Yes, it works for all values of $M $and $N$. Go through some examples and you figure it out.
    – Mohammad Riazi-Kermani
    Jul 29 at 10:46











    up vote
    -1
    down vote













    Each entry of the matrix is given by the row number $i$ and the column number $j$, and we say that $(i,j)$ is the index of this entry. Notice that the $k$-th diagonal is defined by $(i,j)$-entries with $i+j=k+1$. Since $iin1,2,ldots,M$ and $jin1,2,ldots,N$, we see that
    $$k=i+j-1in1,2,ldots,M+N-1,.$$



    Each $kin1,2,ldots,M+N-1$ corresponds to a nonempty diagonal line. For $k=1,2,ldots,M$, the $k$-th diagonal contains the entry indexed by $(k-1,1)$. For $k=M+1,M+2,ldots,M+N-1$, the $k$-th diagonal contains the entry indexed by $(M,k+1-M)$.






    share|cite|improve this answer

























      up vote
      -1
      down vote













      Each entry of the matrix is given by the row number $i$ and the column number $j$, and we say that $(i,j)$ is the index of this entry. Notice that the $k$-th diagonal is defined by $(i,j)$-entries with $i+j=k+1$. Since $iin1,2,ldots,M$ and $jin1,2,ldots,N$, we see that
      $$k=i+j-1in1,2,ldots,M+N-1,.$$



      Each $kin1,2,ldots,M+N-1$ corresponds to a nonempty diagonal line. For $k=1,2,ldots,M$, the $k$-th diagonal contains the entry indexed by $(k-1,1)$. For $k=M+1,M+2,ldots,M+N-1$, the $k$-th diagonal contains the entry indexed by $(M,k+1-M)$.






      share|cite|improve this answer























        up vote
        -1
        down vote










        up vote
        -1
        down vote









        Each entry of the matrix is given by the row number $i$ and the column number $j$, and we say that $(i,j)$ is the index of this entry. Notice that the $k$-th diagonal is defined by $(i,j)$-entries with $i+j=k+1$. Since $iin1,2,ldots,M$ and $jin1,2,ldots,N$, we see that
        $$k=i+j-1in1,2,ldots,M+N-1,.$$



        Each $kin1,2,ldots,M+N-1$ corresponds to a nonempty diagonal line. For $k=1,2,ldots,M$, the $k$-th diagonal contains the entry indexed by $(k-1,1)$. For $k=M+1,M+2,ldots,M+N-1$, the $k$-th diagonal contains the entry indexed by $(M,k+1-M)$.






        share|cite|improve this answer













        Each entry of the matrix is given by the row number $i$ and the column number $j$, and we say that $(i,j)$ is the index of this entry. Notice that the $k$-th diagonal is defined by $(i,j)$-entries with $i+j=k+1$. Since $iin1,2,ldots,M$ and $jin1,2,ldots,N$, we see that
        $$k=i+j-1in1,2,ldots,M+N-1,.$$



        Each $kin1,2,ldots,M+N-1$ corresponds to a nonempty diagonal line. For $k=1,2,ldots,M$, the $k$-th diagonal contains the entry indexed by $(k-1,1)$. For $k=M+1,M+2,ldots,M+N-1$, the $k$-th diagonal contains the entry indexed by $(M,k+1-M)$.







        share|cite|improve this answer













        share|cite|improve this answer



        share|cite|improve this answer











        answered Jul 29 at 11:35









        Batominovski

        22.9k22777




        22.9k22777






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2865964%2fhow-to-prove-that-the-number-of-diagonals-of-a-m-times-n-matrix-is-mn-1%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?