International Journal of Algebra, Vol 5, 2011, no 20, 993-1003 Solve Linear System with Sylvester s Condensation Abdelmalek Salem Department of Mathematics University of Tebessa, 12002 Algeria And Faculty of Sciences and Arts at Yanbu, Taibah University, Saudi Arabia asalem@gawabcom Khaled Sioud Department of Mathematics Faculty of Sciences and Arts at Yanbu, Taibah University, Saudi Arabia Taher Mekhaznia Department of Informatics University of Tebessa, 12002 Algeria mekhaznia@yahoofr Abstract We present a development of Dodgson s method for the solution to a system of linear equations (see [5]) using the determinants of the Sylvester s (Determinants) Identity We explicitly write down the algorithm for this developed method Mathematics Subject Classification: Primary 05A19; Secondary 05A10 Keywords: Linear system, Dodgson s condensation, Sylvester s determinant identity 1 Introduction In this paper we consider a system of n linear equations: a 11 x 1 + a 12 x 2 + + a 1n x n b 1 =0, a 21 x 1 + a 22 x 2 + + a 2n x n b 2 =0, a n1 x 1 + a n2 x 2 + + a nn x n b n =0 (11) with a ij,b i R i, j =1, 2,, n and n N
994 S Abdelmalek, K Sioud and T Mekhaznia We can rewrite expression (11) in the following matricial form: AX B =0 A = a 11 a 12 a 1n a 21 a 22 a 2n a n1 a n2 a nn,x= x 1 x 2 x n and B = b 1 b 2 b n (12) Also write A =[C 1,C 2,,C n ] (13) where C 1 is the first column and C 2 is the second column, ect Previous Results 11 Method of Gabriel Cramer (1704 1752) Cramer s rule is a theorem, which gives an expression for the solution of a system of linear equations with as many equations as unknowns, Theorem 1 If det A 0, then the solution of (11) is X := A 1 B with A 1 the inverse matrix of A, the unknowns (x j ) m j=1 are given by Cramer formula : x j = det [C 1,C 2,,C j 1,B,C j+1,,c n ] ; j =1, 2,, n (21) det A Proof Let X = n x i e i So B = AX = n x i C i Then for j =1, 2,, n i=1 i=1 [ ] det [C 1,C 2,,C j 1,B,C j+1,,c n ] = det C 1,C 2,,C j 1, n x i C i,c j+1,,c n = i=1 n x i det [C 1,C 2,,C j 1,C i,c j+1,,c n ]= i=1 n x j det [C 1,C 2,,C j 1,C j,c j+1,,c n ] + x i det [C 1,C 2,,C j 1,C i,c j+1,,c n ]= x j det A 12 Method of Charles L Dodgson (Lewis Carroll, 1832 1898)(see [5]) This method concludes by showing how this process may be applied to the solution of simultaneous linear equations i=1 i j
Solve linear system 995 If we take a block consisting of n rows and (n + 1) columns, and condense it, we reduce it at last to 2 terms, the first of which is the determinant of the first n columns, the other of the last n columns Hence, if we take the n simultaneous equations (11), and if we condense the whole block of coefficients and constants a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 (22) a n1 a n2 a nn b n we reduce it at last to two terms which we denote by S, T, so that s = a 11 a 12 a 1n a 21 a 22 a 2n a n1 a n2 a nn and t = a 12 a 1n b 1 a 22 a 2n b 2 a n2 a nn b n Now we know that x 1 = ( 1) n T, which may be written in the form S ( 1) n Sx 1 = T Hence the two terms obtained by the process of condensation may be converted into an equation for x 1, by multiplying the first of these equations by x 1, affected by a (+) or ( ) according to n being even or odd respectively The latter part of the rule may simply be expressed as: place the signs (+) and ( ) alternately over the several columns, beginning with the last column with a (+) sign, and the sign which occurs over the column containing x 1 is the sign with which x 1 is to be affected When the value of x 1 has been thus found, it may be substituted in the first (n 1) equations, and the same operation is repeated on the new block, which will now consist of (n 1) rows and n columns But in calculating the second series of blocks, it will be found that most of the work has already been done In fact, of the two determinants required in the new block, one has already been computed correctly, and the computation of the other only requires the last column in each of the derived blocks to be corrected This method based on Dodgson s algorithm is based on the following algorithm: algorithm 11 (Dodgson s algorithm) This algorithm can be described in the following four steps: (1) Let A be the given n n matrix Arrange A so that no zeros occur in its interior An explicit definition of interior would be all a i,j with i, j 1,n We can do this using any operation that we could normally perform without changing the value of the determinant, such as adding a multiple of one row to another (2) Create an (n 1) (n 1) matrix B, consisting of the determinants of
996 S Abdelmalek, K Sioud and T Mekhaznia every 2 2 submatrix of A Explicitly, we write b i,j = a i,j a i,j+1 a i+1,j a i+1,j+1 (3) Using this (n 1) (n 1) matrix, perform step (2) to obtain an (n 2) (n 2) matrix C Divide each term in C by the corresponding term in the interior of A (4) Let A = B, and B = C Repeat step (3) as necessary until the 1 1 matrix is found; its only entry is the determinant To clarify how the algorithm works, let us deal with the following example: 2 1 1 4 Example 1 We wish to find 1 2 1 6 1 1 2 4 2 1 3 8 We make a matrix of its 2 2 submatrices 2 1 1 2 1 1 2 1 1 4 1 6 1 2 1 1 2 1 1 2 1 6 3 1 2 2 4 = 1 5 8 1 1 2 1 1 2 1 1 4 2 4 1 3 3 8 We then find another matrix of determinants: 3 1 1 5 1 2 5 8 1 5 1 1 5 8 = 16 2 4 12 1 4 We must then divide each element by the corresponding element of our original matrix The interior of our original matrix is 2 1 1 2, so after dividing we get 8 2 4 6 The process is repeated untill one arrives at a 1 1 matrix: 8 2 4 6 = 40 We divide by the interior of our 3 3 matrix, which is just 5, giving us 8 8 is indeed the determinant of the original matrix However we cannot apply these steps on all matrices as shown in the following examples: Example 2 We wish to find A = 2 1 2 1 3 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 we apply step
Solve linear system 997 5 5 3 1 (2) on matrix A, we find B = 3 3 3 3 3 3 3 1 again we apply step (2) 5 3 1 5 30 6 12 on matrix B, we get: C = 0 0 6 6 6 16 By applying step (3), we get: 15 6 12 0 0 6 6 6 8 5 5 3 1 By applying step (4), we find: A = 3 3 3 3 15 6 12 3 3 3 1, B = 0 0 6 5 3 1 5 6 6 8 and C = 0 36 36 0 36,so 0 0 3 36 = 0 12 0 12 We repeat the previous steps, 3 we get : 15 6 12 A = 0 0 6 6 6 8, B = 0 12 0 12 and C = 0, so 0 0 This means 2 1 1 Dodgson s method cannot be used to compute A because 1 2 1 1 1 2 =0 2 1 2 1 3 1 2 2 1 2 Example 3 We wish to find A = 1 1 1 1 1,we notice that 2 1 1 2 1 1 2 1 1 2 2 2 1 1 1 1 1 1 2 0 5 6 4 1 With the same way in example (13), we find: B = 3 0 3 3 3 2 1 1 By 5 3 1 5 18 18 15 18 18 15 the condensation of B, we get: C = 6 6 0 1 1 6,so 2 2 1 6 6 0 1 1 1 1 1 6 = 1 1 2 9 9 15 6 6 0 1 1 3 by applying the same previous steps, we find:
998 S Abdelmalek, K Sioud and T Mekhaznia 5 6 4 1 A = 3 0 3 3 9 9 15 3 2 1 1, B = 6 6 0 5 3 1 5 1 1 3 B, we get: C = 0 90 0 90 0 18 Finally 0 3 0 2 18 1 and by the condensation of In examples 2 and 3, we face problems in the computation of the determinant If we continue the process, we will eventually be dividing by 0 We can avoid this problem by changing some rows or columns and then repeating the process 13 Sylvester and Chio s condensation Chio s pivotal condensation (see [4]) is a special case of Sylvester s determinant identity (see [7]) It is a method for evaluating an n n determinant in terms of (n 1) (n 1) determinants Proposition 2 ( [1, 2]) we condense the determinant of an n n matrix to the determinant of (n 1) (n 1) matrix The elements of (n 1) (n 1) matrix are the determinants of 2 2 matrix as is shown in the following formula: ] (a k,l ) n 2 det [(a i,j ) 1 i,j n = det i,j)], 1 i,j n 1 1 n, l n (31) where A (i,j) = ( ) ai,j a i,l a k,j a k,l ( ) ai,l a i,j+1 a k,l a k,j+1 ( ) ak,j a k,l a i+1,j a i+1,l ( ak,l a k,j+1 a i+1,l a i+1,j+1 ) if j<l,i<k if j l, i < k if j<l,i k if j l, i k 2 Main Results In this section, we ll show the main result which is a development of Dodgson s method for the solution to a system of linear equations (see [5]) We use the determinants of the Sylvester s (Determinants) Identity For this, we propose the following algorithm:
Solve linear system 999 algorithm 21 This algorithm can be described in the following three steps: (1) Let A be a given (n +1) n matrix in (22) We use the elements of the column before the last as pivots in the matrix A (2) Create an n (n 1) matrix B, consisting of the determinants of every 2 2 submatrix of A a i,j a i,l a n,j a n,l if i<n, j<l, a i,l a i,j+1 a n,l a n,j+1 if i < n, j l, b i,j = a n,j a n,l a n+1,j a n+1,l if i = n, j < l, a n,l a n,j+1 if i = n, j l, a n+1,l a n+1,j+1 Taking a n+1,j = b j for j =1, 2,, n We take the first non-zero element in column before the last as the l th row of matrix B If all elements are zero stop (3) Let A = B Repeat step (2) as necessary until a 2 1 matrix is found, its only entry is the (s, t) in (32) Remark 1 In the algorithm 21 if we divide elements b i,j of matrix B by the pivot (a n,l ) n 2 at every iteration we find (s, t) =(S, T ) Let us consider the system (11) If we condense the whole block of coefficients and constants (22) we find two terms denoted s and t; the first is the determinant of the first n columns multiplied by α, the second is the determinant of the last n columns multiplied by α: s = α a 11 a 12 a 1n a 21 a 22 a 2n a n1 a n2 a nn and t = α a 12 a 1n b 1 a 22 a 2n b 2 a n2 a nn b n (32) where α is the result of not dividing by the pivots For computing s and t, we use (algorithm 21 ) Hence the two terms obtained by the process of condensation may be converted into an equation for x 1, by multiplying the first of these equation by ( 1) n x 1 Now we know that x 1 =( 1) n t, which may be written in the form s ( 1) n x 1 s = t (these computations are independent of α) The sign that x i is to be affected with is the sign of ( 1) n+i 1 When the value of x 1 has been found, it may be substituted in the (n 1) equations after deleting the equation that corresponds to the row which is not included in forming the pivot, and the same operation is repeated on the new
1000 S Abdelmalek, K Sioud and T Mekhaznia matrix, which will now consist of (n 1) rows and n columns However in calculating the second series of matrices, it is found that most of the work has already been done In fact one of the two determinants required in the new matrix has already been found correctly, and the computation of the other only requires the last column in each of the derived matrices To clarify the algorithm we give the following examples: Example 4 Consider the following system of five linear equations: The table of solution is: x 1 +2x 2 + x 3 x 4 +2x 5 +2=0 x 1 x 2 2x 3 x 4 x 5 4=0 2x 1 + x 2 x 3 2x 4 x 5 6=0 x 1 2x 2 x 3 x 4 +2x 5 +4=0 2x 1 x 2 +2x 3 + x 4 3x 5 8=0 1 2 1 1 2 2 1 1 2 1 1 4 2 1 1 2 1 6 1 2 1 1 2 4 2 1 2 1 3 8 2 4 1 2 1 2 2 6 2 6 1 3 1 1 2 5 1 1 2 3 0 5 0 3 0 0 4 5 4 3 0 3 3 6 5 4 1 5 10 0 8 4 0 4 7 4 7 1 10 4 3 3 2x 5 =4 x 5 = 2 0 12 12 0 0 24 12 12 12 0 18 12 24 24 12 12 12 12 3x 4 =3 x 4 =1 0 144 144 216 144 288 144 144 12x 3 =12 x 3 = 1 31 104 62 208 144x 2 = 144 x 2 =1 ( 1) 5 31 104x 1 = 62 208 x 1 =2 In this example the last equation is always deleted
Solve linear system 1001 Example 5 Consider the following system of five linear equations: 2x 1 + x 2 +2x 3 +2x 4 +2=0 x 1 2x 2 x 3 x 4 4=0 x 1 x 2 x 3 x 4 6=0 2x 1 x 2 x 3 +2x 4 +4=0 2 1 2 2 2 1 2 1 1 4 1 1 1 1 6 2 1 1 2 4 2 6 1 4 2 0 2 4 2 2 2 8 3 0 3 0 6 4 1 0 10 8 4 6 4 8 4 6 4 4 1 0 10 6 12 0 3 0 6 0 2 6 4 2x 4 = 8 x 3 4 = 4 3 24 6 60 0 18 36 6 12 6x 3 = 4 x 3 = 2 3 432 864 6x 2 = 12 x 2 = 2 432x 1 = 864 x 1 =2, In this example the Third equation is always deleted, because we remove the equations which do not contain a pivot The issue of removing equations is resolved by the method of permutations which is shown in the following subsection 3 Algorithm The algorithm is presented is two steps: Step 1- Transformation of the matrix into a triangular matrix Step 2- Resolution of the system Step 1 - Transformation: for i =1ton π (i) =i end loop for k = 1 to n
1002 S Abdelmalek, K Sioud and T Mekhaznia m = k piv = a (k) k,n k+1 while piv = 0 m = m +1 piv = a (k) m,n k+1 end while if piv = 0 Stop Singular matrix A end c = π (m) π (m) =π (k) permutation π (m) and π (k) π (k) =c for l from 1 to n L k (l) =a (k) m,l L k (l) =a (k) m,l a (k) m,l = a(k) k,l k,l = L k (l) a (k) end loop l for i from k +1to n for j from 1 to n k a (k+1) i,j end loop j end loop i end loop k Step 2 - Resolution Permutation between rows number k and m = a (k) k,j a(k) i,n k+1 a(k) ij a (k) k,n k+1 for l from 1 to n } c l = b l Permutation of terms of vector b b l = c π(l) end loop l b = b eps = ( 1) n 1 for j from 1 to n b(1) = b for k from 1 to n j for i from k +1to n j +1 b(k+1) i end loop i end loop k x j = eps (k) = b i b (k+1) n j+1 /a(n+1) n j+1,j a (n+1) (k) k,n k+1 b k a (k) i,n k+1
Solve linear system 1003 if j =< n 1, for i from 1 to n j b i = b i a (1) i,j x j end if end main loop j End of algorithm } update b for next iteration References [1] S Abdelmalek, and S Kouachi, Condensation of determinants arxiv:07120822 [2] S Abdelmalek and S Kouachi, A Simple Proof of Sylvester s (Determinants ) Identity, AppMath scie Vol 22008 n o 32 1571-1580 [3] A G Akritas, E K Akritas, and G I Malaschonok, Various proofs of Sylvester s (determinant) identity, Math and Computers in Simulation 42 (1996) 585-593 [4] F Chio, Mémoires ur les FonctionsC onnues sous le nom des Résultants ou des Déterminants Turin,(1853) [5] CL Dodgson, Condensation of Determinants, Proceedings of the Royal Society of London 15(1866), 150-155 [6] S Kouachi, S Abdelmalek, and B Rebai, A Mathematical Proof of Dodgson s Algorithm arxiv:07120362 [7] T Muir, The Theory of determinants in The Historical Order of Development, vol II London (1911) Received: April, 2011