What is meant by tridiagonal linear equation system?

295 Views Asked by At

I have to implement the SOR (Successive Over-Relaxation) method, using sparse matrices, to find the solution vector of these linear equations systems (for quite huge matrices):

linear equations system

What does that tridiag(-1,3,-1) or tridiag(1,2,1) mean? For the 1st example, what are the -1, 3 and -1? For the 2nd, what does the 1, 2 and 1 mean? Is it a matrix with a diagonal of (-1,3,1) or what could that be?

Thank you in advance!

2

There are 2 best solutions below

0
On BEST ANSWER

A tridiagonal $(a,b,c)$ is a matrix with upper diagonal terms $a$ and the diagonal terms $b$ and lower diagonal terms $c$

4
On

A tridiagonal matrix $(a,b,c)$ very probably denotes a matrix with $b$s on the diagonal,$a$s on the first underdiagonal, $c$ on the first overdiagonal and $0$ everywhere else, like this: $$\begin{pmatrix} b&c&0&\dots &0&0&0 \\ a&b&c&\dots&0 &0&0\\ 0&a&b&\ddots&0&0 &0\\[-1ex] \vdots&\ddots&\ddots&\ddots&\ddots&\ddots&\vdots \\[-3ex] 0&0&0&\ddots&b&c&0 \\ 0&0&0&\dots&a&b&c \\ 0&0&0&\dots&0&a&b \end{pmatrix}$$