Results 1 to 5 of 5

Thread: determinant of a 5x5 matrix

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715

    determinant of a 5x5 matrix

    how would I go about finding the determinant of a 5x5 matrix (not using a calc)
    NXSupport - Your one-stop source for computer help

  2. #2
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Talking hmmm...

    i'm not exactly sure, but i believe there's a general recursive-type way of finding any determinant:

    Let total = 0;
    Choose the first row.
    For each number in that row, find the determinant of the smaller 4(n-1)x(n-1) matrix made up of the nxn matrix without the row and column the chosen number is in.
    Find the determinant of this, and multiply this by the chosen number.
    if the number is the 2nd/4th/6th etc in the row, take this product from total. If it is 1st/3rd/5th etc, add it.

    The final total will be the determinant.

    Code:
    | 1 2 3 4 5 |  
    | 2 3 4 5 6 |       | 3 4 5 6 |       | 2 4 5 6 |
    | 5 4 3 2 1 | = 1 * | 4 3 2 1 | - 2 * | 5 3 2 1 | + 3 * ...
    | 4 3 2 1 0 |       | 3 2 1 0 |       | 4 2 1 0 |
    | 1 3 5 7 9 |       | 3 5 7 9 |       | 1 5 7 9 |
    sql_lall

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    gausselimination.
    take each row starting from the second and subtract a multiple of the first row to get 0 in the first column, then do so starting from the third row and subtrating a multiple of the second row to get 0 in the second column etc.. you should end up with an echelon matrix (upper right triangluar matrix), the determinant is the product of the diagonale (which should be 0 if there is any linearity).
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    A search of this forum will turn up more on Gauss elimination for solving linear equations, inverting a square matrix, and/or evaluating determinant. One thread has an attached VB program for Guass elimination.

    The Kedaman version of Gauss is good for the detrminant evaluation because it avoids division by zero if the matrix is ill conditioned.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    ok thanks, i need the work for this though, so im thinking of writing a vb app which will show all the work for me, but im not sure how im going to put it together yet
    NXSupport - Your one-stop source for computer help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width