Finding unknown values in matrix

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











up vote
0
down vote

favorite












First of all i hope I'm at the right place to ask for help with this problem!



Let's assume a simple 2x2 grid in where all x and y values are not known. The total values are known though.



x1 | x2 | xTotal
y1 | y2 | yTotal
____________________
xy1Total | xy2Total


xTotal = x1 + x2

yTotal = y1 + y2

xy1Total = x1 + y1

xy2Total = x2 + y2


Example numbers for the known values:

xy1Total = 13

xy2Total = 17

xTotal = 15

yTotal = 15


Is there any way of "re-calculating" the unknown values? I stumbled upon the Gaussian elimination. I'm still not sure if this method can be applied here.
Thanks in advance.







share|cite|improve this question



















  • Yeah, the elimination process totally works, 'cause this is a linear equation system involving 4 variables and 4 equations. But I don't mean to eliminate the 2 by 2 grid
    – xbh
    Jul 30 at 14:45















up vote
0
down vote

favorite












First of all i hope I'm at the right place to ask for help with this problem!



Let's assume a simple 2x2 grid in where all x and y values are not known. The total values are known though.



x1 | x2 | xTotal
y1 | y2 | yTotal
____________________
xy1Total | xy2Total


xTotal = x1 + x2

yTotal = y1 + y2

xy1Total = x1 + y1

xy2Total = x2 + y2


Example numbers for the known values:

xy1Total = 13

xy2Total = 17

xTotal = 15

yTotal = 15


Is there any way of "re-calculating" the unknown values? I stumbled upon the Gaussian elimination. I'm still not sure if this method can be applied here.
Thanks in advance.







share|cite|improve this question



















  • Yeah, the elimination process totally works, 'cause this is a linear equation system involving 4 variables and 4 equations. But I don't mean to eliminate the 2 by 2 grid
    – xbh
    Jul 30 at 14:45













up vote
0
down vote

favorite









up vote
0
down vote

favorite











First of all i hope I'm at the right place to ask for help with this problem!



Let's assume a simple 2x2 grid in where all x and y values are not known. The total values are known though.



x1 | x2 | xTotal
y1 | y2 | yTotal
____________________
xy1Total | xy2Total


xTotal = x1 + x2

yTotal = y1 + y2

xy1Total = x1 + y1

xy2Total = x2 + y2


Example numbers for the known values:

xy1Total = 13

xy2Total = 17

xTotal = 15

yTotal = 15


Is there any way of "re-calculating" the unknown values? I stumbled upon the Gaussian elimination. I'm still not sure if this method can be applied here.
Thanks in advance.







share|cite|improve this question











First of all i hope I'm at the right place to ask for help with this problem!



Let's assume a simple 2x2 grid in where all x and y values are not known. The total values are known though.



x1 | x2 | xTotal
y1 | y2 | yTotal
____________________
xy1Total | xy2Total


xTotal = x1 + x2

yTotal = y1 + y2

xy1Total = x1 + y1

xy2Total = x2 + y2


Example numbers for the known values:

xy1Total = 13

xy2Total = 17

xTotal = 15

yTotal = 15


Is there any way of "re-calculating" the unknown values? I stumbled upon the Gaussian elimination. I'm still not sure if this method can be applied here.
Thanks in advance.









share|cite|improve this question










share|cite|improve this question




share|cite|improve this question









asked Jul 30 at 14:41









Lunatiic

31




31











  • Yeah, the elimination process totally works, 'cause this is a linear equation system involving 4 variables and 4 equations. But I don't mean to eliminate the 2 by 2 grid
    – xbh
    Jul 30 at 14:45

















  • Yeah, the elimination process totally works, 'cause this is a linear equation system involving 4 variables and 4 equations. But I don't mean to eliminate the 2 by 2 grid
    – xbh
    Jul 30 at 14:45
















Yeah, the elimination process totally works, 'cause this is a linear equation system involving 4 variables and 4 equations. But I don't mean to eliminate the 2 by 2 grid
– xbh
Jul 30 at 14:45





Yeah, the elimination process totally works, 'cause this is a linear equation system involving 4 variables and 4 equations. But I don't mean to eliminate the 2 by 2 grid
– xbh
Jul 30 at 14:45











3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










It suffices to consider the system



  • $x_1 + x_2 =x_Total=13$

  • $ y_1 + y_2 = y_Total=17$

  • $x_1 + y_1 =xy1_Total=15$

  • $ x_2 + y_2 = xy2_Total=15$

which is in the augmented matrix form



$$left[beginarrayc
1& 1& 0& 0& 13\
0& 0& 1& 1& 17\
1& 0& 1& 0& 15\
0& 1& 0& 1& 15\
endarrayright]$$



which can be solved by Gaussian elimination that is



$$left[beginarrayc
1& 1& 0& 0& 13\
1& 0& 1& 0& 15\
0& 1& 0& 1& 15\
0& 0& 1& 1& 17\
endarrayright]to left[beginarrayc
1& 1& 0& 0& 13\
0& -1& 1& 0& 2\
0& 1& 0& 1& 15\
0& 0& 1& 1& 17\
endarrayright]to left[beginarrayc
1& 1& 0& 0& 13\
0& -1& 1& 0& 2\
0& 0& 1& 1& 17\
0& 0& 1& 1& 17\
endarrayright]to left[beginarrayc
1& 1& 0& 0& 13\
0& -1& 1& 0& 2\
0& 0& 1& 1& 17\
0& 0& 0& 0& 0\
endarrayright]$$



therefore setting $y_2=k$ as free we obtain



  • $y_1=17-k$

  • $x_2=y_1-2=15-k$

  • $x_1=13-x_1=k-2$





share|cite|improve this answer






























    up vote
    0
    down vote













    That is a simple linear system of equations, you could solve it in lot's of ways, one of them being Gaussian elimination. In your example you have $$begincasesx_1+x_2=15\ y_1+y_2=15\ x_1+y_1=13\ x_2+y_2=17endcases$$ four equations in four unknowns, to know from the start if the system has infinite, no or one solution you could use Rouchè-Capelli theorem. Gaussian elimination is a pretty involved process to find solutions to linear system of equations (it cannot be applied on non linear), in cases like this one you could simply use substitution, addition, subtraction, multiplication between rows etc.



    If you really want to use gaussian elimination the system of equations can be put in matrix form like this $$left(beginmatrix1&1&0&0&15\0&0&1&1&15\1&0&1&0&13\0&1&0&1&17endmatrixright)$$ Your system seems like having infinite solutions, in this case you just choose one variable to explicit the others as a function of that






    share|cite|improve this answer




























      up vote
      0
      down vote













      The sums of the rows have a grand total, equal to the sum of all the $x_i$ and $y_i$. That must equal the grand total of all the column sums. Here, 13+17=15+15 so you are okay. If not, there will be no solutions.



      Suppose the grand totals match, and you have a matrix with $M$ rows and $N$ columns. You can put in any numbers you like except for the last row and last column. Then work out numbers in the last column to make the row sums right, and numbers in the last row to make column sums right.






      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%2f2867087%2ffinding-unknown-values-in-matrix%23new-answer', 'question_page');

        );

        Post as a guest






























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        1
        down vote



        accepted










        It suffices to consider the system



        • $x_1 + x_2 =x_Total=13$

        • $ y_1 + y_2 = y_Total=17$

        • $x_1 + y_1 =xy1_Total=15$

        • $ x_2 + y_2 = xy2_Total=15$

        which is in the augmented matrix form



        $$left[beginarrayc
        1& 1& 0& 0& 13\
        0& 0& 1& 1& 17\
        1& 0& 1& 0& 15\
        0& 1& 0& 1& 15\
        endarrayright]$$



        which can be solved by Gaussian elimination that is



        $$left[beginarrayc
        1& 1& 0& 0& 13\
        1& 0& 1& 0& 15\
        0& 1& 0& 1& 15\
        0& 0& 1& 1& 17\
        endarrayright]to left[beginarrayc
        1& 1& 0& 0& 13\
        0& -1& 1& 0& 2\
        0& 1& 0& 1& 15\
        0& 0& 1& 1& 17\
        endarrayright]to left[beginarrayc
        1& 1& 0& 0& 13\
        0& -1& 1& 0& 2\
        0& 0& 1& 1& 17\
        0& 0& 1& 1& 17\
        endarrayright]to left[beginarrayc
        1& 1& 0& 0& 13\
        0& -1& 1& 0& 2\
        0& 0& 1& 1& 17\
        0& 0& 0& 0& 0\
        endarrayright]$$



        therefore setting $y_2=k$ as free we obtain



        • $y_1=17-k$

        • $x_2=y_1-2=15-k$

        • $x_1=13-x_1=k-2$





        share|cite|improve this answer



























          up vote
          1
          down vote



          accepted










          It suffices to consider the system



          • $x_1 + x_2 =x_Total=13$

          • $ y_1 + y_2 = y_Total=17$

          • $x_1 + y_1 =xy1_Total=15$

          • $ x_2 + y_2 = xy2_Total=15$

          which is in the augmented matrix form



          $$left[beginarrayc
          1& 1& 0& 0& 13\
          0& 0& 1& 1& 17\
          1& 0& 1& 0& 15\
          0& 1& 0& 1& 15\
          endarrayright]$$



          which can be solved by Gaussian elimination that is



          $$left[beginarrayc
          1& 1& 0& 0& 13\
          1& 0& 1& 0& 15\
          0& 1& 0& 1& 15\
          0& 0& 1& 1& 17\
          endarrayright]to left[beginarrayc
          1& 1& 0& 0& 13\
          0& -1& 1& 0& 2\
          0& 1& 0& 1& 15\
          0& 0& 1& 1& 17\
          endarrayright]to left[beginarrayc
          1& 1& 0& 0& 13\
          0& -1& 1& 0& 2\
          0& 0& 1& 1& 17\
          0& 0& 1& 1& 17\
          endarrayright]to left[beginarrayc
          1& 1& 0& 0& 13\
          0& -1& 1& 0& 2\
          0& 0& 1& 1& 17\
          0& 0& 0& 0& 0\
          endarrayright]$$



          therefore setting $y_2=k$ as free we obtain



          • $y_1=17-k$

          • $x_2=y_1-2=15-k$

          • $x_1=13-x_1=k-2$





          share|cite|improve this answer

























            up vote
            1
            down vote



            accepted







            up vote
            1
            down vote



            accepted






            It suffices to consider the system



            • $x_1 + x_2 =x_Total=13$

            • $ y_1 + y_2 = y_Total=17$

            • $x_1 + y_1 =xy1_Total=15$

            • $ x_2 + y_2 = xy2_Total=15$

            which is in the augmented matrix form



            $$left[beginarrayc
            1& 1& 0& 0& 13\
            0& 0& 1& 1& 17\
            1& 0& 1& 0& 15\
            0& 1& 0& 1& 15\
            endarrayright]$$



            which can be solved by Gaussian elimination that is



            $$left[beginarrayc
            1& 1& 0& 0& 13\
            1& 0& 1& 0& 15\
            0& 1& 0& 1& 15\
            0& 0& 1& 1& 17\
            endarrayright]to left[beginarrayc
            1& 1& 0& 0& 13\
            0& -1& 1& 0& 2\
            0& 1& 0& 1& 15\
            0& 0& 1& 1& 17\
            endarrayright]to left[beginarrayc
            1& 1& 0& 0& 13\
            0& -1& 1& 0& 2\
            0& 0& 1& 1& 17\
            0& 0& 1& 1& 17\
            endarrayright]to left[beginarrayc
            1& 1& 0& 0& 13\
            0& -1& 1& 0& 2\
            0& 0& 1& 1& 17\
            0& 0& 0& 0& 0\
            endarrayright]$$



            therefore setting $y_2=k$ as free we obtain



            • $y_1=17-k$

            • $x_2=y_1-2=15-k$

            • $x_1=13-x_1=k-2$





            share|cite|improve this answer















            It suffices to consider the system



            • $x_1 + x_2 =x_Total=13$

            • $ y_1 + y_2 = y_Total=17$

            • $x_1 + y_1 =xy1_Total=15$

            • $ x_2 + y_2 = xy2_Total=15$

            which is in the augmented matrix form



            $$left[beginarrayc
            1& 1& 0& 0& 13\
            0& 0& 1& 1& 17\
            1& 0& 1& 0& 15\
            0& 1& 0& 1& 15\
            endarrayright]$$



            which can be solved by Gaussian elimination that is



            $$left[beginarrayc
            1& 1& 0& 0& 13\
            1& 0& 1& 0& 15\
            0& 1& 0& 1& 15\
            0& 0& 1& 1& 17\
            endarrayright]to left[beginarrayc
            1& 1& 0& 0& 13\
            0& -1& 1& 0& 2\
            0& 1& 0& 1& 15\
            0& 0& 1& 1& 17\
            endarrayright]to left[beginarrayc
            1& 1& 0& 0& 13\
            0& -1& 1& 0& 2\
            0& 0& 1& 1& 17\
            0& 0& 1& 1& 17\
            endarrayright]to left[beginarrayc
            1& 1& 0& 0& 13\
            0& -1& 1& 0& 2\
            0& 0& 1& 1& 17\
            0& 0& 0& 0& 0\
            endarrayright]$$



            therefore setting $y_2=k$ as free we obtain



            • $y_1=17-k$

            • $x_2=y_1-2=15-k$

            • $x_1=13-x_1=k-2$






            share|cite|improve this answer















            share|cite|improve this answer



            share|cite|improve this answer








            edited Jul 30 at 14:53


























            answered Jul 30 at 14:45









            gimusi

            64.3k73480




            64.3k73480




















                up vote
                0
                down vote













                That is a simple linear system of equations, you could solve it in lot's of ways, one of them being Gaussian elimination. In your example you have $$begincasesx_1+x_2=15\ y_1+y_2=15\ x_1+y_1=13\ x_2+y_2=17endcases$$ four equations in four unknowns, to know from the start if the system has infinite, no or one solution you could use Rouchè-Capelli theorem. Gaussian elimination is a pretty involved process to find solutions to linear system of equations (it cannot be applied on non linear), in cases like this one you could simply use substitution, addition, subtraction, multiplication between rows etc.



                If you really want to use gaussian elimination the system of equations can be put in matrix form like this $$left(beginmatrix1&1&0&0&15\0&0&1&1&15\1&0&1&0&13\0&1&0&1&17endmatrixright)$$ Your system seems like having infinite solutions, in this case you just choose one variable to explicit the others as a function of that






                share|cite|improve this answer

























                  up vote
                  0
                  down vote













                  That is a simple linear system of equations, you could solve it in lot's of ways, one of them being Gaussian elimination. In your example you have $$begincasesx_1+x_2=15\ y_1+y_2=15\ x_1+y_1=13\ x_2+y_2=17endcases$$ four equations in four unknowns, to know from the start if the system has infinite, no or one solution you could use Rouchè-Capelli theorem. Gaussian elimination is a pretty involved process to find solutions to linear system of equations (it cannot be applied on non linear), in cases like this one you could simply use substitution, addition, subtraction, multiplication between rows etc.



                  If you really want to use gaussian elimination the system of equations can be put in matrix form like this $$left(beginmatrix1&1&0&0&15\0&0&1&1&15\1&0&1&0&13\0&1&0&1&17endmatrixright)$$ Your system seems like having infinite solutions, in this case you just choose one variable to explicit the others as a function of that






                  share|cite|improve this answer























                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    That is a simple linear system of equations, you could solve it in lot's of ways, one of them being Gaussian elimination. In your example you have $$begincasesx_1+x_2=15\ y_1+y_2=15\ x_1+y_1=13\ x_2+y_2=17endcases$$ four equations in four unknowns, to know from the start if the system has infinite, no or one solution you could use Rouchè-Capelli theorem. Gaussian elimination is a pretty involved process to find solutions to linear system of equations (it cannot be applied on non linear), in cases like this one you could simply use substitution, addition, subtraction, multiplication between rows etc.



                    If you really want to use gaussian elimination the system of equations can be put in matrix form like this $$left(beginmatrix1&1&0&0&15\0&0&1&1&15\1&0&1&0&13\0&1&0&1&17endmatrixright)$$ Your system seems like having infinite solutions, in this case you just choose one variable to explicit the others as a function of that






                    share|cite|improve this answer













                    That is a simple linear system of equations, you could solve it in lot's of ways, one of them being Gaussian elimination. In your example you have $$begincasesx_1+x_2=15\ y_1+y_2=15\ x_1+y_1=13\ x_2+y_2=17endcases$$ four equations in four unknowns, to know from the start if the system has infinite, no or one solution you could use Rouchè-Capelli theorem. Gaussian elimination is a pretty involved process to find solutions to linear system of equations (it cannot be applied on non linear), in cases like this one you could simply use substitution, addition, subtraction, multiplication between rows etc.



                    If you really want to use gaussian elimination the system of equations can be put in matrix form like this $$left(beginmatrix1&1&0&0&15\0&0&1&1&15\1&0&1&0&13\0&1&0&1&17endmatrixright)$$ Your system seems like having infinite solutions, in this case you just choose one variable to explicit the others as a function of that







                    share|cite|improve this answer













                    share|cite|improve this answer



                    share|cite|improve this answer











                    answered Jul 30 at 14:50









                    Davide Morgante

                    1,693220




                    1,693220




















                        up vote
                        0
                        down vote













                        The sums of the rows have a grand total, equal to the sum of all the $x_i$ and $y_i$. That must equal the grand total of all the column sums. Here, 13+17=15+15 so you are okay. If not, there will be no solutions.



                        Suppose the grand totals match, and you have a matrix with $M$ rows and $N$ columns. You can put in any numbers you like except for the last row and last column. Then work out numbers in the last column to make the row sums right, and numbers in the last row to make column sums right.






                        share|cite|improve this answer

























                          up vote
                          0
                          down vote













                          The sums of the rows have a grand total, equal to the sum of all the $x_i$ and $y_i$. That must equal the grand total of all the column sums. Here, 13+17=15+15 so you are okay. If not, there will be no solutions.



                          Suppose the grand totals match, and you have a matrix with $M$ rows and $N$ columns. You can put in any numbers you like except for the last row and last column. Then work out numbers in the last column to make the row sums right, and numbers in the last row to make column sums right.






                          share|cite|improve this answer























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            The sums of the rows have a grand total, equal to the sum of all the $x_i$ and $y_i$. That must equal the grand total of all the column sums. Here, 13+17=15+15 so you are okay. If not, there will be no solutions.



                            Suppose the grand totals match, and you have a matrix with $M$ rows and $N$ columns. You can put in any numbers you like except for the last row and last column. Then work out numbers in the last column to make the row sums right, and numbers in the last row to make column sums right.






                            share|cite|improve this answer













                            The sums of the rows have a grand total, equal to the sum of all the $x_i$ and $y_i$. That must equal the grand total of all the column sums. Here, 13+17=15+15 so you are okay. If not, there will be no solutions.



                            Suppose the grand totals match, and you have a matrix with $M$ rows and $N$ columns. You can put in any numbers you like except for the last row and last column. Then work out numbers in the last column to make the row sums right, and numbers in the last row to make column sums right.







                            share|cite|improve this answer













                            share|cite|improve this answer



                            share|cite|improve this answer











                            answered Jul 30 at 15:09









                            Empy2

                            31.7k12059




                            31.7k12059






















                                 

                                draft saved


                                draft discarded


























                                 


                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2867087%2ffinding-unknown-values-in-matrix%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?