Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Centered Difference Matrix

  1. Jun 16, 2015 #1
    A difference matrix takes the entries of a vector and computes the differences between the entries like
    [x1 - 0 ] = difference from 0 and x1: 1 step
    [x2 - x1] = difference from x2 and x1: 1 step
    [x3 - x2] = difference from x3 and x2: 1 step

    assuming we had a vector x in Ax = b

    So why now when it becomes centered, does it become
    [x2 - 0 ] = difference from x2 and 0: 1 step
    [x3 - x1] = difference from x3 and x1: 1 step
    [0 - x3] = difference from 0 and x3: -3 steps!!!!!!!!!!
     
    Last edited by a moderator: Jun 17, 2015
  2. jcsd
  3. Jun 17, 2015 #2

    RUber

    User Avatar
    Homework Helper

    What is the application for this? It is tough to tell what the benefit would be without seeing how it is used.
     
  4. Jun 17, 2015 #3
    its not for a particular application, just for better understanding of centered difference matrices
     
  5. Jun 17, 2015 #4

    RUber

    User Avatar
    Homework Helper

    I think you might have the wrong definition for the centered difference matrix.
    See the exercises in this source: http://math.mit.edu/~gs/linearalgebra/ila0103.pdf
    They should be even steps. For a 3D space, you might get something like:
    ##\pmatrix{x2\\x3-x1\\-x2} ##
    In a 4D space, you might get something like:
    ##\pmatrix{x2\\x3-x1\\x4-x2\\-x3} ##
    These originate from matrices that look like:
    ##\pmatrix{0 &1& 0\\-1 &0 &1 \\ 0&-1& 0 } ## or ##\pmatrix{0 &1 &0 &0\\-1 &0 &1& 0 \\ 0 &-1& 0 & 1 \\ 0 &0 &-1& 0 } ##
    times your x vector.
     
  6. Jun 17, 2015 #5
    A centered difference matrix is the difference between the preceding and following entries in x. I hope that's correct.
    So it follows that your 3D centered difference matrix,

    x1 is the difference between x2 - 0
    x2 is the difference between x3 - x1

    However
    x3 is NOT the difference between 0 - x3

    Is it because there is no x4 value in which to center x3 around i.e. x4 - x2?

    When its not centered via the link you prescribed, it's easy to understand.
     
  7. Jun 17, 2015 #6

    RUber

    User Avatar
    Homework Helper

    That's how I understand it. Zero does not refer to any value, it simply is a placeholder to show that there is no x value in that place.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook