Thread: Determinant by minors

  1. #1
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426

    Determinant by minors

    Not technically a computer question, and not a plea for understanding.
    I'm just a bit curious, and I hope maybe someone may have an answer, though I realize this isn't a math forum. I guess I'm just letting off a little math-related steam.

    When doing the determinant of a 3x3 matrix, one way to calculate it is by doing a determinant by minors (see attached image).

    Why is it that the standard notation has the second term with the determinant of [[d f][g i]] subtracted when it would be more logical to add the determinant of [[f d][i g]]? That nets the same answer and also creates a more logical pattern in the terms of the equation. If you get what I mean, it's like "shifting" the sub-matrix over, and the columns wrap around. It's been bugging me profusely that this isn't the case anywhere I look.

    Edit: changed picture
    Last edited by bernt; 11-18-2010 at 12:41 AM.
    Consider this post signed

  2. #2
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    Posts
    431
    I think it's done this way so that the sub indices are always in increasing order. It's probably easier to do this and alternate signs than it is to wrap when you're generalizing the algorithm. I'll bet your way would get confusing when working with 4x4 or 5x5 (or larger) matrices.
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834
    According to Wolfram
    Determinant Expansion by Minors -- from Wolfram MathWorld
    ... the equation has (-1)^(1+j) which means the terms alternate +/-. In other words cofactors are checkerborded +1 and -1.

  4. #4
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    ... the equation has (-1)^(1+j) which means the terms alternate +/-. In other words cofactors are checkerborded +1 and -1.
    I agree. But this is beside the point.

    The determinant of
    Code:
    a c
    d f
    is equal to -1 times the determinant of
    Code:
    c a
    f d
    And if we consider a, c, d, and f to be members of a larger 3x3 matrix
    Code:
    a b c
    d e f
    g h i
    It's the difference between having a minor that starts at the top left and skips a row/column, and having a minor that starts next to the intersection of that row/column and wraps around a la pacman. The fact that some minors wrap around and others don't automatically accounts for whatever subtracting one might have to do with the normal method.

    The point I was making is that the method I'm describing works too, and that it seems more intuitive (at least, to me it does :P). It works everywhere the normal method works (by mathematical proof), including finding minors for a matrix of any size, and it doesn't involve determining which terms are subtracted and which aren't.
    Consider this post signed

  5. #5
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by bernt View Post
    It works everywhere the normal method works (by mathematical proof),
    Hey I know I'm late, but: if you have a proof of this, you should throw it away, because it only works for odd permutations, and for an odd permutation you need to start with an odd number.

    For instance consider the matrix that goes from 1 to 16, but then swap the 14 and 16. Then look at the cofactor you would get by eliminating the 2. The right one is
    Code:
     | 5  7  8|
    -| 9 11 12| = -16
     |13 15 14|
    but your method gives
    Code:
    | 7  8  5|
    |11 12  9| = 16
    |15 14 13|
    (essentially because you have to swap columns twice; each one gives one negative sign, but two negatives is positive again).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fast Determinant evaluator
    By jack_carver in forum C Programming
    Replies: 2
    Last Post: 12-28-2009, 08:42 PM
  2. matrix determinant
    By roaan in forum C Programming
    Replies: 1
    Last Post: 06-30-2009, 12:44 PM
  3. Recursive algorithm to find the determinant of a matrix
    By mahesh.mach in forum C Programming
    Replies: 3
    Last Post: 06-07-2007, 09:13 AM
  4. determinant?! HELP!!!
    By ankurtrick in forum C Programming
    Replies: 1
    Last Post: 10-08-2004, 09:12 PM
  5. determinant
    By the Wookie in forum C++ Programming
    Replies: 3
    Last Post: 07-08-2003, 09:30 AM