Results 1 to 12 of 12

Math Help - [SOLVED] Finding inverse matrix

  1. #1
    newbie66
    Guest

    [SOLVED] Finding inverse matrix

    Hi,I am trying to find the inverse of following matrix,
    [0 1 0 0
    -1 0 1 0
    0 -1 0 1
    0 0 -1 0]
    I got every cofactor correctly except for one, a34,
    Below is the procedure of trying to find the cofactor of a34, please tell me where I made the mistake,
    [ 0 1 0
    -1 x (-1)^(3+4)* -1 0 0
    0 -1 1]
    This becomes,
    [ 0 1 0
    -1 0 0
    0 -1 1]
    Now try to find the determinant using the first row, second column,

    -1^(2+1) [ -1 0
    0 1]
    The answer i got is 1.
    However, using the calculator the correct answer is -1.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by newbie66 View Post
    Hi,I am trying to find the inverse of following matrix,
    [0 1 0 0
    -1 0 1 0
    0 -1 0 1
    0 0 -1 0]
    I got every cofactor correctly except for one, a34,
    Below is the procedure of trying to find the cofactor of a34, please tell me where I made the mistake,
    [ 0 1 0
    -1 x (-1)^(3+4)* -1 0 0
    0 -1 1]
    This becomes,
    [ 0 1 0
    -1 0 0
    0 -1 1]
    Now try to find the determinant using the first row, second column,

    -1^(2+1) [ -1 0
    0 1]
    The answer i got is 1.
    However, using the calculator the correct answer is -1.
    Do you have to invert the matrix this way? It seems much easier to use
    Gaussian elimination.

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Senior Member
    Joined
    Apr 2006
    Posts
    401
    Quote Originally Posted by newbie66 View Post
    Hi,I am trying to find the inverse of following matrix,
    [0 1 0 0
    -1 0 1 0
    0 -1 0 1
    0 0 -1 0]
    I got every cofactor correctly except for one, a34,
    Below is the procedure of trying to find the cofactor of a34, please tell me where I made the mistake,
    [ 0 1 0
    -1 x (-1)^(3+4)* -1 0 0
    0 -1 1]
    This becomes,
    [ 0 1 0
    -1 0 0
    0 -1 1]
    Now try to find the determinant using the first row, second column,

    -1^(2+1) [ -1 0
    0 1]
    The answer i got is 1.
    However, using the calculator the correct answer is -1.
    Augment the matrix to which you're trying to find an inverse with the identity matrix and solve. You'll end up with a pivot in every column/row in the matrix of coefficients, and the solution in the augmented column.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by newbie66 View Post
    Hi,I am trying to find the inverse of following matrix,
    [0 1 0 0
    -1 0 1 0
    0 -1 0 1
    0 0 -1 0]
    What I do not understand why you are using the adjoint matrix. People for some reason love that formula, but the algorithm is much much slower than Gassuan-Jordan elimination in general. Always try elimination first.
    It it really easy here,
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
0&1&0&0&1&0&0&0\\<br />
-1&0&1&0&0&1&0&0\\<br />
0&-1&0&1&0&0&1&0\\<br />
0&0&-1&0&0&0&0&1<br />
\end{array} <br />
\right]
    Interchange second second and first row.
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
-1&0&1&0&0&1&0&0\\<br />
0&1&0&0&1&0&0&0\\<br />
0&-1&0&1&0&0&1&0\\<br />
0&0&-1&0&0&0&0&1<br />
\end{array} <br />
\right]
    Add second row to third. Add forth row to first.
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
-1&0&0&0&0&1&0&1\\<br />
0&1&0&0&1&0&0&0\\<br />
0&0&0&1&1&0&1&0\\<br />
0&0&-1&0&0&0&0&1<br />
\end{array} <br />
\right]
    Interchange third and fourth rows.
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
-1&0&0&0&0&1&0&1\\<br />
0&1&0&0&1&0&0&0\\<br />
0&0&-1&0&0&0&0&1\\<br />
0&0&0&1&1&0&1&0<br />
\end{array} <br />
\right]
    Change signs on first and third rows.
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
1&0&0&0&0&-1&0&-1\\<br />
0&1&0&0&1&0&0&0\\<br />
0&0&1&0&0&0&0&-1\\<br />
0&0&0&1&1&0&1&0<br />
\end{array} <br />
\right]
    Thus,
    A^{-1}= \left[ \begin{array}{cccc}0&-1&0&-1\\1&0&0&0\\0&0&0&-1\\1&0&1&0\end{array} \right]
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ThePerfectHacker View Post
    What I do not understand why you are using the adjoint matrix. People for some reason love that formula, but the algorithm is much much slower than Gassuan-Jordan elimination in general. Always try elimination first.
    It it really easy here,
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
0&1&0&0&1&0&0&0\\<br />
-1&0&1&0&0&1&0&0\\<br />
0&-1&0&1&0&0&1&0\\<br />
0&0&-1&0&0&0&0&1<br />
\end{array} <br />
\right]
    Interchange second second and first row.
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
-1&0&1&0&0&1&0&0\\<br />
0&1&0&0&1&0&0&0\\<br />
0&-1&0&1&0&0&1&0\\<br />
0&0&-1&0&0&0&0&1<br />
\end{array} <br />
\right]
    Add second row to third. Add forth row to first.
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
-1&0&0&0&0&1&0&1\\<br />
0&1&0&0&1&0&0&0\\<br />
0&0&0&1&1&0&1&0\\<br />
0&0&-1&0&0&0&0&1<br />
\end{array} <br />
\right]
    Interchange third and fourth rows.
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
-1&0&0&0&0&1&0&1\\<br />
0&1&0&0&1&0&0&0\\<br />
0&0&-1&0&0&0&0&1\\<br />
0&0&0&1&1&0&1&0<br />
\end{array} <br />
\right]
    Change signs on first and third rows.
    <br />
\left[<br />
\begin{array}{cccccccc}<br />
1&0&0&0&0&-1&0&-1\\<br />
0&1&0&0&1&0&0&0\\<br />
0&0&1&0&0&0&0&-1\\<br />
0&0&0&1&1&0&1&0<br />
\end{array} <br />
\right]
    Thus,
    A^{-1}= \left[ \begin{array}{cccc}0&-1&0&-1\\1&0&0&0\\0&0&0&-1\\1&0&1&0\end{array} \right]

    And in this case Gaussian elimination does not even involve any horrendous arithmetic.

    (I have this on a scrap of paper, but didn't fancy typing all those augmentedmatrices )

    RonL
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by CaptainBlack View Post
    And in this case Gaussian elimination does not even involve any horrendous arithmetic.

    (I have this on a scrap of paper, but didn't fancy typing all those augmentedmatrices )

    RonL
    As an algorthmist you are probably familar the algorithm is Gauss-Jordan, not adjoint matricies. The speed (I think) is O(n^3). While adjoints while elegant are way beyond that, note sure, maybe n!.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ThePerfectHacker View Post
    As an algorthmist you are probably familar the algorithm is Gauss-Jordan, not adjoint matricies. The speed (I think) is O(n^3). While adjoints while elegant are way beyond that, note sure, maybe n!.
    Its a long time since I coded up a matrix inversion routine, I have done
    Gauss-Jordan, iterative methods (who's name I forget), LU decomposition
    inversion, Cholesky decomposition. But I don't remember zilch about them
    other than that they work, and that in general the problems that I have
    are not demanding on matrix inversion performance.

    There has been so much work done on them that if you need one you
    just pick up an appropriate library. (In fact on the special purpose processors
    that we use it would be difficult to improve significantly on the vendor supplied
    optimised libraries without spending a very considerable time playing
    with low level code)

    Also I use tools where they are built in these days.

    Most matrix inversion routines are O(n^3), and differ mainly in the leading
    coefficient. However it is theoretically O(n^log_2(7)).

    RonL
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by CaptainBlack View Post
    iterative methods (who's name I forget),
    Gram-Schmitt maybe
    (I can imagine how you can forget such a name. It reminds of a theorem: Nullezstenzas (which I always forget how to spell)).
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ThePerfectHacker View Post
    Gram-Schmitt maybe
    (I can imagine how you can forget such a name. It reminds of a theorem: Nullezstenzas (which I always forget how to spell)).
    Gram-Schmitt is to generate an orthogonal (orthonormal) basis from
    an arbitrary basis (for inner product spaces). I usually use it for constructing
    polynomials orthogonal over slightly odd spaces wrt slightly odd measures,
    but not matrix inversion. (Sounds more complicated than it is really)

    It is one of the things that really impressed me as an undergraduate
    for some reason.

    RonL
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by CaptainBlack View Post
    It is one of the things that really impressed me as an undergraduate
    for some reason.
    I realized engineering/physics students for some reason are impressed by differencial equations. I think because their non-math professors say they are used in applications and hence they want to learn them. And after they learn them they think they know the most complicated math, while in fact, all they know is how to use formulas. Maybe your situation was similar.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Senior Member
    Joined
    Apr 2006
    Posts
    401
    Quote Originally Posted by CaptainBlack View Post
    Gram-Schmitt is to generate an orthogonal (orthonormal) basis from
    an arbitrary basis (for inner product spaces). I usually use it for constructing
    polynomials orthogonal over slightly odd spaces wrt slightly odd measures,
    but not matrix inversion. (Sounds more complicated than it is really)

    It is one of the things that really impressed me as an undergraduate
    for some reason.

    RonL
    I'm assuming the "Gram-Schmitt" process is the same as the "Gram-Schmidt" process, which is an algorithm for producing an orthonormal basis or orthogonal basis for any nonzero subspace of R^n. Although, I was not sure since google seemed to have a few entries for "Gram-Schmitt".

    Given the basis {x_1, ..., x_p} for subspace W of R^n,

    If v_1 = x_1
    v_2 = x_2 - [(x_2*v_1)/(v_1*v_1)](v_1)
    .
    .
    .
    v_p = x_p - [(x_p*v_1)/(v_1*v_1)](v_1) - [(x_p*v_2)/(v_2*v_2)](v_1) - ... - [(x_p*v_(p-1))/(v_(p-1)*v_(p-1))](v_(p-1))

    Then {v_1, ..., v_p} is an orthogonal basis for W (and Span(v_1, ..., v_k} = Span{x_1, ..., x_k}
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by AfterShock View Post
    I'm assuming the "Gram-Schmitt" process is the same as the "Gram-Schmidt" process, which is an algorithm for producing an orthonormal basis or orthogonal basis for any nonzero subspace of R^n. Although, I was not sure since google seemed to have a few entries for "Gram-Schmitt".
    Google usualy has hits for mispelled words. I didn't check the spelling so
    you are probably right.

    It will find an orthonormal basis from a basis for any inner-product space
    with a countable basis.

    RonL
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Finding the inverse of a matrix
    Posted in the Algebra Forum
    Replies: 5
    Last Post: May 5th 2011, 07:44 AM
  2. Need help and finding the inverse of this matrix.
    Posted in the Advanced Algebra Forum
    Replies: 2
    Last Post: April 12th 2011, 09:49 PM
  3. [SOLVED] Finding the inverse of a matrix using it's elementary matrix?
    Posted in the Advanced Algebra Forum
    Replies: 3
    Last Post: March 7th 2011, 06:08 PM
  4. Finding inverse of a matrix (A^-1)
    Posted in the Advanced Algebra Forum
    Replies: 4
    Last Post: May 13th 2010, 05:01 AM
  5. Finding inverse of a 3X3 Matrix
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: August 4th 2008, 08:45 PM

Search Tags


/mathhelpforum @mathhelpforum