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