Blockwise Matrix Inversion Stability












0












$begingroup$


I have implemented a blockwise matrix inversion. When comparing the blockwise inversion to an inverse of the entire matrix I am seeing deviations from the correct inverse. What should the expectation for blockwise inversion be regarding stability relative to a standard inverse? This causes an issue because multiplying the blockwise results by the original matrix no longer results in the identity.



Blockwise Formula



Matrix being inverted:



[0.02788, 0.00679, 0.00425, 0.00515



0.00679, 0.14084, 0.00497, 0.00289



0.00425, 0.00497, 0.03055, 0.005



0.00515, 0.00289, 0.005, 0.05109]



Inverse Result:



[37.5317721, -1.5862237, -4.4296639, -3.2600532,



-1.5862237, 7.2126689, -0.9269588, -0.1573844,



-4.4296639, -0.9269588, 33.962595, -2.8248443,



-3.2600532, -0.1573844, -2.8248443, 20.1872839]



Blockwise Inverse Result:



[37.4861497, -1.5808969, -4.4373105, -3.1229364,



-1.5808969, 7.2152228, -0.9702984, -0.1593941,



-4.4373105, -0.9702984, 33.9787159, -2.8388331,



-3.1229364, -0.1593941, -2.8388331, 20.1639422]










share|cite|improve this question











$endgroup$

















    0












    $begingroup$


    I have implemented a blockwise matrix inversion. When comparing the blockwise inversion to an inverse of the entire matrix I am seeing deviations from the correct inverse. What should the expectation for blockwise inversion be regarding stability relative to a standard inverse? This causes an issue because multiplying the blockwise results by the original matrix no longer results in the identity.



    Blockwise Formula



    Matrix being inverted:



    [0.02788, 0.00679, 0.00425, 0.00515



    0.00679, 0.14084, 0.00497, 0.00289



    0.00425, 0.00497, 0.03055, 0.005



    0.00515, 0.00289, 0.005, 0.05109]



    Inverse Result:



    [37.5317721, -1.5862237, -4.4296639, -3.2600532,



    -1.5862237, 7.2126689, -0.9269588, -0.1573844,



    -4.4296639, -0.9269588, 33.962595, -2.8248443,



    -3.2600532, -0.1573844, -2.8248443, 20.1872839]



    Blockwise Inverse Result:



    [37.4861497, -1.5808969, -4.4373105, -3.1229364,



    -1.5808969, 7.2152228, -0.9702984, -0.1593941,



    -4.4373105, -0.9702984, 33.9787159, -2.8388331,



    -3.1229364, -0.1593941, -2.8388331, 20.1639422]










    share|cite|improve this question











    $endgroup$















      0












      0








      0





      $begingroup$


      I have implemented a blockwise matrix inversion. When comparing the blockwise inversion to an inverse of the entire matrix I am seeing deviations from the correct inverse. What should the expectation for blockwise inversion be regarding stability relative to a standard inverse? This causes an issue because multiplying the blockwise results by the original matrix no longer results in the identity.



      Blockwise Formula



      Matrix being inverted:



      [0.02788, 0.00679, 0.00425, 0.00515



      0.00679, 0.14084, 0.00497, 0.00289



      0.00425, 0.00497, 0.03055, 0.005



      0.00515, 0.00289, 0.005, 0.05109]



      Inverse Result:



      [37.5317721, -1.5862237, -4.4296639, -3.2600532,



      -1.5862237, 7.2126689, -0.9269588, -0.1573844,



      -4.4296639, -0.9269588, 33.962595, -2.8248443,



      -3.2600532, -0.1573844, -2.8248443, 20.1872839]



      Blockwise Inverse Result:



      [37.4861497, -1.5808969, -4.4373105, -3.1229364,



      -1.5808969, 7.2152228, -0.9702984, -0.1593941,



      -4.4373105, -0.9702984, 33.9787159, -2.8388331,



      -3.1229364, -0.1593941, -2.8388331, 20.1639422]










      share|cite|improve this question











      $endgroup$




      I have implemented a blockwise matrix inversion. When comparing the blockwise inversion to an inverse of the entire matrix I am seeing deviations from the correct inverse. What should the expectation for blockwise inversion be regarding stability relative to a standard inverse? This causes an issue because multiplying the blockwise results by the original matrix no longer results in the identity.



      Blockwise Formula



      Matrix being inverted:



      [0.02788, 0.00679, 0.00425, 0.00515



      0.00679, 0.14084, 0.00497, 0.00289



      0.00425, 0.00497, 0.03055, 0.005



      0.00515, 0.00289, 0.005, 0.05109]



      Inverse Result:



      [37.5317721, -1.5862237, -4.4296639, -3.2600532,



      -1.5862237, 7.2126689, -0.9269588, -0.1573844,



      -4.4296639, -0.9269588, 33.962595, -2.8248443,



      -3.2600532, -0.1573844, -2.8248443, 20.1872839]



      Blockwise Inverse Result:



      [37.4861497, -1.5808969, -4.4373105, -3.1229364,



      -1.5808969, 7.2152228, -0.9702984, -0.1593941,



      -4.4373105, -0.9702984, 33.9787159, -2.8388331,



      -3.1229364, -0.1593941, -2.8388331, 20.1639422]







      inverse block-matrices






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 21 '18 at 23:04







      CuriousGeorge

















      asked Dec 21 '18 at 20:08









      CuriousGeorgeCuriousGeorge

      11




      11






















          1 Answer
          1






          active

          oldest

          votes


















          1












          $begingroup$

          My guess is that this block formula won't work very well in general, just because of how many different matrix multiplies and inversions are going on.



          As a sample bad case, consider the matrix,
          $$
          X = begin{bmatrix}
          1 & 0 & 1 & 1 \
          0 & epsilon & 1 & 1 \
          1 & 1 & epsilon & 1 \
          1 & 1 & 1 & -epsilon
          end{bmatrix}
          $$



          This matrix is invertible as $epsilon to 0$, and in this limit the condition number approaches something near $5.3$. So for small epsilon, the original matrix is fairly well conditioned and stable algorithms should be able to give a good solution.



          However, The condition number of the condition number of the $(1,1)$ block is $1/epsilon$ which goes to infinity as $epsilon to 0$. This means the inverse of the $(1,1$) block may not even be representable in finite precision arithmetic, and so the block formula will not work well.






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            This is very helpful thank you Tyler
            $endgroup$
            – CuriousGeorge
            Dec 21 '18 at 23:02











          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%2f3048850%2fblockwise-matrix-inversion-stability%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1












          $begingroup$

          My guess is that this block formula won't work very well in general, just because of how many different matrix multiplies and inversions are going on.



          As a sample bad case, consider the matrix,
          $$
          X = begin{bmatrix}
          1 & 0 & 1 & 1 \
          0 & epsilon & 1 & 1 \
          1 & 1 & epsilon & 1 \
          1 & 1 & 1 & -epsilon
          end{bmatrix}
          $$



          This matrix is invertible as $epsilon to 0$, and in this limit the condition number approaches something near $5.3$. So for small epsilon, the original matrix is fairly well conditioned and stable algorithms should be able to give a good solution.



          However, The condition number of the condition number of the $(1,1)$ block is $1/epsilon$ which goes to infinity as $epsilon to 0$. This means the inverse of the $(1,1$) block may not even be representable in finite precision arithmetic, and so the block formula will not work well.






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            This is very helpful thank you Tyler
            $endgroup$
            – CuriousGeorge
            Dec 21 '18 at 23:02
















          1












          $begingroup$

          My guess is that this block formula won't work very well in general, just because of how many different matrix multiplies and inversions are going on.



          As a sample bad case, consider the matrix,
          $$
          X = begin{bmatrix}
          1 & 0 & 1 & 1 \
          0 & epsilon & 1 & 1 \
          1 & 1 & epsilon & 1 \
          1 & 1 & 1 & -epsilon
          end{bmatrix}
          $$



          This matrix is invertible as $epsilon to 0$, and in this limit the condition number approaches something near $5.3$. So for small epsilon, the original matrix is fairly well conditioned and stable algorithms should be able to give a good solution.



          However, The condition number of the condition number of the $(1,1)$ block is $1/epsilon$ which goes to infinity as $epsilon to 0$. This means the inverse of the $(1,1$) block may not even be representable in finite precision arithmetic, and so the block formula will not work well.






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            This is very helpful thank you Tyler
            $endgroup$
            – CuriousGeorge
            Dec 21 '18 at 23:02














          1












          1








          1





          $begingroup$

          My guess is that this block formula won't work very well in general, just because of how many different matrix multiplies and inversions are going on.



          As a sample bad case, consider the matrix,
          $$
          X = begin{bmatrix}
          1 & 0 & 1 & 1 \
          0 & epsilon & 1 & 1 \
          1 & 1 & epsilon & 1 \
          1 & 1 & 1 & -epsilon
          end{bmatrix}
          $$



          This matrix is invertible as $epsilon to 0$, and in this limit the condition number approaches something near $5.3$. So for small epsilon, the original matrix is fairly well conditioned and stable algorithms should be able to give a good solution.



          However, The condition number of the condition number of the $(1,1)$ block is $1/epsilon$ which goes to infinity as $epsilon to 0$. This means the inverse of the $(1,1$) block may not even be representable in finite precision arithmetic, and so the block formula will not work well.






          share|cite|improve this answer











          $endgroup$



          My guess is that this block formula won't work very well in general, just because of how many different matrix multiplies and inversions are going on.



          As a sample bad case, consider the matrix,
          $$
          X = begin{bmatrix}
          1 & 0 & 1 & 1 \
          0 & epsilon & 1 & 1 \
          1 & 1 & epsilon & 1 \
          1 & 1 & 1 & -epsilon
          end{bmatrix}
          $$



          This matrix is invertible as $epsilon to 0$, and in this limit the condition number approaches something near $5.3$. So for small epsilon, the original matrix is fairly well conditioned and stable algorithms should be able to give a good solution.



          However, The condition number of the condition number of the $(1,1)$ block is $1/epsilon$ which goes to infinity as $epsilon to 0$. This means the inverse of the $(1,1$) block may not even be representable in finite precision arithmetic, and so the block formula will not work well.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Jan 21 at 15:31

























          answered Dec 21 '18 at 22:44









          tchtch

          803310




          803310












          • $begingroup$
            This is very helpful thank you Tyler
            $endgroup$
            – CuriousGeorge
            Dec 21 '18 at 23:02


















          • $begingroup$
            This is very helpful thank you Tyler
            $endgroup$
            – CuriousGeorge
            Dec 21 '18 at 23:02
















          $begingroup$
          This is very helpful thank you Tyler
          $endgroup$
          – CuriousGeorge
          Dec 21 '18 at 23:02




          $begingroup$
          This is very helpful thank you Tyler
          $endgroup$
          – CuriousGeorge
          Dec 21 '18 at 23:02


















          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%2f3048850%2fblockwise-matrix-inversion-stability%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

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith