http://dx.doi.org/10.4236/oalib.1100543
A New Algorithm for the Determinant
and the Inverse of Banded Matrices
Mohamed Elouafi1, Driss Aiat Hadj Ahmed2
1Classes Préparatoites aux Grandes Ecoles d'Ingénieurs, Lycée My Alhassan, Tangier, Morocco 2Regional Center for Career Education and Training (CRMEF)-Tangier, Tangier, Morocco
Email: [email protected], [email protected]
Received **** 2014
Copyright © 2014 by authors and OALib.
This work is licensed under the Creative Commons Attribution International License (CC BY).
http://creativecommons.org/licenses/by/4.0/
Abstract
In the current article, the authors present a new recurrence formula for the determinant of a banded matrix. An algorithm for inverting general banded matrices is derived.
Keywords
Banded Matrices, Determinants
Subject Areas: Mathematical Analysis, Numerical Mathematics
1. Introduction
The aim of this work is to extend the algorithm presented in [1] to obtain the inverse of the banded matrix 1,1 1, 1
2, 2
1,1 2,2
0 0
,
0
0
p
p
q
q
a a
a
a
a
+ +
+ +
… …
=
… …
B
is much less than n.
Standard method to compute the inverse of the matrix B is to use the LU based methods [3] and there are special algorithms taking into account the special form of the matrix [4]. Other methods were proposed more recently [5].
For the n n× banded matrix B, where we assume that ai p i, + ≠0 for i=1,,n−p, we associate the se-quence
( )
Ai k, 1≤ ≤ +i n p,1≤ ≤k p defined by the following relations for k=1,,p:, , for 1, , , i k i k
A =δ i= p (1)
and for i=1,,n−p:
1
, , , ,
1 , p i
i p i p i k i s s k s
a A a A
+ −
+ + =
− =
∑
(2)and for i= − +n p 1,, :n
, , , 1
. n
p i k i s s k s A + a A
=
=
∑
(3)Here δi k, is the Kronecker symbol and we put ai j, =0 if i− >j q. The relations above can be written in the matrix form
1,
2,
, 0
0
n k k
n k
n p k A A
A
A +
+
+
=
B
,
where
T 1, , 2, , , ,
k k k n k
A = A A A . We shall note Q the p×p matrix
(
,)
1 , . n i j i j p A+
≤ ≤
The determinant of the matrix Q is related to the determinant of the matrix B. This is the purpose of the next section.
2. Remark
Suppose that we have ai p i, + =0 for some i=1,,n−p,. Let B
( )
ε be the matrix obtained from B by re-placing ai p i, + such that ai p i, + =ε with ε0. We have limε→0B( )
ε =B.Then, we can compute B−1 tending ε e to 0 in B
( )
ε .3. Determinant of a Banded Matrix
Theorem. Let the banded matrix B and the associated sequence
( )
,1 ,1 . i k i n p k p
A ≤ ≤ + ≤ ≤ Then
( ) ( )
( )( )
, 1
det 1 det .
n p p n p
i i p i
a − −
+ =
= −
∏
B Q
Proof. Let T the n n× triangular matrix
p
n p−
=
I T
D I
where Ir denotes the r r× identity matrix and D is the
(
n− ×p)
p matrix1,1 1,2 1, 2,1 2,2 2,
,1 ,2 ,
.
p p p p
p p p p
n n n p
A A A
A A A
A A A
+ + +
+ + +
…
…
Report that
1,1 1,2 1, 2,1 2,2 2,
,1 ,2 ,
,
p
p p
p p p p
A A A
A A A
A A A
…
…
=
I
and thus using the relation Equation 1 we get
,
=
C BT
Q R
0
where C is the
(
n− × −p) (
n p)
triangular submatrix1, 1
2, 1 2, 2
, 1 , 2 ,
0 0
0
p
p p
n p p n p p n p n a
a a
a a a
+
+ +
− + − + −
…
…
and R is a p× −
(
n p)
matrix.Obviously, det
( )
T =1 and det(
BT) ( )
= −1 p n p( − )det( ) ( )
C det Q . The result follows.Example. For p= =q 2, formula of the determinant of the pentadiagonal matrix is presented in [6].
4. Inverse of a Banded Matrix
Assume that the matrix B is invertible and let us denote by Cj the j-th column vector of the inverse ma-trix B−1.
From the relation B B−1 =In, where In denotes the identity matrix of order n, we get the relations:
, 1 ,
1
,
n
n j p n j i n j i
i n j p n j p n j
C E a C
a
− − − −
= − − + − − −
= −
∑
for j=0,,n− −p 1, where
( )
T , 1n j i j i n
E =δ ≤ ≤ ∈ is the vector of order j of the canonical basis of n.
It follow from r1 that knowing the p last columns C Cn, n−1,,Cn p− +1 determine recursively all other col-umns Cn p− ,Cn p− −1,,C1. We give a straightforward recurrence formulae for computing C Cn, n−1,,Cn p− +1.
Since the matrix B is invertible, we obtain from the previous section that the matrix Q is invertible too. We shall denotes Xj = x1,j,,xp j, T the j-th column vector of the matrix
1
.
− Q
Theorem. The j-th vector column of the inverse matrix 1 , −
B 1≤ ≤j p, is given by
, 1 p
n p j k j k k C− + x
=
=
∑
A, 1, 1 , 1 , 2, 1 , , 1 0 0 p
k j n k p
k k j k p k
k j n k k
p
k j n p k k x A x x A x A + = = + = + = ⋅ =
∑
∑
∑
∑
B A .The result follows from the fact that
( )
, 1, 1 1, T 2, , 2,1 , 1
,
, , 1
. p
k j n k k
j p
j k j n k
k i j i p
p j p
k j n p k k x A x x x A x x A δ + = + = ≤ ≤ + = = =
∑
∑
∑
Q We will use the relations Equation (2) and r1 to explicit the coefficients cs j, for the inverse 1
. −
B we have for 1≤ ≤j p and 1≤ ≤s n:
, , ,
1 p
s n p j k j s k k c − + x A
=
=
∑
(4)and for j=0,,n− −p 1:
, , , , 1 , 1 . n
s n j p s n j i n j s i i n j p
n j p n j
c a c
a δ − − − − = − − + − − − = −
∑
(5)Here are the different steps of our algorithm. The implementation is left to the readers’ choice. • Compute Ai k, by the relations (1), (2) and (3). If det
(
(
An i j+,)
1 ,≤ ≤i j p)
=0 then B is non invertible.• Compute the inverse
( )
xi j, 1 ,≤i j p≤ of the matrix(
An i j+,)
1 ,≤ ≤i j p. • Compute cs n j p, + − for 1≤ ≤j p and 1≤ ≤s n by the relation (4). • Compute cs n j p, − − for j=0,,n− −p 1 and 1≤ ≤s n by the relation (5).5. Conclusion
If we fix the bandwidth p+q, one can show easily that the complexity of the algorithm is O n
( )
2 . Of course, other algorithms of similar complexity exist (methods based on LU decomposition for example). However, the new method provides more benefits to others: First, the recursive formulas are simple and can be imple-mented effectively in a parallel machine to reduce the cost. Also, we can solve these relations for some matrices to get the explicit determinant of those matrices.References
[2] Gravvanis, G.A. (2003) On the Solution of Boundary Value Problems by Using Fast Generalized Approximate Inverse Banded Matrix Techniques. The Journal of Supercomputing, 25, 119-129.http://dx.doi.org/10.1023/A:1023936410006 [3] Ran, R.S. and Huang, T.Z. (2009) An Inversion Algorithm for a Banded Matrix. Computers and Mathematics with
Ap-plications, 58, 1699-1710. http://dx.doi.org/10.1016/j.camwa.2009.07.069
[4] Trench, W.F. (1974) Inversion of Toeplitz Band Matrices. Mathematics of Computation, 28, 1089-1095.
http://dx.doi.org/10.1090/S0025-5718-1974-0347066-8
[5] Kratz, W. (2001) Banded Matrices and Difference Equations. Linear Algebra and its Applications, 337, 1-20.
http://dx.doi.org/10.1016/s0024-3795(01)00328-7