Annales Univ. Sci. Budapest., Sect. Comp. 51 (2020) 3950

ON SOME PENTADIAGONAL MATRICES: THEIR DETERMINANTS AND INVERSES

Carlos M. da Fonseca (Safat, Kuwait) László Losonczi (Debrecen, Hungary)

Dedicated to the 70th birthday of Professor Antal Járai

Communicated by László Szili (Received February 7, 2020; accepted June 2, 2020)

Abstract. In this paper we consider pentadiagonal (n+1)×(n+1) matri- ces with two super-diagonals and two sub-diagonals at distances k and 2k from the main diagonal. We give an explicit formula for their determinants provided that (n + 1)/3 ≤ k ≤ n/2. We consider the Toeplitz and imper- fect Toeplitz versions of such matrices, and give explicit formulas for their determinants. We also show that the inverse can be obtained as the product of an upper triangle matrix with two super-diagonals, a diagonal and a lower triangle matrix with two sub-diagonals.

1. Introduction

Let n, k, ` be given positive integers with 1 ≤ k < ` ≤ n and denote by Mn the set of n × n complex matrices. Consider the pentadiagonal matrix A0 = (aij) ∈ Mn+1 where for i, j = 0, 1, . . . , n,  Lj if j − i = −`,   lj if j − i = −k,   di if j − i = 0, aij = if  ri j − i = k,  if  Ri j − i = `,  0 otherwise.

Key words and phrases: , pentadiagonal, tridiagonal matrices. 2010 Mathematics Subject Classication: Primary 15A15, 15B9, Secondary 65F40, 15A42. 40 C. M. da Fonseca and L. Losonczi

Notice that the numbering of entries starts with zero. We also denote the matrix A0 by An+1,k,`(L, l, d, r, R) and denote by D0 = Dn+1,k,`(L, l, d, r, R) its determinant where the diagonal vectors L, l, d, r, R are dened by

L = (L0,...,Ln−`), l = (l0, . . . , ln−k), d = (d0, . . . , dn), R = (R0,...,Rn−`), r = (r0, . . . , rn−k). We will refer to the diagonal vectors L, l, d, r, R as `th sub-diagonal, kth sub- diagonal, (main) diagonal, kth super-diagonal, `th super-diagonal, respectively. If L, R are zero vectors then our matrix becomes a tridiagonal one denoted by An+1,k(l, d, r) and its determinant by Dn+1,k(l, d, r). If 1 ≤ k = ` ≤ n, then the two super-diagonals and the two sub-diagonals slip together and our matrix becomes a

An+1,k,k(L, l, d, r, R) = An+1,k(L + l, d, r + R) and its determinant D0 = Dn+1,k(L + l, d, r + R).

We shall call An+1,k,`(L, l, d, r, R) a (general) k, `-pentadiagonal matrix while An+1,k(l, d, r) will be termed as k-tridiagonal. In [6] we developed a method to reduce the determinant of k, `-pentadiagonal matrices to tridiagonal determinants provided that k + ` ≥ n + 1. If k ≥ ≥ (n + 1)/3, then by suitable matrix multiplications we can reduce a k, 2k- pentadiagonal matrix to a tridiagonal one. A similar reduction of tridagonals leads to diagonal matrices. In this way we get an explicit formula for the determinant of a general k, 2k-pentadiagonal matrix. In case of Toeplitz pentadiagonal matrices the diagonal vectors are con- stant vectors, i.e., L = (L, . . . , L), R = (R,...,R) ∈ Rn+1−`, l = (l, . . . , l), r = (r, . . . , r) ∈ Rn+1−k, d = (d, . . . , d) ∈ Rn+1 and for the matrix and its determinant the notations An+1,k,`(L, l, d, r, R) and Dn+1,k,`(L, l, d, r, R) will be used. For imperfect Toeplitz matrices (the term used by Marr and Vineyard [9]) the main diagonal is

n+1 (d − α, . . . , d − α, d, . . . , d, d − β, . . . , d − β) ∈ R | {z } | {z } | {z } k n+1−2k k while the other diagonals are the same as above. To indicate the imperfectness we add a superscript (α,β) to the notation of Toeplitz pentadiagonal matrices. Thus an imperfect -pentadiagonal matrix (α,β) has the k, 2k An+1,k,2k(L, l, d, r, R) form On some pentadiagonal matrices 41

 d − α r R  .  ..   d − α r   .. ..   . . R     d − α     ..   l d .     l d   . . .   ......     d r     ..   . d − β     L d − β   . . .   ......  L l d − β

As far as we can tell, the rst particular k, `-pentadiagonal Toeplitz matrix was studied in 1928 by Jen® Egerváry and Otto Szász [3]. One of the matrices they ¯ considered was An+1,k,`(δ, ,¯ −λ, , δ) with k+` = n+1 and || = |δ| = 1. Their result has been largely ignored in the pure and applied matrix theory as we can see e.g. in [2, 10]. For some other papers on the topic, the reader is refereed to [1,6, 11, 12]. An interesting graph theoretical approach can be found in [7,5]. An exhaustive list of recent references is given in the survey [4]. Our paper was inspired by Marr and Vineyard [9] who have shown that the product of two 1-tridiagonal Toeplitz matrices is an imperfect Toeplitz matrix (α,β) which is related to the corresponding Toeplitz matrix by a two-step An+1,1,2 recursion. In this way they succeeded to express the determinant Dn+1,1,2 of 1, 2-pentadiagonal Toeplitz matrix in terms of Chebyshev polynomials of second kind. A similar approach was used in [13] to nd a formula for the inverse of a 1, 2-pentadiagonal Toeplitz matrix.

2. Reduction of general k, 2k-pentadiagonal determinants to tridiagonal ones

Our starting point is the matrix A0 = An+1,k,2k(L, l, d, r, R) where 1 ≤ k < < 2k ≤ n and k + 2k ≤ n + 1, i.e., (n + 1)/3 ≤ k ≤ n/2 < (n + 1)/2. Let us dene the matrices B = (bij),C = (cij),F = (fij),G = (gij) of Mn+1 by 42 C. M. da Fonseca and L. Losonczi

 1 if i=j,   lj b = − if i=j+k, j = 0, . . . , k−1, ij d  j   0 otherwise,

 1 if i=j,   r  − i if i=0, . . . , k−1, j =i+k, cij = d  i   0 otherwise,

 1 if i=j,   Lj f = − if i=j+2k, j =0, . . . , n−2k, ij d  j   0 otherwise,

 1 if i=j,   Ri g = − if i=0, . . . , n−2k, j =i+2k, ij d  i   0 otherwise. Performing four matrix multiplications (for some details see [6], Theo- rem 3, (i)) we get the matrix L ∗ where A1 = FBA0CG = E1 A1 E1 ∈ Mk is a with diagonal elements d0, . . . , dk−1 and

∗ (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) A1 =An+1−k,k,k(L , l , d , r ,R )=An+1−k,k(L +l , d , r +R ) is tridiagonal, where the iterated diagonal vectors are

 L r L r  L(1) = − 0 0 ,..., − n−2k n−2k , d0 dn−2k

(1) l = (lk, . . . , ln−k) ,   (1) l0r0 lk−1rk−1 L0R0 Ln−2kRn−2k d = dk − , . . . , d2k−1 − , d2k − , . . . , dn − , d0 dk−1 d0 dn−2k

(1) r = (rk, . . . , rn−k) ,  R l R l  R(1) = − 0 0 ,..., − n−2k n−2k . d0 dn−2k On some pentadiagonal matrices 43

3. Further reduction to diagonal matrix

The matrix A1 can be reduced to a diagonal matrix with two matrix mul- tiplications. Dene the matrices U = (uij),V = (vij) ∈ Mn+1 by

 1 if i = j,     lj − Lj−krj−k/dj−k uij = − if i = j + k, j = k, . . . , n − k,  dj − lj−krj−k/dj−k    0 otherwise,

 1 if i = j,     ri − Ri−kli−k/di−k vij = − if i = k, . . . , n − k, j = i + k,  dj − li−kri−k/di−k    0 otherwise.

Multiplying A1 from the left by U, then from the right by V we get a diagonal matrix A2 = UA1V with diagonal (3.1)

d0, . . . , dk−1,

l0r0 lk−1rk−1 dk − , . . . , d2k−1 − , d0 dk−1     L0r0 R0l0 lk − rk − L0R0 d0 d0 d2k − − , l0r0 d0 dk − d0  Ln−2krn−2k   Rn−2kln−2k  ln−k − rn−k − Ln−2kRn−2k dn−2k dn−2k . . . , dn − − , ln−2krn−2k dn−2k dn−k − dn−2k where in the above lines k, k, n + 1 − 2k elements are listed. Because the determinants of the matrices B, C, F, G, U, V all are 10s, the determinant of our general pentadiagonal matrix An+1,k,2k is the product of the diagonal elements of A2. To calculate this product we multiply the elements of the rst two groups pairwise, to obtain

d0dk − l0r0, . . . , dk−1d2k−1 − lk−1rk−1. 44 C. M. da Fonseca and L. Losonczi

Simplifying the general term of the third group we get, for j = 0, . . . , n − 2k,    Lj rj Rjlj lk+j − d rk+j − LjRj j dj d2k+j − − = dj ljrj dk+j − dj

d d d −d l r −L R d −l r d +l R l +r L r = j j+k j+2k j j+k j+k j j j+k j j j+2k j j j+k j j j+k . djdj+k−ljrj Thus we have proved

Theorem 3.1. Assuming (n+1)/3≤ k ≤n/2 the determinant

Dn+1,k,2k(L, l, d, r, R) of the general k, 2k-pentadiagonal matrix is (3.2) n−2k Q (djdj+kdj+2k −djlj+krj+k −LjRjdj+k −ljrjdj+2k +ljRjlj+k +rjLjrj+k)· j=0 k−1 Q · (djdj+k−ljrj) j=n+1−2k Remark 3.1. During the calculations above we have to assume that numbers appearing in any denominators are not zero. Unfortunately it seems quite complicated to describe these assumptions in terms of the entries of the matrix. However, formula (3.2) is valid without these assumptions. Namely if any number say appearing in any denominator is zero, then replace it by 0 dj dj 6= 0 and continue the calculation, to arrive to the formula corresponding to (3.2). Taking the limit 0 and then continuity arguments, we arrive to dj → 0 = dj (3.2), in which dj = 0 has to be substituted.

4. k, 2k-pentadiagonal Toeplitz and "imperfect" Toeplitz determinants

In the case of k, 2k-pentadiagonal Toeplitz matrices the diagonal vectors are constant vectors. Hence the determinant of such matrices can be obtained by substituting Lj = L, lj = l, dj = d, rj = r, Rj = R, (for all possible values of the indices j) into (3.2) which gives Theorem 4.1. Assuming (n+1)/3 ≤ k ≤ n/2 the determinant of the k, 2k- pentadiagonal Toeplitz matrix An+1,k,2k(L, l, d, r, R) is

n+1−2k 3k−(n+1) (4.1) d3 − (LR + 2lr)d + Rl2 + Lr2 d2 − lr . On some pentadiagonal matrices 45

The case of imperfect Toeplitz determinants is a little bit more com- plicated as here d0 = ··· = dk−1 = d − α, dk = ··· = dn−k = d, dn+1−k = = ··· = dn = d − β, Lj = L, Rj = R, (j = 0, . . . , n − 2k), lj = l, rj = r, (j = 0, . . . , n − k). Thus in the rst product of (3.2) we have to substitute dj = d − α, dj+k = d, dj+2k = d − β. In the second product of (3.2) we have to substitute dj = d − α, dj+k = d − β. With this we have proved Theorem 4.2. Assuming (n+1)/3≤ k ≤n/2 the determinant of the imperfect Toeplitz -pentadiagonal matrix (α,β) is k, 2k An+1,k,2k(L, l, d, r, R)

3 2 2 2n+1−2k (4.2) d −(α+β)d −(LR+2lr−αβ)d+(α+β)lr+Rl +Lr · 3k−(n+1) · d2 −(α+β)d+αβ−lr .

Denote by λ1, λ2, λ3 and λ4, λ5 the zeros d of the rst (cubic) and second (quadratic) factor of (4.2) respectively. Then the eigenvalues of the matrix (α,β) are with multiplicities and An+1,k,2k(L, l, 0, r, R) −λ1, −λ2, −λ3 n + 1 − 2k −λ4, −λ5 with multiplicities 3k − (n + 1).

5. Another form of k, 2k-pentadiagonal Toeplitz and imperfect Toeplitz determinants

We can express the determinants (4.1)(4.2) in terms of Chebyshev poly- nomials. It is enough to deal with (4.2) as (4.1) can be obtained from it by α = β = 0. For imperfect Toeplitz matrices the lower and upper vectors of the tridi- agonal matrix ∗ are A1  Lr Lr  L(1) + l(1) = l− , . . . , l− ∈ n+1−2k, d−α d−α R

 Rl Rl  R(1) + r(1) = r − , . . . , r − ∈ n+1−2k. d − α d − α R

The main diagonal d(1) ∈ Rn+1−k is lr lr lr lr LR LR d− ,. . . ,d− , d−β− ,. . . ,d−β− , d−β− ,. . . ,d−β− . d−α d−α d−α d−α d−α d−α | {z } | {z } | {z } n+1−2k 3k−(n+1) n+1−2k

If k = (n + 1)/3 then the middle part is empty, if k > (n + 1)/3 the the middle part contains at least one element. 46 C. M. da Fonseca and L. Losonczi

The matrix ∗ (with is a matrix) has the form A1 n + 1 = 11, k = 4 7 × 7

 lr Rl  d− d−α r− d−α  d− lr r− Rl   d−α d−α   d− lr r− Rl   d−α d−α   d−β− lr  .  d−α   Lr LR   l− d−α d−β− d−α   Lr LR   l− d−α d−β− d−α  Lr LR l− d−α d−β− d−α

Evaluating the determinant ∗ of this matrix by using Theorems 1, 2 of [8] we D1 get that

(5.1) (α,β) k ∗ k p k−p Dn+1,k,2k(L, l, d, r, R) = (d − α) D1 = (d − α) Dq,1Dq−1,1 where for n + 1 − k = kq + p, (0 ≤ p < k) and for q = 0, 1,...

 v a + b v ab v  D = σq+1 U ( ) + U ( ) + U ( ) = q,1 q+1 2σ σ q 2σ σ2 q−1 2σ

σq+1  a + b ab  = sin(q + 2)ϑ + sin(q + 1)ϑ + sin(qϑ) . sin ϑ σ σ2

Lr Rl √ lr with s = l − , t = r − , σ = st, v = d − β − , a = β, d − α d − α d − α lr − LR b = . U is the jth Chebyshev polynomial of the second kind, ϑ ∈ d − α j C is such that v = 2σ cos ϑ (sin ϑ 6= 0), and st 6= 0, v 6= ±2σ are assumed. If v = ±2σ then we have to take the limit as ϑ → mπ with ϑ = (−1)m2σ, m ∈ Z. Due to our assumptions on n, k either (i) (n + 1)/3 = k, q = 2, p = 0 or (ii) (n + 1)/3 < k, q = 1, p = 0. In these cases the exponents of Dq,1 and Dq−1,1 in (5.1) are p = 0 = (n + 1) − 3k, k − p = k = (n + 1) − 2k in case (i) and p = (n + 1) − 2k, k − p = k = 3k − (n + 1) in case (ii). Hence the new form of the determinant in (5.1) is in both cases (i), (ii)

  v  a + b  v  ab  v (n+1)−2k (d−α)kσ(n+1)−k U + U + U · 2 2σ σ 1 2σ σ2 0 2σ (5.2)   v  a + b  v 3k−(n+1) · U + U 1 2σ σ 0 2σ

Substituting the values s, t, σ, a, b, v, ϑ, q into e.g. the trigonometric form of On some pentadiagonal matrices 47

Dq,1 we get after some simplications that

d2 − (α + β)d + αβ − lr D = v + a + b = , 0,1 d − α 2 2 D1,1 = v − σ + (a + b)v + ab = d3 − (α + β)d2 − (LR + 2lr − αβ)d + (α + β)lr + Rl2 + Lr2 = . d − α Using these and (5.1) we get the same result for the determinant as in (4.2).

6. Remarks on the inverse of A0 = An+1,k,2k

We have seen that UFBA0CGV = D where D is a diagonal matrix which is invertible exactly if none of its diagonal elements listed in (3.1) are zero.

Assuming this A0 is also invertible and (6.1) −1 −1 A0 = CGV D UFB. All matrices (except D−1) appearing in (6.1) have determinant 1, and writ- ing them in forms B = E + B1,C = E + C1,F = E + F1,G = E + G1, U = E + U1,V = E + V1, where E ∈ Mn+1 is the unit matrix, their inverses are E − B1,E − C1,E − F1,E − G1,E − U1,E − V1 respectively, moreover the product matrices

(6.2) U1F1B1,U1F1,F1B1,C1G1V1,C1G1,G1F1 are all zero matrices, while U1B1 contains only one (nonzero) diagonal below the main one and C1V1 also contains only one (nonzero) diagonal above the main diagonal. Hence we get for the inverse of A0:

−1 −1 A =(E+C1)(E+G1))(E+V1)D (E+U1)(E+F1))(E+B1) (6.3) 0 −1 =(E+C1 +G1 +V1 +C1V1) D (E+U1 +F1 +B1 +U1B1) . 48 C. M. da Fonseca and L. Losonczi

Using the denitions of B1,C1,F1,G1,U1,V1 we obtain that the factor ma- −1 trices S = (sij) and T = (tij) on the left and right side of D in (6.3) are

 1 if i = j,   r  − i if i = 0, . . . , k − 1, j = i + k,   di   Ri−kli−k  ri −  di−k  − if i = k, . . . , n − k, j = i + k,  li−kri−k sij = di −  di−k     Rili  ri+k − ri  Ri di  − + if i = 0, . . . , n − 2k, j = i + 2k,  d  l r   i d − i i d  i+k i  di  0 otherwise

 1 if i = j,   l  j if  − i = j + k, j = 0, . . . , k − 1,  dj   Lj−krj−k  lj −  dj−k  − if i = j + k, j = k, . . . , n − k,  lj−krj−k tij = d − j d  j−k     Ljrj  lj+k − lj  Lj dj if  − +   i = j + 2k, j = 0, . . . , n − 2k,  dj ljrj  d − d  j+k d j  j  0 otherwise. Thus we have proved

Theorem 6.1. Assuming (n + 1)/3 ≤ k ≤ n/2 and that all diagonal elements in (3.1) are dierent from zero the determinants S, T are well dened and

−1 −1 An+1,k,2k(L, l, d, r, R) = SD T. On some pentadiagonal matrices 49

References

[1] Anželi¢, M. and C.M. da Fonseca, Some determinantal considerations for pentadiagonal matrices, Linear Multilinear Algebra, 2020 https://doi.org/10.1080/03081087.2019.1708845 [2] Bebiano, N. and S. Furtado, A reducing approach for symmetri- cally sparse banded and anti-banded matrices, Appl., 581 (2019), 3650. [3] Egerváry, E. and O. Szász, Einige Extremalprobleme im Bereiche der trigonometrischen Polynome, Math. Z., 27 (1928), 641652. [4] da Fonseca, C.M. and V. Kowalenko, Eigenpairs of a family of tridi- agonal matrices: three decades later, Acta Math. Hung., 160 (2020), 376389. [5] da Fonseca, C.M., V. Kowalenko and L. Losonczi, Ninety years of k-tridiagonal matrices, Studia Sci. Math. Hungar., accepted. [6] da Fonseca, C.M. and L. Losonczi, On the determinant of general pentadiagonal matrices, Publ. Math. (Debrecen), accepted. [7] da Fonseca, C.M. and F. Ylmaz, Some comments on k-tridiagonal matrices: determinant, spectra, and inversion, Appl. Math. Comput. 270 (2015), 644647. [8] Losonczi, L., Eigenvalues and eigenvectors of some tridiagonal matrices, Acta Math. Hung., 60 (1992), 309322. [9] Marr, R.B. and G.H. Vineyard, Five-diagonal Toeplitz determinants and their relation to Chebyshev polynomials, SIAM J. Matrix Anal. Appl., 9(4) (1988), 579586. [10] McMillen, T., On the eigenvalues of double band matrices, Linear Al- gebra Appl., 431 (2009), 18901897. [11] Ohashi, A., T. Sogabe and R.S. Usuda, On decomposition of k- tridiagonal `-Toeplitz matrices and its applications, Spec. Matrices, 3 (2015), 200206. [12] Takahira, S., T. Sogabe and T.S. Usuda, Bidiagonalization of (k, k + 1)-tridiagonal matrices, Spec. Matrices, 7 (2019), 2026. [13] Wang, C., H. Li and Di Zhao, An explicit formula for the inverse of a pentadiagonal Toeplitz matrix, J. Comput. Appl. Math., 278 (2015), 1218. 50 C. M. da Fonseca and L. Losonczi

C. M. da Fonseca Kuwait College of Science and Technology Safat Kuwait [email protected] University of Primorska Koper Slovenia [email protected]

L. Losonczi Faculty of Economics and Business Adm. Debrecen University Debrecen Hungary [email protected]