Calculate inverse of matrix with -1 on diagonal and 1 on the rest











up vote
1
down vote

favorite
1












Calculate the inverse of the matrix



begin{bmatrix}
-1& 1& ...& ...&1 \
1& -1& 1& ... &1 \
...& ...& ...& ...&1 \
1&1 &1 & ...&1 \
1& 1 &1 &1 &-1
end{bmatrix}



$-1$ on the diagonal and $1$ on the rest.



The key I think is to perform a sequence of elementary transformations on



[ A | $I_{n}$ ] until we get [ $I_{n}$ | $A^{-1}$ ] but that seems to be complicated.










share|cite|improve this question






















  • Your matrix can be expressed as $A+uv^top$ (see this answer. Then use the Sherman-Morrison formula.
    – StubbornAtom
    2 days ago















up vote
1
down vote

favorite
1












Calculate the inverse of the matrix



begin{bmatrix}
-1& 1& ...& ...&1 \
1& -1& 1& ... &1 \
...& ...& ...& ...&1 \
1&1 &1 & ...&1 \
1& 1 &1 &1 &-1
end{bmatrix}



$-1$ on the diagonal and $1$ on the rest.



The key I think is to perform a sequence of elementary transformations on



[ A | $I_{n}$ ] until we get [ $I_{n}$ | $A^{-1}$ ] but that seems to be complicated.










share|cite|improve this question






















  • Your matrix can be expressed as $A+uv^top$ (see this answer. Then use the Sherman-Morrison formula.
    – StubbornAtom
    2 days ago













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





Calculate the inverse of the matrix



begin{bmatrix}
-1& 1& ...& ...&1 \
1& -1& 1& ... &1 \
...& ...& ...& ...&1 \
1&1 &1 & ...&1 \
1& 1 &1 &1 &-1
end{bmatrix}



$-1$ on the diagonal and $1$ on the rest.



The key I think is to perform a sequence of elementary transformations on



[ A | $I_{n}$ ] until we get [ $I_{n}$ | $A^{-1}$ ] but that seems to be complicated.










share|cite|improve this question













Calculate the inverse of the matrix



begin{bmatrix}
-1& 1& ...& ...&1 \
1& -1& 1& ... &1 \
...& ...& ...& ...&1 \
1&1 &1 & ...&1 \
1& 1 &1 &1 &-1
end{bmatrix}



$-1$ on the diagonal and $1$ on the rest.



The key I think is to perform a sequence of elementary transformations on



[ A | $I_{n}$ ] until we get [ $I_{n}$ | $A^{-1}$ ] but that seems to be complicated.







matrices inverse






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked 2 days ago









SADBOYS

4138




4138












  • Your matrix can be expressed as $A+uv^top$ (see this answer. Then use the Sherman-Morrison formula.
    – StubbornAtom
    2 days ago


















  • Your matrix can be expressed as $A+uv^top$ (see this answer. Then use the Sherman-Morrison formula.
    – StubbornAtom
    2 days ago
















Your matrix can be expressed as $A+uv^top$ (see this answer. Then use the Sherman-Morrison formula.
– StubbornAtom
2 days ago




Your matrix can be expressed as $A+uv^top$ (see this answer. Then use the Sherman-Morrison formula.
– StubbornAtom
2 days ago










3 Answers
3






active

oldest

votes

















up vote
3
down vote



accepted










Let $e$ be the all one vector. We have



$$A=-2I+ee^T$$
By Sheman-Morrison formula:
begin{align}A^{-1}&=(-2I+ee^T)^{-1}\&=-frac12I-frac{-left(frac12Iright)ee^Tleft(-frac12Iright)}{1+e^Tleft( -frac12Iright)e} \
&=-frac12I-frac{frac14ee^T}{1-frac{n}2} \
&=-frac12I-frac{ee^T}{4-2n}
end{align}



Hence, the off diagonal entries are $-frac1{4-2n}$ and the diagonal entries are $-frac12-frac1{4-2n}$.



Remark: If $n=2$, the matrix is not invertible.






share|cite|improve this answer





















  • Because the determinant is $-2^{n-1}(n-2)$ I think, thanks for the help^^
    – SADBOYS
    2 days ago


















up vote
2
down vote













The inverse also has a constant $a$ on the main diagonal and $b$ everywhere else. The constants do depend on the matrix size $n;$ as noted, for $n=2$ there is no inverse. Just try the thing for $n=3$ and $n=4$ and $n=5.$ By that time you should have it, for $n geq 3$



for $n=3:$
$$
left(
begin{array}{rrr}
-1 & 1&1 \
1 & -1&1 \
1 & 1&-1 \
end{array}
right)
left(
begin{array}{ccc}
a & b&b \
b & a&b \
b & b&a \
end{array}
right)=
left(
begin{array}{rrr}
1 & 0&0 \
0 & 1&0 \
0 & 0&1 \
end{array}
right)
$$



for $n=4,$ different $a,b:$
$$
left(
begin{array}{rrrr}
-1 & 1&1&1 \
1 & -1&1&1 \
1 & 1&-1&1 \
1 & 1&1&-1 \
end{array}
right)
left(
begin{array}{cccc}
a & b&b&b \
b & a&b&b \
b & b&a&b \
b & b&b&a \
end{array}
right)=
left(
begin{array}{rrrr}
1 & 0&0&0 \
0 & 1&0&0 \
0 & 0&1&0 \
0 & 0&0&1 \
end{array}
right)
$$



for $n=5,$ still different $a,b:$
$$
left(
begin{array}{rrrrr}
-1 & 1&1&1&1 \
1 & -1&1&1&1 \
1 & 1&-1&1&1 \
1 & 1&1&-1&1 \
1&1&1&1&-1 \
end{array}
right)
left(
begin{array}{ccccc}
a & b&b&b &b\
b & a&b&b&b \
b & b&a&b &b \
b & b&b&a &b \
b&b&b&b&a \
end{array}
right)=
left(
begin{array}{rrrrr}
1 & 0&0&0 &0 \
0 & 1&0&0&0 \
0 & 0&1&0 &0 \
0 & 0&0&1 &0 \
0&0&0&0&1
end{array}
right)
$$






share|cite|improve this answer






























    up vote
    1
    down vote













    It's not too bad...
    $$begin{array}{c}-1\-1\vdots\*
    end{array}left[begin{array}{cccc|cccc}
    -1&1&cdots&1 &1\
    1&-1&cdots&1 &&1\
    vdots&vdots&ddots&vdots &&&ddots\
    1&1&cdots&-1 &&&&1
    end{array}right] implies$$



    $$begin{array}{c}*\*\vdots\small 1/2end{array}
    left[begin{array}{cccc|cccc}
    -2&&&2 &1&&&-1\
    &-2&&2 &&1&&-1\
    &&ddots& &&&ddots\
    1&1&&-1 &&&&1
    end{array}right] implies$$



    $$begin{array}{c}*small -1/2\*small -1/2\vdots\* small ^1!/_{!n-2}end{array}
    left[begin{array}{cccc|cccc}
    -2&&&2 &1&&&-1\
    &-2&&2 &&1&&-1\
    &&ddots& &&&ddots\
    &&&n-2 &small 1/2&small 1/2&&small-^{(n-3)!}/_{!2}
    end{array}right] implies$$



    $$begin{array}{c}1\1\vdots\*end{array}
    left[begin{array}{cccc|cccc}
    1&&&-1 &small -1/2&&&small 1/2\
    &1&&-1 &&small -1/2&&small 1/2\
    &&ddots& &&&ddots\
    &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
    end{array}right] implies$$



    $$begin{array}{c} \ \ \ end{array}
    left[begin{array}{cccc|cccc}
    1&&& &small -^1!/_{!2}+ ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
    &1&& &small ^1!/_{!2(n-2)}&small -^1!/_{!2}+ ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
    &&ddots& &vdots&vdots&ddots&vdots\
    &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
    end{array}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: 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%2f3020465%2fcalculate-inverse-of-matrix-with-1-on-diagonal-and-1-on-the-rest%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      3
      down vote



      accepted










      Let $e$ be the all one vector. We have



      $$A=-2I+ee^T$$
      By Sheman-Morrison formula:
      begin{align}A^{-1}&=(-2I+ee^T)^{-1}\&=-frac12I-frac{-left(frac12Iright)ee^Tleft(-frac12Iright)}{1+e^Tleft( -frac12Iright)e} \
      &=-frac12I-frac{frac14ee^T}{1-frac{n}2} \
      &=-frac12I-frac{ee^T}{4-2n}
      end{align}



      Hence, the off diagonal entries are $-frac1{4-2n}$ and the diagonal entries are $-frac12-frac1{4-2n}$.



      Remark: If $n=2$, the matrix is not invertible.






      share|cite|improve this answer





















      • Because the determinant is $-2^{n-1}(n-2)$ I think, thanks for the help^^
        – SADBOYS
        2 days ago















      up vote
      3
      down vote



      accepted










      Let $e$ be the all one vector. We have



      $$A=-2I+ee^T$$
      By Sheman-Morrison formula:
      begin{align}A^{-1}&=(-2I+ee^T)^{-1}\&=-frac12I-frac{-left(frac12Iright)ee^Tleft(-frac12Iright)}{1+e^Tleft( -frac12Iright)e} \
      &=-frac12I-frac{frac14ee^T}{1-frac{n}2} \
      &=-frac12I-frac{ee^T}{4-2n}
      end{align}



      Hence, the off diagonal entries are $-frac1{4-2n}$ and the diagonal entries are $-frac12-frac1{4-2n}$.



      Remark: If $n=2$, the matrix is not invertible.






      share|cite|improve this answer





















      • Because the determinant is $-2^{n-1}(n-2)$ I think, thanks for the help^^
        – SADBOYS
        2 days ago













      up vote
      3
      down vote



      accepted







      up vote
      3
      down vote



      accepted






      Let $e$ be the all one vector. We have



      $$A=-2I+ee^T$$
      By Sheman-Morrison formula:
      begin{align}A^{-1}&=(-2I+ee^T)^{-1}\&=-frac12I-frac{-left(frac12Iright)ee^Tleft(-frac12Iright)}{1+e^Tleft( -frac12Iright)e} \
      &=-frac12I-frac{frac14ee^T}{1-frac{n}2} \
      &=-frac12I-frac{ee^T}{4-2n}
      end{align}



      Hence, the off diagonal entries are $-frac1{4-2n}$ and the diagonal entries are $-frac12-frac1{4-2n}$.



      Remark: If $n=2$, the matrix is not invertible.






      share|cite|improve this answer












      Let $e$ be the all one vector. We have



      $$A=-2I+ee^T$$
      By Sheman-Morrison formula:
      begin{align}A^{-1}&=(-2I+ee^T)^{-1}\&=-frac12I-frac{-left(frac12Iright)ee^Tleft(-frac12Iright)}{1+e^Tleft( -frac12Iright)e} \
      &=-frac12I-frac{frac14ee^T}{1-frac{n}2} \
      &=-frac12I-frac{ee^T}{4-2n}
      end{align}



      Hence, the off diagonal entries are $-frac1{4-2n}$ and the diagonal entries are $-frac12-frac1{4-2n}$.



      Remark: If $n=2$, the matrix is not invertible.







      share|cite|improve this answer












      share|cite|improve this answer



      share|cite|improve this answer










      answered 2 days ago









      Siong Thye Goh

      95.4k1462116




      95.4k1462116












      • Because the determinant is $-2^{n-1}(n-2)$ I think, thanks for the help^^
        – SADBOYS
        2 days ago


















      • Because the determinant is $-2^{n-1}(n-2)$ I think, thanks for the help^^
        – SADBOYS
        2 days ago
















      Because the determinant is $-2^{n-1}(n-2)$ I think, thanks for the help^^
      – SADBOYS
      2 days ago




      Because the determinant is $-2^{n-1}(n-2)$ I think, thanks for the help^^
      – SADBOYS
      2 days ago










      up vote
      2
      down vote













      The inverse also has a constant $a$ on the main diagonal and $b$ everywhere else. The constants do depend on the matrix size $n;$ as noted, for $n=2$ there is no inverse. Just try the thing for $n=3$ and $n=4$ and $n=5.$ By that time you should have it, for $n geq 3$



      for $n=3:$
      $$
      left(
      begin{array}{rrr}
      -1 & 1&1 \
      1 & -1&1 \
      1 & 1&-1 \
      end{array}
      right)
      left(
      begin{array}{ccc}
      a & b&b \
      b & a&b \
      b & b&a \
      end{array}
      right)=
      left(
      begin{array}{rrr}
      1 & 0&0 \
      0 & 1&0 \
      0 & 0&1 \
      end{array}
      right)
      $$



      for $n=4,$ different $a,b:$
      $$
      left(
      begin{array}{rrrr}
      -1 & 1&1&1 \
      1 & -1&1&1 \
      1 & 1&-1&1 \
      1 & 1&1&-1 \
      end{array}
      right)
      left(
      begin{array}{cccc}
      a & b&b&b \
      b & a&b&b \
      b & b&a&b \
      b & b&b&a \
      end{array}
      right)=
      left(
      begin{array}{rrrr}
      1 & 0&0&0 \
      0 & 1&0&0 \
      0 & 0&1&0 \
      0 & 0&0&1 \
      end{array}
      right)
      $$



      for $n=5,$ still different $a,b:$
      $$
      left(
      begin{array}{rrrrr}
      -1 & 1&1&1&1 \
      1 & -1&1&1&1 \
      1 & 1&-1&1&1 \
      1 & 1&1&-1&1 \
      1&1&1&1&-1 \
      end{array}
      right)
      left(
      begin{array}{ccccc}
      a & b&b&b &b\
      b & a&b&b&b \
      b & b&a&b &b \
      b & b&b&a &b \
      b&b&b&b&a \
      end{array}
      right)=
      left(
      begin{array}{rrrrr}
      1 & 0&0&0 &0 \
      0 & 1&0&0&0 \
      0 & 0&1&0 &0 \
      0 & 0&0&1 &0 \
      0&0&0&0&1
      end{array}
      right)
      $$






      share|cite|improve this answer



























        up vote
        2
        down vote













        The inverse also has a constant $a$ on the main diagonal and $b$ everywhere else. The constants do depend on the matrix size $n;$ as noted, for $n=2$ there is no inverse. Just try the thing for $n=3$ and $n=4$ and $n=5.$ By that time you should have it, for $n geq 3$



        for $n=3:$
        $$
        left(
        begin{array}{rrr}
        -1 & 1&1 \
        1 & -1&1 \
        1 & 1&-1 \
        end{array}
        right)
        left(
        begin{array}{ccc}
        a & b&b \
        b & a&b \
        b & b&a \
        end{array}
        right)=
        left(
        begin{array}{rrr}
        1 & 0&0 \
        0 & 1&0 \
        0 & 0&1 \
        end{array}
        right)
        $$



        for $n=4,$ different $a,b:$
        $$
        left(
        begin{array}{rrrr}
        -1 & 1&1&1 \
        1 & -1&1&1 \
        1 & 1&-1&1 \
        1 & 1&1&-1 \
        end{array}
        right)
        left(
        begin{array}{cccc}
        a & b&b&b \
        b & a&b&b \
        b & b&a&b \
        b & b&b&a \
        end{array}
        right)=
        left(
        begin{array}{rrrr}
        1 & 0&0&0 \
        0 & 1&0&0 \
        0 & 0&1&0 \
        0 & 0&0&1 \
        end{array}
        right)
        $$



        for $n=5,$ still different $a,b:$
        $$
        left(
        begin{array}{rrrrr}
        -1 & 1&1&1&1 \
        1 & -1&1&1&1 \
        1 & 1&-1&1&1 \
        1 & 1&1&-1&1 \
        1&1&1&1&-1 \
        end{array}
        right)
        left(
        begin{array}{ccccc}
        a & b&b&b &b\
        b & a&b&b&b \
        b & b&a&b &b \
        b & b&b&a &b \
        b&b&b&b&a \
        end{array}
        right)=
        left(
        begin{array}{rrrrr}
        1 & 0&0&0 &0 \
        0 & 1&0&0&0 \
        0 & 0&1&0 &0 \
        0 & 0&0&1 &0 \
        0&0&0&0&1
        end{array}
        right)
        $$






        share|cite|improve this answer

























          up vote
          2
          down vote










          up vote
          2
          down vote









          The inverse also has a constant $a$ on the main diagonal and $b$ everywhere else. The constants do depend on the matrix size $n;$ as noted, for $n=2$ there is no inverse. Just try the thing for $n=3$ and $n=4$ and $n=5.$ By that time you should have it, for $n geq 3$



          for $n=3:$
          $$
          left(
          begin{array}{rrr}
          -1 & 1&1 \
          1 & -1&1 \
          1 & 1&-1 \
          end{array}
          right)
          left(
          begin{array}{ccc}
          a & b&b \
          b & a&b \
          b & b&a \
          end{array}
          right)=
          left(
          begin{array}{rrr}
          1 & 0&0 \
          0 & 1&0 \
          0 & 0&1 \
          end{array}
          right)
          $$



          for $n=4,$ different $a,b:$
          $$
          left(
          begin{array}{rrrr}
          -1 & 1&1&1 \
          1 & -1&1&1 \
          1 & 1&-1&1 \
          1 & 1&1&-1 \
          end{array}
          right)
          left(
          begin{array}{cccc}
          a & b&b&b \
          b & a&b&b \
          b & b&a&b \
          b & b&b&a \
          end{array}
          right)=
          left(
          begin{array}{rrrr}
          1 & 0&0&0 \
          0 & 1&0&0 \
          0 & 0&1&0 \
          0 & 0&0&1 \
          end{array}
          right)
          $$



          for $n=5,$ still different $a,b:$
          $$
          left(
          begin{array}{rrrrr}
          -1 & 1&1&1&1 \
          1 & -1&1&1&1 \
          1 & 1&-1&1&1 \
          1 & 1&1&-1&1 \
          1&1&1&1&-1 \
          end{array}
          right)
          left(
          begin{array}{ccccc}
          a & b&b&b &b\
          b & a&b&b&b \
          b & b&a&b &b \
          b & b&b&a &b \
          b&b&b&b&a \
          end{array}
          right)=
          left(
          begin{array}{rrrrr}
          1 & 0&0&0 &0 \
          0 & 1&0&0&0 \
          0 & 0&1&0 &0 \
          0 & 0&0&1 &0 \
          0&0&0&0&1
          end{array}
          right)
          $$






          share|cite|improve this answer














          The inverse also has a constant $a$ on the main diagonal and $b$ everywhere else. The constants do depend on the matrix size $n;$ as noted, for $n=2$ there is no inverse. Just try the thing for $n=3$ and $n=4$ and $n=5.$ By that time you should have it, for $n geq 3$



          for $n=3:$
          $$
          left(
          begin{array}{rrr}
          -1 & 1&1 \
          1 & -1&1 \
          1 & 1&-1 \
          end{array}
          right)
          left(
          begin{array}{ccc}
          a & b&b \
          b & a&b \
          b & b&a \
          end{array}
          right)=
          left(
          begin{array}{rrr}
          1 & 0&0 \
          0 & 1&0 \
          0 & 0&1 \
          end{array}
          right)
          $$



          for $n=4,$ different $a,b:$
          $$
          left(
          begin{array}{rrrr}
          -1 & 1&1&1 \
          1 & -1&1&1 \
          1 & 1&-1&1 \
          1 & 1&1&-1 \
          end{array}
          right)
          left(
          begin{array}{cccc}
          a & b&b&b \
          b & a&b&b \
          b & b&a&b \
          b & b&b&a \
          end{array}
          right)=
          left(
          begin{array}{rrrr}
          1 & 0&0&0 \
          0 & 1&0&0 \
          0 & 0&1&0 \
          0 & 0&0&1 \
          end{array}
          right)
          $$



          for $n=5,$ still different $a,b:$
          $$
          left(
          begin{array}{rrrrr}
          -1 & 1&1&1&1 \
          1 & -1&1&1&1 \
          1 & 1&-1&1&1 \
          1 & 1&1&-1&1 \
          1&1&1&1&-1 \
          end{array}
          right)
          left(
          begin{array}{ccccc}
          a & b&b&b &b\
          b & a&b&b&b \
          b & b&a&b &b \
          b & b&b&a &b \
          b&b&b&b&a \
          end{array}
          right)=
          left(
          begin{array}{rrrrr}
          1 & 0&0&0 &0 \
          0 & 1&0&0&0 \
          0 & 0&1&0 &0 \
          0 & 0&0&1 &0 \
          0&0&0&0&1
          end{array}
          right)
          $$







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited 2 days ago

























          answered 2 days ago









          Will Jagy

          101k597198




          101k597198






















              up vote
              1
              down vote













              It's not too bad...
              $$begin{array}{c}-1\-1\vdots\*
              end{array}left[begin{array}{cccc|cccc}
              -1&1&cdots&1 &1\
              1&-1&cdots&1 &&1\
              vdots&vdots&ddots&vdots &&&ddots\
              1&1&cdots&-1 &&&&1
              end{array}right] implies$$



              $$begin{array}{c}*\*\vdots\small 1/2end{array}
              left[begin{array}{cccc|cccc}
              -2&&&2 &1&&&-1\
              &-2&&2 &&1&&-1\
              &&ddots& &&&ddots\
              1&1&&-1 &&&&1
              end{array}right] implies$$



              $$begin{array}{c}*small -1/2\*small -1/2\vdots\* small ^1!/_{!n-2}end{array}
              left[begin{array}{cccc|cccc}
              -2&&&2 &1&&&-1\
              &-2&&2 &&1&&-1\
              &&ddots& &&&ddots\
              &&&n-2 &small 1/2&small 1/2&&small-^{(n-3)!}/_{!2}
              end{array}right] implies$$



              $$begin{array}{c}1\1\vdots\*end{array}
              left[begin{array}{cccc|cccc}
              1&&&-1 &small -1/2&&&small 1/2\
              &1&&-1 &&small -1/2&&small 1/2\
              &&ddots& &&&ddots\
              &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
              end{array}right] implies$$



              $$begin{array}{c} \ \ \ end{array}
              left[begin{array}{cccc|cccc}
              1&&& &small -^1!/_{!2}+ ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
              &1&& &small ^1!/_{!2(n-2)}&small -^1!/_{!2}+ ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
              &&ddots& &vdots&vdots&ddots&vdots\
              &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
              end{array}right]$$






              share|cite|improve this answer

























                up vote
                1
                down vote













                It's not too bad...
                $$begin{array}{c}-1\-1\vdots\*
                end{array}left[begin{array}{cccc|cccc}
                -1&1&cdots&1 &1\
                1&-1&cdots&1 &&1\
                vdots&vdots&ddots&vdots &&&ddots\
                1&1&cdots&-1 &&&&1
                end{array}right] implies$$



                $$begin{array}{c}*\*\vdots\small 1/2end{array}
                left[begin{array}{cccc|cccc}
                -2&&&2 &1&&&-1\
                &-2&&2 &&1&&-1\
                &&ddots& &&&ddots\
                1&1&&-1 &&&&1
                end{array}right] implies$$



                $$begin{array}{c}*small -1/2\*small -1/2\vdots\* small ^1!/_{!n-2}end{array}
                left[begin{array}{cccc|cccc}
                -2&&&2 &1&&&-1\
                &-2&&2 &&1&&-1\
                &&ddots& &&&ddots\
                &&&n-2 &small 1/2&small 1/2&&small-^{(n-3)!}/_{!2}
                end{array}right] implies$$



                $$begin{array}{c}1\1\vdots\*end{array}
                left[begin{array}{cccc|cccc}
                1&&&-1 &small -1/2&&&small 1/2\
                &1&&-1 &&small -1/2&&small 1/2\
                &&ddots& &&&ddots\
                &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
                end{array}right] implies$$



                $$begin{array}{c} \ \ \ end{array}
                left[begin{array}{cccc|cccc}
                1&&& &small -^1!/_{!2}+ ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
                &1&& &small ^1!/_{!2(n-2)}&small -^1!/_{!2}+ ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
                &&ddots& &vdots&vdots&ddots&vdots\
                &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
                end{array}right]$$






                share|cite|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  It's not too bad...
                  $$begin{array}{c}-1\-1\vdots\*
                  end{array}left[begin{array}{cccc|cccc}
                  -1&1&cdots&1 &1\
                  1&-1&cdots&1 &&1\
                  vdots&vdots&ddots&vdots &&&ddots\
                  1&1&cdots&-1 &&&&1
                  end{array}right] implies$$



                  $$begin{array}{c}*\*\vdots\small 1/2end{array}
                  left[begin{array}{cccc|cccc}
                  -2&&&2 &1&&&-1\
                  &-2&&2 &&1&&-1\
                  &&ddots& &&&ddots\
                  1&1&&-1 &&&&1
                  end{array}right] implies$$



                  $$begin{array}{c}*small -1/2\*small -1/2\vdots\* small ^1!/_{!n-2}end{array}
                  left[begin{array}{cccc|cccc}
                  -2&&&2 &1&&&-1\
                  &-2&&2 &&1&&-1\
                  &&ddots& &&&ddots\
                  &&&n-2 &small 1/2&small 1/2&&small-^{(n-3)!}/_{!2}
                  end{array}right] implies$$



                  $$begin{array}{c}1\1\vdots\*end{array}
                  left[begin{array}{cccc|cccc}
                  1&&&-1 &small -1/2&&&small 1/2\
                  &1&&-1 &&small -1/2&&small 1/2\
                  &&ddots& &&&ddots\
                  &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
                  end{array}right] implies$$



                  $$begin{array}{c} \ \ \ end{array}
                  left[begin{array}{cccc|cccc}
                  1&&& &small -^1!/_{!2}+ ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
                  &1&& &small ^1!/_{!2(n-2)}&small -^1!/_{!2}+ ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
                  &&ddots& &vdots&vdots&ddots&vdots\
                  &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
                  end{array}right]$$






                  share|cite|improve this answer












                  It's not too bad...
                  $$begin{array}{c}-1\-1\vdots\*
                  end{array}left[begin{array}{cccc|cccc}
                  -1&1&cdots&1 &1\
                  1&-1&cdots&1 &&1\
                  vdots&vdots&ddots&vdots &&&ddots\
                  1&1&cdots&-1 &&&&1
                  end{array}right] implies$$



                  $$begin{array}{c}*\*\vdots\small 1/2end{array}
                  left[begin{array}{cccc|cccc}
                  -2&&&2 &1&&&-1\
                  &-2&&2 &&1&&-1\
                  &&ddots& &&&ddots\
                  1&1&&-1 &&&&1
                  end{array}right] implies$$



                  $$begin{array}{c}*small -1/2\*small -1/2\vdots\* small ^1!/_{!n-2}end{array}
                  left[begin{array}{cccc|cccc}
                  -2&&&2 &1&&&-1\
                  &-2&&2 &&1&&-1\
                  &&ddots& &&&ddots\
                  &&&n-2 &small 1/2&small 1/2&&small-^{(n-3)!}/_{!2}
                  end{array}right] implies$$



                  $$begin{array}{c}1\1\vdots\*end{array}
                  left[begin{array}{cccc|cccc}
                  1&&&-1 &small -1/2&&&small 1/2\
                  &1&&-1 &&small -1/2&&small 1/2\
                  &&ddots& &&&ddots\
                  &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
                  end{array}right] implies$$



                  $$begin{array}{c} \ \ \ end{array}
                  left[begin{array}{cccc|cccc}
                  1&&& &small -^1!/_{!2}+ ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
                  &1&& &small ^1!/_{!2(n-2)}&small -^1!/_{!2}+ ^1!/_{!2(n-2)}&cdots&small ^1!/_{!2(n-2)}\
                  &&ddots& &vdots&vdots&ddots&vdots\
                  &&&1 &small ^1!/_{!2(n-2)}&small ^1!/_{!2(n-2)}&cdots&small -^1!/_{!2}+ ^1!/_{!2(n-2)}
                  end{array}right]$$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered 2 days ago









                  I like Serena

                  3,3181718




                  3,3181718






























                      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.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • 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.


                      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%2f3020465%2fcalculate-inverse-of-matrix-with-1-on-diagonal-and-1-on-the-rest%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

                      Bressuire

                      Cabo Verde

                      Gyllenstierna