Tridiagonal matrices appears in many contexts in pure and applied mathematics, so the study of the inverse of these matrices becomes of specific interest. In recent years the invertibility of nonsingular tridiagonal matrices has been quite investigated in different fields, not only from the theoretical point of view (either in the framework of linear algebra or in the ambit of numerical analysis), but also due to applications, for instance in the study of sound propagation problems or certain quantum oscillators. However, explicit inverses are known only in a few cases, in particular when the tridiagonal matrix has constant diagonals or the coefficients of these diagonals are subjected to some restrictions like the tridiagonal k-Toeplitz matrices, such that their three diagonals are formed by k-periodic sequences.The recent formulae for the inversion of tridiagonal k-Toeplitz matrices are based, more o less directly, on the solution of difference equations with periodic coefficients, though all of them use complex formulation that in fact don't take into account the periodicity of the coefficients.This contribution presents the explicit inverse of a tridiagonal matrix (p, r)-Toeplitz, which diagonal coefficients are in a more general class of sequences than periodic ones, that we have called quasi-periodic sequences. A tridiagonal matrix A = (a ij ) of order n + 2 is (p, r)-Toeplitz if there exists m ∈ N \ {0} such that n + 2 = mp andwe develop a procedure that reduces any linear second order difference equation with periodic coefficients to a difference equation of the same kind but with constant coefficients. Therefore, the solutions of the former equations can be expressed in terms of Chebyshev polynomials This fact explain why Chebyshev polynomials are ubiquitous in the above mentioned papers In addition, we show that this results are true when the coefficients are in a more general class of sequences, that we have called quasi-periodic sequences As a by-product, the inversion of these class of tridiagonal matrices could be explicitly obtained through the resolution of boundary value problems on a path Making use of the theory of orthogonal polynomials, we will give the explicit inverse of tridiagonal 2-Toeplitz and 3-Toeplitz matrices, based on recent results from which enables us to state some conditions for the existence of A − 1. We obtain explicit formulas for the entries of the inverse of a based on results from the theory of orthogonal polynomials and it is shown that the entries of the inverse of such a matrix are given in terms of Chebyshev polynomials of the second kind.como corolario, constante k-top, geometricas It is well-known that any second order linear difference equation with constant coefficients is equivalent to a Chebyshev equation. The aim of this work is to extend this result to any second order linear difference equation with quasi-periodic coefficients.We say that a sequence z, z : Z −→ C, is quasi-periodic with period p ∈ N \ {0} if there exists r ∈ C \ {0} such thatGiven a ...