Inverting Symmetric Positive Definite Matrices using Divide and Conquer Mathematical Technique with LU Factorization
##plugins.themes.bootstrap3.article.main##
We looked at the solution of a system of equations Ax=b with symmetric positive definite coefficient matrix A that has singular and nearly singular values. Our technique, which is based on the Divide and Conquer strategy, combines the LU Factorization algorithm with the Divide-and-Conquer technique (D&C algorithm). The matrix was transformed into a product of the type LU using the LU Factorization, where L is a lower triangular matrix and U is an upper triangular matrix. MATLAB was used to implement the algorithm and simulate it as a user-subroutine. In order to reduce the round-off error, particularly for sensitive systems, the user-subroutine takes into account MATLAB characteristics. A non-singular matrix and an ill-conditioned matrix were both numerically demonstrated. Analysis was done on the impact of round-off error. We contrasted the results with those from earlier studies that employed LU factorization.
Introduction
One of the fundamental issues that arises frequently in the domains of science and engineering is the problem of matrix inversion. It is typically a crucial component of many solutions, such as the initial steps in robotic control, electromagnetic systems, statistics, physics, optimization, and single processing. [1], [2] contains a few efficient direct solution techniques that take advantage of displacement representation. In [3], alternative iterative techniques were put forth. The latter techniques can work well with well-conditioned inputs and nontrivially expand some earlier work for general input matrices [4]. A system of linear equations is typically produced when computational mathematics problems are solved using partial differential equations (PDE), integral equations, and boundary value issues in ordinary differential equations (ODE). A linear system of equations Ax = b can be solved using the LU factorization method in the exceptional case where A is a symmetric positive definite matrix. [5]–[8]. At that point, all of A’s eigenvalues are positive and AT = A. These systems are found in many significant applications and are typically linked to the “minimum energy principle”. The following outcome is necessary for the LU Factorization method to work. It is possible to factorize any symmetric positive definite matrix A into A = LU, where U is an upper triangular matrix and L is a lower triangular matrix. In this research, MATLAB is used for all computational results [9] utilizing several computational digits. The following formula is used to calculate the relative error:
We used the divide and conquer strategy to calculate the inverse of matrix A by factorizing the matrix into a product of lower and upper triangular matrices. This work’s primary goal is to use the Divide and Conquer Algorithm to determine the inverse of almost singular positive definite matrices. To do this, the system’s sensitivity will be addressed by increasing the computational decimal digits to two. An overview of the Divide and Conquer and LU Factorization algorithms for determining the inverse of nearly singular matrices is provided in Section 2. Different examples of non-singular and nearly singular systems will be shown in Section 3 and solved for an increasing number of digits in the calculations. Our own subroutines in the MATLAB mathematical code will be used to simulate the calculations. Section Four will contain comments and concluding remarks.
Divide and Conquer Strategy for Matrix Inversion
One of the most crucial algorithms is divide and conquer (D&C). The way it operates is by breaking a problem down into two or more similar subproblems, which can then be addressed directly. A solution to the original problem is then obtained by combining the solutions to the sub-problems. Effective algorithms for a variety of issues are built on this methodology [5], [8], [10].
The divide and conquer strategy in three steps:
1. Break the issue up into two or fewer smaller issues,
2. Solve the subproblems recursively to overcome them,
3. Integrate the subproblems’ solutions into the main problem’s solutions.
Take the nxn lower triangular matrix L as an example:
Divide L into chunks of size (n/2) × (n/2).
An upper- or lower-triangular matrix’s inverse is also upper- or lower-triangular.
In the event when L is a lower triangular matrix divided as:
where:
and
Next, let B be a matrix of equal dimensions that is divided as L:
Where:
and
The equation L B = I, If L is invertible and then L−1 = B
L11 B11 = I implies B11 = , and L22 B22 = I
Implies B22 = , L21 B11 + L22 B21 = 0, implies that B21 = − L21
Therefore, the inverse of the lower triangular matrix L is given by
Take the n × n upper triangular matrix U as an example:
If U is a partitioned upper triangular matrix, then:
Next, let B be a matrix of equal dimensions that is divided as L:
The equation U B = I, If U is invertible and then U−1 = B
U11 B11 = I implies B11 = U, and U22 B22 = I, Implies B22 = U,
U11 B12 + U12 B21 = 0, implies that B12 = −U U U
Therefore, the inverse of the lower triangular matrix L is given by:
Divide and Conquer Algorithm by LU-Factorization A−1
• Consider n × n s square matrix A.
• Use the LU algorithm to factorize the matrix into a product of upper and lower triangular matrices A = L U.
• A−1 = (LU)−1 = U−1 L−1 .
• Computation of U−1
• Divide U into four blocks U11, U12, U22 and a zero matrix.
• Recursively compute inverses of U11 and U22.
Multiply −U U U and combine with U and U to get U−1 .
•
Computation of L −1
• Divide L into four blocks L11, L21, L22 and a zero matrix.
• Recursively compute inverses of L11 and L22 .
• Multiply −L L L and combine with L and L to get L−1 .
•
Numerical Examples and Results
Divide and Conquer MATLAB user subroutines are used to factor the matrix A via LU-factorization into a product of upper and lower triangular matrices, where L is a lower triangular matrix and U is an upper triangular matrix, with varying numbers of computational digits. The result is A = LU.
Problem (4.1)
Use the divide and conquer strategy to find the inverse matrix A when it is a structured matrix.
Examine the 8x8 symmetric positive definite matrix, which is not unique:
First, we use the MATLAB software myLU11 (a) to determine the matrix A’s LU factor.
We may express the matrix A as a product of two matrices, where L is a lower triangular matrix and U is an upper triangular matrix, as
We now use the divide and conquer approach to calculate the inverse for the upper triangular matrix U.
Now we find the lower triangular matrix (L) by Divide and conquer method:
Since PA = LU then product both side by (LU)−1 we have:
(LU)−1PA = (LU)−1 (LU)
Hence (U−1 L−1 P) A = I
Therefore A−1 = U−1 L−1 P
Then
Error in find the inverse is 0.
Problem (4.2)
We find the invers for Nearly-Singular 12 × 12 symmetric positive definite matrix “Hilbert matrix” by decompose the matrix A into triangular matrix by LU-factorization using Divide and Conquer of triangular lower and upper, and by the inverse of MATLAB inv(A), considered is n = 12 with Cond (H12 ) = 1.7017e+016, the det(H12 ) in single precision equal to zero. The results obtained are shown in Figs. 1 and 2.
Fig. 1. Results showing that using myLU11 (A) in MATLAB is better than inv(A) in computing inverse of H12.
Fig. 2. The difference between the two lines.
Computational results of algorithm of Divide and Conquer for (H12). The difference of resinv by using the inv(A) in Matlab and using the inverse of myLU11 (A) in MATLAB are shown in Table I.
Inverse of (A) By the program [inv(A)] in matlab | Inverse of (A) LU-factorization By the program [myLU11] in matlab | ||
---|---|---|---|
Precision | resinv | Precision | resinv |
Double | 1.1588e-001 | Double | 1.6912e-001 |
20 digits | 1.3347e-011 | 20 digits | 1.6719e-012 |
30 digits | 8.6546e-022 | 30 digits | 3.7848e-022 |
40 digits | 1.3856e-031 | 40 digits | 7.9210e-033 |
50 digits | 2.4168e-041 | 50 digits | 1.8346e-042 |
60 digits | 6.8037e-052 | 60 digits | 4.8295e-053 |
70 digits | 8.1132e-062 | 70 digits | 6.5380e-062 |
Results and Conclusion
We introduced our own alternative MATLAB user-subroutine based on the Divide-and-Conquer strategy with LU factorization after recalling built-in MATLAB functions for the inversion of symmetric positive definite matrices. However, there are a few obstacles to overcome in order to fully utilize our algorithm’s capabilities. To lower the round-off error, the number of digits taken into account in the computations is first raised. Secondly, the matrices are scaled before to factorization. Thirdly, there are fewer surgeries. Our user subroutine in MATLAB appears to produce far better and more accurate results than the built-in inverse functions in MATLAB. This suggests that a smart way to reduce errors and, of course, obtain a good approximation of the inverse of a nearly unique system is to use the Divide and Conquer Algorithm in conjunction with increasing the number of computational digits. The results of Rump’s Gaussian elimination with double precision calculations for the same matrix in [4] appear to be less precise than the computed inverse of the matrix in example one.
References
-
Bini D, Pan V. Polynomial and Matrix Computations, Volume 1: Fundamental Algorithms. Boston: Birkhäuser; 1994.
Google Scholar
1
-
Pan VY, Zheng A, Huang X, Dias O. Newton's iteration for inversion of Cauchy-like and other structured matrices. J Complexity. 1997;13:108–24.
Google Scholar
2
-
Söderström T, Stewart G. On the numerical properties of an iterative method for computing the Moore-Penrose generalized inverse. SIAM J Numer Anal. 1974;11:61–74.
Google Scholar
3
-
Björck Å. Numerical Mathematics and Scientific Computation, Volumes 2 and 3. 1999.
Google Scholar
4
-
Lay DC. Linear Algebra and Its Applications. 2nd ed. Boston: Addison-Wesley; 1997.
Google Scholar
5
-
Watkins DS. Fundamentals of Matrix Computations. 2nd ed. Hoboken: John Wiley & Sons; 2002.
Google Scholar
6
-
Horowitz E, Sahni S, Rajasekaran S. Computer Algorithms. New York: W.H. Freeman; 1998.
Google Scholar
7
-
Rump SM. Approximate inverses of almost singular matrices still contain useful information. Technical Report 90.1. Forschungsschwerpunkt Informations- und Kommunikationstechnik, TU Hamburg-Harburg; 1990.
Google Scholar
8
-
MATLAB User's Guide, Version 7.9.0. The MathWorks; 2009.
Google Scholar
9
-
Higham NJ. Accuracy and Stability of Numerical Algorithms. 2nd ed. Philadelphia: SIAM; 2002.
Google Scholar
10
Most read articles by the same author(s)
-
Musa Adam Abdullah,
Abdel Radi Abdel Rahman Abdel Gadir Abdel Rahman,
Anoud Hassan Elzain Ageeb,
Aasim Ahmed Babiker Suliman,
Transfer Function and Z-Transform of an Electrical System in MATLAB/Simulink , European Journal of Mathematics and Statistics: Vol. 4 No. 3 (2023)