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

Matrix equation: Ax=b; can A coefficients be negative? Or could this be error?

  1. Oct 20, 2011 #1
    Hello all:

    I'm using a code for solving partial differential equations that describe transient advection and diffusion.

    I'm more of a chemistry person, so I'm a bit lost on some of the basics of the calculation method.

    A general question:

    As my calculation progresses, I see that some of the A coefficient values (in the equation Ax = b) go negative. This seems weird because all of the values used in the problem represent measurements that I carried out in my lab (positive).

    So I'm trying to figure out whether there is some mathematical reason (like error? Something else I haven't thought of?) why these negative values may be arising or whether there is a bug in the code. I'm not sure if I have provided enough information for anyone to speculate, but I'd be interested in hearing any suggestions. Thanks a lot!
     
  2. jcsd
  3. Oct 20, 2011 #2

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    Assuming you are using some sort of finite difference solution, the coefficients representing a second derivative will form a pattern that looks like -1, 2, -1.

    So negative coefficients in the matrix are prefectly normal, and they won't cause any numerical problems.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Matrix equation: Ax=b; can A coefficients be negative? Or could this be error?
Loading...