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):
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!

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