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

Tridiagonal matrices multiplication

  1. Oct 14, 2012 #1
    I have a nxn tridiagonal matrix (let's name it A) and i want to find a way to solve Ap, p=1,2,3,....inf, most efficient* (using the structure of my matrix)
    my first problem is how many calculations do i need for A2,
    and then how many calculations for the hole Ap ?

    any help please!!!

    *by most efficient i mean with the least calculations possible
  2. jcsd
  3. Oct 14, 2012 #2


    User Avatar
    Science Advisor
    Homework Helper

    For A2, work out which terms are nonzero. It is a banded matrix, but not tridiagonal.

    Then work out how many calculations you have to do to find each nonzero entry. For most of the terms that will be 3 miltiples and 2 adds, but the first and last rows and columns of A don't have 3 nonzero entries.

    Then go on to A3, A4, etc.

    If you are want to calculate all the powers of A in order, there is more than one way to do the higher powers. For eaxmple A4 = A3.A or A2,A2. One way might be cheaper than the other.
  4. Oct 15, 2012 #3
    first of all thank you !!! but my real problem is how to calculation the number of calculations ( :tongue: ) i need for a Ap, i can find out how many calculations i need for A2, and for A3 etc. but every time the array change structure (tridiagonal->fivediagonal->sevendiagonal ...) any help please...
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook