INTERNATIONAL JOURNAL OF MATHEMATICS AND COMPUTERS IN SIMULATION Volume 11, 2017

Exact analytical formulations for the of symmetric circulant tridiagonal matrices Seyedmostafa Mousavi Janbehsarayi, Saman Tavana, Mansour Nikkhah Bahrami

Abstract— This study presents a time efficient, exact analytical In cases where only a , a and a are nonzero, the approach for finding the inverse, decomposition, and solving linear 0 1 n −1 systems of equations where symmetric and symmetric circulant denoted by A is said circulant tridiagonal and if matrices appear is presented. A set of matrices are introduced that aa11= n − the matrix is symmetric circulant. any symmetric could be decomposed into them as well as their straightforward inverse. After that, it will be shown how Symmetric linear systems are very popular and prevalently they could be used to find the inverse of the matrix. Moreover, appear in literature, such as electromagnetic scattering solving related linear equations can be carried out using implemented problem[1], molecular scattering [2], structural dynamics [3] decomposition for these special, prevalent matrices. and quantum mechanics[4]. There are a number of studies in literature that have focused on Toeplitz and circulant systems. Keywords—: Circulant matrix, Decomposition method, Linear Garey and Shaw [5] studied nonsymmetric Toepliz systems equations, Matrix inversion, , . and nonsymmetric circulant systems. In the same manner, I. INTRODUCTION Nemani and Garey [6] presented a new stable algorithm for the solution of tridiagonal circulant linear systems of equationsBy A NN× matrix A= a; ij , = 0,1,...., n − 1 is making the transformation matrices, Zheng and Shon [7] n ij, studied the and inverse of a generalized Lucas said to be symmetric if aai,, j= ji and is said to be skew circulant matrix. Also, in very important applications the tridiagonal if it has nonzero elements only on the diagonal plus matrices of coefficients of these resulting systems are or minus one column. symmetric circulant and Toeplitz tridiagonal such as finite difference approximation solution of elliptic equations over a A circulant matrix is a special type of Toeplitz matrix. A rectangle with periodic boundary conditions[8]. Vidal and NN× matrix A= a; ij , = 0,1,...., n − 1 is said to Alonso [9] extended Rojo algorithm to the case of symmetric n ij, Toeplitz tridiagonal equations. In another study Broughton [10] represented an analytical formula for the inverse of a be Toeplitz if aaij.= i++ 1, j 1 . A Toeplitz matrix is said to be symmetric circulant as a product of a circulant if the matrix is row-wise wrap-around, or simply the circulant matrix and its . subscripts are taken modulo n. Thus a ciculant matrix can be written The current study aims to present a new and comprehensive approach to decompose, calculate the inverse and solve linear (1) a0 aa 12 an − 1 system of equations where symmetric matrices and symmetric circulant matrices appear. It is worth noting that the method ann−−101 aa a 2 proposed in the current study is quite competitive with the Gaussian elimination, both in terms of arithmetic operations Aa= −− a a a− nn2 10n 3 and storage requirements. A novel decomposition method is     introduced that is used in the procedure. Using present method, the decomposition of symmetric circulant matrices may be a1 aa 23 a 0 found efficiently in On()2 and the inverse of that in 2.3728639 ------On()operations. Saman Tavana is with the Department of Mechanical Engineering, Delft University of Technolog, Delft, Netherlands, ([email protected]) while Seyedmostafa Mousavi Janbehsarayi and Mansour Nikkhah Bahrami are with the department of Mechanical Engineering, University of Tehran, Tehran, Iran ([email protected], [email protected])

ISSN: 1998-0159 61 INTERNATIONAL JOURNAL OF MATHEMATICS AND COMPUTERS IN SIMULATION Volume 11, 2017

II. DECOMPOSITION METHOD a1,1 00 0 (7)  aa2,1 2,2 00 Any matrix Ann× could be decomposed into n matrices as A = aaa  nn× 3,1 3,2 3,3 A= AA12.... Amn ... A where 0  aaan,1 n ,2 n ,3  ann, 10 0g1,m 0 0 (2)   01 0g 2,m 0 0 Applying the MDM to this matrix yields:   0    0 01g 0 a 0001000  A = mm−1, 1,1 m   01 aa2,1 2,2 00  aam,1 m,2  am−1, m a mm , 0  A44× =  0 0  0 01  00 0 01   10   0      0  0 0 01 0 0 0 1    0 0   001 1 0 00 01 0  Substituting A into Eq. (2) yields a closed formula for g's   0  i 0 01 0 as follows:  aan,1 n ,2  ann, ii−−11 (3) a+−  aa..... − g +..... g −− ()i ik, 1 i ,1 ii , 1 1,k 1 i 1, k 1 g + = (8) ik,1    aii,−  aa i ,1..... ii ,−− 1  g 1, i ..... g i 1, i

The inverse of matrix A is ()i ( i− 1) () ii () gsk,1++= gsk ,1 − gg si , ik ,1 + 10 00 01   −1  00 A 44× = 0 010 For (i= 1,2,..., n −= 1, s 1,2,..., i − 1, ki = ) . If we  aann,1 ,2 1 apply the Gaussian elimination to AT , we can obtain a lower −−  aann,, nn ann, , L , and an upper triangular matrix, U , as follows: 1 00 01 00 a2,1 1  − 00 a1,1 T (4) LA= U aa2,2 2,2 01  0 01      0  0 By transposing this equation, we have: 0 0 010 01 (9) ALTT= U (5)

are found as: gg1,m, 2, m ,, g mm−1, According to the above demonstration of the MDM, matrix operations, including finding the inverse of a lower triangular 1 −−gg1,2 1,3  − g1,n (6) matrix, become much easier 01−−gg2,3  2,n T III. DECOMPOSITION OF A SYMMETRIC CIRCULANT NON- L = 001    −g nn−1,  00 01 An optimum strategy to invert a matrix is, first, to reduce the matrix to a simple form, only then beginning a What makes the application of MDM even simpler is that mathematical procedure. For symmetric matrices, the preferred for triangular matrices all g’s are zero. Consider a lower simple form is tridiagonal [11]. The matrices which could be triangular matrix of order n to demonstrate the idea: solved with the present method would be all symmetric tridiagonal and symmetric circulant tridiagonal nonsingular matrices which appear in many researches , namely

ISSN: 1998-0159 62 INTERNATIONAL JOURNAL OF MATHEMATICS AND COMPUTERS IN SIMULATION Volume 11, 2017 computational fluid dynamics [12], and all symmetric circulant 1 (14) matrices could be transformed to this matrices using Givens 00 fd() rotation or householder method or other computational and 1 11 analytical algorithms. Using present method tridiagonal − could be solved for inverting problem with   fd22() fd () one step less than procedure needed for the circulant symmetric 1 = 0 −   matrix. In the case where only a0 , a1 and an −1 in Eq. (1) are K nn×  fd3 () nonzero, the matrix denoted by A is circulant tridiagonal and if 1   0 aa11= n − the matrix is symmetric. Here we consider ac0 = fdn −1() and aa11=n − = a for convenience 11 00 − fdnn() fd () ca00 a (10) nn×  ac a 0 −1  Based on Eq. (13), all entries of matrix K ×nn are zero

00a   except for the elements of the main diagonal and subdiagonal. A= ,2ca> It can be seen in Eqs. (12) and (14) that matrix K and its nn×  00 a inverse have elements that can be calculated easily using Eq. (13)  0 aca In cases where matrix A is tridiagonal the procedure is over  K A nn× a00 acnn× here since matrix is an upper triangular matrix without having nonzero component at first column and last row. On the other hand, if matrix A is circulant tridiagonal it is needed to Where ca> 2 denotes that the matrix is strictly diagonal continue the procedure as follows dominant. The normalized form of the matrix is as: Rnn× d 1 0 ... 0 1 (11) Let matrix be of the form  11d  0 10 00 (15)  nn01 0   Ann××= a=aA × nn 01 0 01 10 R × =  0 . 0 11d nn   0 010 1 0 ... 0 1 d  nn×  rd12() rd ()  rn −1() d 1 nn×

Where = / acd . Let matrix Knn× be of the form Where matrix R is a sparse matrix in a way that the entries th fd1() 0  0 (12) of its last row are r except for the entry of the n column of  j fd12() fd ()   that row which is one and this matrix could be derived using  K × = fd()   Housholder transformation method. In Eq. (16) r can be nn 2 j  fdn −1() 0 calculated easily:  fdfd12() () fnn− 1 () dfd () nn× n 1 dfdf )()( , = − (16) j dr )( = nj 1,...,3,2,1 j+1 j dfdf )()( Where matrix K is a lower triangular , an inspired formula derived from Jacobi method, and fi are The inverse of the matrix R can be calculated using obtained from the following recurrence relation: decomposition method:

fi+−11() d=−− df ii () d f (), d (13) fd01( )= 0, fd ( ) = 1 i = 1,2,3,..., n − 1

The bidiagonal inverse of matrix K could be obtained:

ISSN: 1998-0159 63 INTERNATIONAL JOURNAL OF MATHEMATICS AND COMPUTERS IN SIMULATION Volume 11, 2017

10 00 (17) −1 KR  R A1 (14), in Eq. (17), and using Eq. (18). Using this 01 0 decomposition, the inverse of matrix A can easily be derived as −1 follow: R nn× =  0 . − T 0 010 −1 1 kR 1 (23) A = []()A1 RK a −−rd12() rd ()  −rn −1() d 1

kR However, based on Eq. (23), the linear system of AX = b Now let introduce matrix A1 − may be solved easily as = 1bAX . In addition, as a different

−fd2 () 0 0 0 1 (18) approach to solve AX = b , we have the following relation based on Eq. (21): fd13()− fd () 0 0 1  0fd ()− fd ()   kR T kR = 24 kR (24) Aa1 AX b →= aRK →= ()1 =→= bXAbXAbXA    01    −fdn () 1 Where = aRKbb . With respect to the last equation of Eq. 0 0fdnn−+11 ()1+ gd () nn× (24) which is an updated form of AX = b , the values of X can be easily obtained using gauss method (back substitution). In this matrix only one element should be computed which kR UMERICAL XAMPLE is n+1 dg )( to generate matrix A1 nn× and it can be obtained IV. N E as follows: Now let us consider the following 5x5 ciculant tridiagonal symmetric matrix: n−1 (19) 2.5 1 0 0 1 n+1 n+1 ∑ j ++−= n−1 n−1 dfdrdrdfdg .)()()()(1)( 5 2 0 0 2 j=1 2 5 2 0 0 1 2.5 1 0 0 = 0 2 5 2 0 , = 0 1 2.5 1 0 = ⎡0 0 2 5 2⎤ ⎡ 0 0 1 2.5 1 ⎤ ⎢ ⎥ Or 𝐴𝐴 𝐴𝐴 ⎢ ⎥ 𝑑𝑑 ⎢2 0 0 2 5⎥ � ⎢ 1 0 0 1 2.5⎥ n −1 2.5 , ⎢ = 2 ⎥ ⎢ ⎥ (20) ⎣ ⎦ g() d=+−+ 1 fd () f () d rdfd (),() = 1. From Eq. (10) are calculated⎣ as follow: ⎦ n++1 11nj∑ 1 𝑎𝑎 = j 1 𝑖𝑖 2 = 2.5, 3𝑓𝑓= 5.25, 4 = 10.625, 5 = 21.3125,

kR 𝑓𝑓 − 𝑓𝑓 6 = 𝑓𝑓 42.6566− 𝑓𝑓 Matrix A1 is a lower triangular matrix and its Subsequently matrix is calculated by using Eqs. (10) and decomposition and inverse can be obtained using Eqs. (6). (12): 𝑓𝑓 − 𝐾𝐾 1 0 00  0 0 Displa fd() 2 1 0 0 0 0 fd1() 1 00  0 0 1 2.5 0 0 0 fdfd() () fd () 23 3 = 1 2.5 5.25 0 0  fd12() fd () 1 ⎡ ⎤ 0   1 −2.5 5.25 10.625 0 kR −1 fdfd34() () fdfd 34 () () fd 4 () ⎢ ⎥ ()Aa1 = − 𝐾𝐾 1 −2.5 5.25 10.625 21.3125  00 ⎢ ⎥ Inverse⎢ − of this matrix− can easily be obtained⎥ by using Eq.     0 (13): ⎣ ⎦ fd() fd () f() d 1 − − 12  n −2 0 fnn−−11() dfd () f nn () dfd () fnn−1() dfd () fd n () 1 0 0 0 0 fd() fd () f (d) fd () 1 12  n −2n −1 0.4 0.4 0 0 0 fnn() dg++11 () d f nn () dg () d fdgdfdgdgdnn()+1 () nn () ++ 11 () n () 1 nn× = 0 0.1905 0.1905 0 0 − ⎡ 0 −0 0.0941 0.0941 0 ⎤ 𝐾𝐾 ⎢ − ⎥ In order to illustrate the decomposition of matrix A to ⎢ 0 0 0 0.0469 0.0469⎥ these three matrices, we have: Matrix⎢ is obtained using Eqs− . (17) and (18):⎥ ⎣ 1 0 0 − 0 0 ⎦ 1 −− 11 kR T (22) 𝑅𝑅 A = ()ARK , 0 1 0 0 0 a 1 = 0 0 1 0 0 ⎡ 0 0 0 1 0⎤ ⎢ ⎥ Eq. (22) represents a decomposition of matrix A into three 𝑅𝑅 ⎢ 8.525 1.6238 0.3821 0.0941 1⎥ −1 ⎢ ⎥ sparse and easy to calculate matrices. K is calculated in Eq. ⎣− Considering− Eq.− (19) its inverse− is ⎦

ISSN: 1998-0159 64 INTERNATIONAL JOURNAL OF MATHEMATICS AND COMPUTERS IN SIMULATION Volume 11, 2017

1 0 0 0 0 VI. ACKNOWLEDGMENT 0 1 0 0 0 1 This work is supported by the First Iranian Computational = 0 0 1 0 0 and Intelligence Organization Foundation of University of − ⎡ 0 0 0 1 0⎤ Tehran (No. 70471057) 𝑅𝑅 ⎢ ⎥ ⎢8.525 1.6238 0.3821 0.0941 1⎥ By ⎢multiplying matrixes and from left to⎥ matrix or kR ⎣ A AkR ⎦ ( ) = VII. References using Eq. (20), matrix 𝑅𝑅 𝐾𝐾 is obtained ( 6 𝐴𝐴 34.0312): 𝑔𝑔 𝑑𝑑 [1] G. Bao and W. Sun, “A Fast Algorithm for the 5 2 0 0 2 Electromagnetic Scattering from a Large Cavity,” 0 10.5 5 0 2 SIAM J. Sci. Comput., vol. 27, no. 2, pp. 553– = 0 0 21.25 10.5 2 574, Jan. 2005. 𝐾𝐾𝐾𝐾 ⎡0 − 0 −0 42.625 19.25 ⎤ 𝐴𝐴 ⎢ ⎥ [2] B. Poirier, “Efficient preconditioning scheme for ⎢0 0 0 0 68.0625⎥ ⎢ And its transpose− is defined− as: ⎥ block partitioned matrices with structured ⎣5 0 0 0 0 ⎦ sparsity,” Numer. Linear Algebr. with Appl., vol. 2 10.5 0 0 0 7, no. 7–8, pp. 715–726, Oct. 2000. 1 = 0 5 21.25 0 0 𝐾𝐾𝐾𝐾 ⎡0 − 0 10.5 42.625 0 ⎤ [3] A. Feriani, F. Perotti, and V. Simoncini, “Iterative 𝐴𝐴 ⎢ − ⎥ system solvers for the frequency analysis of linear ⎢2 2 2 19.25 68.0625⎥ Finally⎢ inverse of matrix −is calculated using Eq.⎥ (25): mechanical systems,” Comput. Methods Appl. 1 ⎣ − ⎦ Mech. Eng., vol. 190, no. 13, pp. 1719–1739, 𝐴𝐴 2000. − 0.3131 0.1414 0.0404 0.0404 0.1414 𝐴𝐴 0.1414 0.3131 0.1414 0.0404 0.0404 [4] W. van Dijk and F. M. Toyama, “Accurate = 0.1414 −0.1414 0.3131 0.1414 −0.0404 numerical solutions of the time-dependent ⎡ ⎤ −0.1414 0.0404 −0.1414 0.3131 0.1414 Schrödinger equation,” Phys. Rev. E, vol. 75, no. ⎢ − − ⎥ ⎢ 0.1414 0.0404 0.0404 0.1414 0.3131 ⎥ 3, p. 36707, Mar. 2007. ⎢ − − ⎥ ⎣− V. CONCLUSION − ⎦ [5] L. E. Garey and R. E. Shaw, “A parallel method The amount of labor and time has always been an issue for for linear equations with tridiagonal Toeplitz computations of circulant matrices appearing in numerous coefficient matrices,” Comput. Math. with Appl., researches. For instance, consider a circulant matrix of order vol. 42, no. 1, pp. 1–11, 2001. greater than 100. It is almost impossible to compute inverse of this matrix with its corresponding determinant or solve linear [6] S. S. Nemani and L. E. Garey, “Parallel systems of equations with circulant matrix as coefficient matrix algorithms for solving tridiagonal and near- in a straightforward way. However, the matrix decomposition circulant systems,” Appl. Math. Comput., vol. method presented in section 2 is a timely solution to this problem. This study presented a new comprehensive approach 130, no. 2, pp. 285–294, 2002. using matrix decomposition method for calculation of the [7] Y. Zheng and S. Shon, “Exact and symmetric circulant tridiagonal matrices. As such, the two R and K matrices were used in order to make the original matrix inverses of generalized Lucas skew circulant type upper triangular. The suggested decomposition method for matrices,” Appl. Math. Comput., vol. 270, pp. special matrices could be utilized for solving related linear 105–113, 2015. equations. It is also worth noting that the other decompositions and methods applicable in making the matrices lower (upper) [8] D. . Evans and S. . Okolie, “The numerical triangular such as the Householder transformation or QR solution of an elliptic P.D.E. with periodic factorization are much more difficult and complicated to work boundary conditions in a rectangular region by the with than the presented method. Additionally, other sparse spectral resolution method,” J. Comput. Appl. matrices with a small change can be factorized to the presented Math., vol. 8, no. 4, pp. 237–241, Dec. 1982. decomposition. The proposed method in this study is even simpler in some cases including tridiagonal matrices since [9] A. M. Vidal and P. Alonso, “Solving systems of there is no need for computing matrix R. By only obtaining K, symmetric Toeplitz tridiagonal equations: Rojo’s we can make the original matrix upper triangular. Further algorithm revisited,” Appl. Math. Comput., vol. studies on the other special case of toeplitz and sparse matrices 219, no. 4, pp. 1874–1889, 2012. would be helpful to find a lower (upper) triangular form of them and use the matrix decomposition method presented in [10] S. A. Broughton and J. J. Leader, “Analytical section 2 of this study to decompose them. Solution of the Symmetric Circulant Tridiagonal Linear System,” Math. Sci. Tech. Reports, vol.

ISSN: 1998-0159 65 INTERNATIONAL JOURNAL OF MATHEMATICS AND COMPUTERS IN SIMULATION Volume 11, 2017

103, 2014. [11] W. H. Press, S. a Teukolsky, W. T. Vetterling, and B. P. Flannery, NUMERICAL RECEPIES: The Art of Scientific Computing, Third. Press Syndicate of the University of Cambridge, 2007. [12] Z. Yang, L. Xie, and P. Stoica, “Vandermonde Decomposition of Multilevel Toeplitz Matrices With Application to Multidimensional Super- Resolution,” IEEE Trans. Inf. Theory, vol. 62, no. 6, pp. 3685–3701, Jun. 2016.

ISSN: 1998-0159 66