Hello i was wondering how to store a tridiagonal matrix in c++
i know i have to use three arrays for the upper lower and diagonal terms, but how do i then use parenthesis operator to access single elements of the matrix when it is stored as three separate arrays....also how would i code a tridiagonal matrix multliplication with a vector?

thanks for your help

Give this a read about the parentheses operator. It's partly relevant to your problem. When you are thinking about how to divide the numbers up, if row and column are the position of any one element, what is the relationship between row and column in any of the 3 matrices?

Have a go at it and then we can help you with whatever code you come up with.