Next Article in Journal
Spectral Analysis and Topological Indices of Cozero-Divisor Graphs over Commutative Rings
Previous Article in Journal
Reliability Analysis of a Hardware–Software Series Repairable System with Multiple Vacations of a Repairman
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Calculating the Inverse Matrix After Some Elements in the Matrix Change

1
School of Mathematics and Statistics, Chuxiong Normal University, Chuxiong 675000, China
2
College of Science, China University of Petroleum, Qingdao 266580, China
*
Author to whom correspondence should be addressed.
Mathematics 2026, 14(9), 1525; https://doi.org/10.3390/math14091525
Submission received: 10 March 2026 / Revised: 24 April 2026 / Accepted: 29 April 2026 / Published: 30 April 2026
(This article belongs to the Section E: Applied Mathematics)

Abstract

In the current paper two research issues are addressed. First, a new efficient computational formula is presented that can calculate the inverse of a matrix when two elements are perturbed. The formula extends the result of G. Zielke. Second, a fast algorithm for computing an element in an inverse matrix has been derived. This algorithm is very practical in real-world scenarios. Interesting numerical examples demonstrate the feasibility of these algorithms.

1. Introduction

In some application scenarios, we often encounter the problem of how to quickly obtain the adjustment of the inverse matrix after some elements in the matrix change, and how to quickly present the explicit inverse of some special matrices. In 1961, J. Herndon gave an explicit formula of the inverse of a matrix that arbitrarily changes an element [1]. In 1968, an explicit formula of the inverse of a matrix that changes any pair of symmetric elements in a symmetric matrix was given [2], but there is no explicit formula for this type when any two elements of any matrix change. On the other hand, when the inverses of some special matrices are known, many authors have discussed the fast methods of finding the inverses of special matrices with a few elements added. In 2015, Jia and Li presented the inverse of general bordered tridiagonal matrices [3]. T. Hopkins and E. Kılıç presented explicit inverses of periodic tridiagonal matrices in 2017 [4]. In 2025, Jia and Wang gave some numerical algorithms for the fast and reliable solution of periodic tridiagonal Toeplitz linear systems [5]. Many authors have also provided the explicit inversion methods for some special matrices (refer to references [6,7,8,9,10]).
The Sherman–Morrison formula and the generalized Sherman–Morrison–Woodbury formula are the most important inverse matrix correction formulas. Many authors have utilized such formulas to discuss the correction of inverse matrices and the explicit inverse computation of some special matrices (refer to references [11,12]). However, few references provide a fast calculation method for a single inverse element. It is worth discussing if a fast calculation method is provided. In real-world scenarios, we often encounter situations where only one inverse element of a matrix needs to be solved, such as inverse operations in image geometric transformations, parameter estimation in machine learning, sensitivity analysis in physical system modeling, and reversible encryption in cryptography.
In this paper, we also employ the Sherman–Morrison formula or generalized Sherman–Morrison–Woodbury formula for the identity matrix to deduce the alterations in the inverse matrix resulting from modifying a small subset of its elements. The difference between the method in this paper and the previous ones lies in the application of the inverse correction formula for the identity matrix, which makes the derivation more concise and easier to generalize.
An outline of this paper is as follows. In Section 2, the Sherman–Morrison formula and generalized Sherman–Morrison–Woodbury formula for the identity matrix are given. In Section 3, the adjustment formula for the inverse matrix after two elements in the matrix change is presented and generalized by G. Zielke [2]. In Section 4, a fast calculation method for a single inverse element is derived. In Section 5, some interesting examples are given to illustrate the effectiveness of the new algorithm.

2. Inverse Correction Formula of Identity Matrix

With the use of the following well-known Sherman–Morrison formula:
( A + u v T ) 1 = A 1 A 1 u v T A 1 1 + v T A 1 u , 1 + v T A 1 u 0 ,
where A R n × n , u , v R n , v T is the transpose of v, and the generalized Sherman–Morrison–Woodbury formula
A + k = 1 p U k V k T 1 = A 1 A 1 [ U 1 , U 2 , , U p ] M 1 V 1 T V 2 T V p T A 1 ,
where U k , V k are n × m matrices, k = 1 , , p , and M is an n m -by- n m matrix of the form
M = I m + V 1 T A 1 U 1 V 1 T A 1 U 2 V 1 T A 1 U n V 2 T A 1 U 1 I m + V 2 T A 1 U 2 V 2 T A 1 U n V n T A 1 U 1 V n T A 1 U 2 I m + V n T A 1 U n ,
we can obtain the following inverse correction formula of the identity matrix. That is, Equations (1) and (2) can be described as the following formulas when A is the identity matrix E and U k , V k are n × 1 vectors u k and v k , k = 1 , , p .
( E + u v T ) 1 = E u v T 1 + v T u , 1 + v T u 0 ,
and
E + k = 1 p u k v k T 1 = E [ u 1 , u 2 , , u p ] M 1 v 1 T v 2 T v p T ,
where M is an p × p matrix of the form
M = 1 + v 1 T u 1 v 1 T u 2 v 1 T u p v 2 T u 1 1 + v 2 T u 2 v 2 T u p v p T u 1 v p T u 2 1 + v p T u p .

3. Adjustment Inverse of a Matrix When an Element or Two Elements Are Perturbed

Let A be the matrix with one element perturbed in matrix B, that is, A = B + t e i e j T . If the inverse of B is known, with the use of Formula (1), we will provide a fast way to find the inverse of the matrix A.
a = B + t e i e j T 1 = b t b e i e j T b 1 + t e j T b e i = b t 1 + t b j i b ( : , i ) b ( j , : ) , 1 + t b j i 0 .
The total computational load is 2 n 2 + n + 3 , where n is the dimension. This result is identical to reference [1]. Refer to Example 1.
Before discussing the adjustment inverse of a matrix when two elements are perturbed, let us first examine the changes in the inverse matrix of the identity matrix if two rows of elements are altered.
Assume that u = ( a 1 , a 2 , , a n ) T , v = ( b 1 , b 2 , , b n ) T C n , c 1 , c 2 C . By using Formula (3) twice in succession or Formula (4), we obtain
( E + c 1 e i u T + c 2 e j v T ) 1 = E c 1 ( 1 + c 2 b j ) e i u T + c 2 ( 1 + c 1 a i ) e j v T c 1 c 2 ( a j e i v T + b i e j u T ) 1 + c 1 a i + c 2 b j + c 1 c 2 ( a i b j a j b i ) ,
where 1 + c 1 a i + c 2 b j + c 1 c 2 ( a i b j a j b i ) 0 .
Assume that the inverse of B is known, B 1 = b . And A is a perturbation of two arbitrary rows of elements in the matrix of B, A = B + c 1 e i e r T + d e j e s T . If A 1 = a , we have
a ( B + c 1 e i e r T + c 2 e j e s T ) = E .
Multiplying both sides on the right by b, we obtain
a ( E + c 1 e i b ( r , : ) + c 2 e j b ( s , : ) ) = b ,
therefore, applying (6), we obtain
a = b E + c 1 e i b ( r , : ) + c 2 e j b ( s , : ) 1 = b E c 1 1 + c 2 b s j e i b ( r , : ) + c 2 1 + c 1 b r i e j b ( s , : ) c 1 c 2 b r j e i b ( s , : ) + b s i e j b ( r , : ) 1 + c 1 b r i + c 2 b s j + c 1 c 2 b r i b s j b r j b s i = b c 1 1 + c 2 b s j b ( : , i ) b ( r , : ) + c 2 1 + c 1 b r i b ( : , j ) b ( s , : ) c 1 c 2 b r j b ( : , i ) b ( s , : ) + b s i b ( : , j ) b ( r , : ) 1 + c 1 b r i + c 2 b s j + c 1 c 2 b r i b s j b r j b s i ,
where D = 1 + c 1 b r i + c 2 b s j + c 1 c 2 ( b r i b s j b r j b s i ) . Set h 1 = c 1 ( 1 + c 2 b s j ) D , h 2 = c 1 c 2 b r j D , h 3 = c 2 ( 1 + c 1 b r i ) D , h 4 = c 1 c 2 b s i D , if D 0 . We get
a = b b ( : , i ) [ h 1 b ( r , : ) h 2 b ( s , : ) ] b ( : , j ) [ h 3 b ( s , : ) h 4 b ( r , : ) ] .
The total computational load is 4 n 2 + 6 n + 24 , where n is the dimension of the matrix A.
This extends a result of G. Zielke [2].
In fact, if we set r = j , s = i and c 1 = c 2 = c in the above formula, we obtain the following formula:
a = b c ( 1 + c b i j ) b ( : , i ) b ( j , : ) + c ( 1 + c b i j ) b ( : , j ) b ( i , : ) c 2 [ b j j b ( : , i ) b ( i , : ) + b i i b ( : , j ) b ( j , : ) ] ( 1 + c b i j ) 2 c 2 b i i b j j , b i j = b j i ( b s y m m e t r i c ) ,
where d = ( 1 + c b i j ) 2 c 2 b i i b j j 0 . Set h 1 = 1 + c b i j , h 2 = c b j j , h 3 = c b i i , and d = h 1 2 h 2 h 3 ; we get
a = b c d [ b ( : , i ) ( h 1 b ( j , : ) + h 2 b ( i , : ) ) + b ( : , j ) ( h 3 b ( j , : ) + h 1 b ( i , : ) ) ] .
This result is identical to reference [2]. The total workload can be reduced to 4 n 2 + 6 n + 10 .

4. Calculating One Element in the Inverse of a Known Matrix

In order to solve a row (column) of the inverse matrix of a known matrix, we can use the method of solving linear equations, such as A ( a 1 j , a 2 j , , a n j ) T = e j , where e j is a vector where the j-th component is 1 and the rest is 0. The amount of work to solve the equations is about 2 3 n 3 + O ( n 2 ) . Under certain conditions, we can greatly reduce the workload.

4.1. A Row Missing in the Inverse Matrix of an Upper Triangular Matrix

Assume that U is an upper triangular matrix. How do we quickly obtain a row in the inverse matrix of U? Let U = ( U i j ) and U i j = 0 , if i > j . To solve the k-th row of u = U 1 , where u = ( u i j ) and u i j = 0 , and if i > j , we carry out the following:
Using u U = E , we obtain:
u ( k , k ) U ( k , k ) = 1 , u ( k , k ) U ( k , k + 1 ) + u ( k , k + 1 ) U ( k + 1 , k + 1 ) = 0 , u ( k , k ) U ( k , k + 2 ) + u ( k , k + 1 ) U ( k + 1 , k + 2 ) + u ( k , k + 2 ) U ( k + 2 , k + 2 ) = 0 , u ( k , k ) U ( k , n ) + u ( k , k + 1 ) U ( k + 1 , n ) + + u ( k , n ) U ( n , n ) = 0 .
Therefore, we get
u ( k , k ) = 1 / U ( k , k ) , u ( k , k + 1 ) = ( u ( k , k ) U ( k , k + 1 ) ) / U ( k + 1 , k + 1 ) , u ( k , k + 2 ) = ( u ( k , k ) U ( k , k + 2 ) + u ( k , k + 1 ) U ( k + 1 , k + 2 ) ) / U ( k + 2 , k + 2 ) , u ( k , n ) = ( u ( k , k ) U ( k , n ) + u ( k , k + 1 ) U ( k + 1 , n ) + + u ( k , n 1 ) U ( n 1 , n ) ) / U ( n , n ) .
The total computational load is ( n k ) 2 + n k + 1 , 1 k n .
Similarly, assume that L is a unit lower triangular matrix. How do we quickly obtain a column in the inverse matrix of L? Let L = ( L ( i , j ) ) and L ( i , j ) = 0 , if i < j . To solve the k-th column of l = L 1 , where l = ( l ( i , j ) ) and l ( i , j ) = 0 , if i < j , we use L l = E and obtain l ( k , k ) = 1 :
l ( k + 1 , k ) = L ( k + 1 , k ) , l ( k + 2 , k ) = L ( k + 2 , k ) L ( k + 2 , k + 1 ) l ( k + 1 , k ) , l ( k + 3 , k ) = L ( k + 3 , k ) L ( k + 3 , k + 1 ) l ( k + 1 , k ) L ( k + 3 , k + 2 ) l ( k + 2 , k ) , l ( n , k ) = L ( n , k ) L ( n , k + 1 ) l ( k + 1 , k ) L ( n , n 1 ) l ( n 1 , k ) .
The total computational load is ( n k ) 2 n + k , 1 k n .

4.2. Calculating One Element in Its Inverse Matrix if the L U Decomposition of Matrix Is Given

By A = L U , we have a = A 1 = U 1 L 1 = ( u i j ) n × n ( l i j ) n × n , and
a i j = ( 0 , , u i i , u i , i + 1 , , u i n ) ( 0 , , 0 , 1 , l j + 1 , j , , l n j ) T = u i j + u ( i , j + 1 : n ) l ( j + 1 : n , j ) , ( s e t j i )
The total computational load is 2 ( n j ) , where n is the dimension of the matrix A.
Based on (12), we have
a i j = u i j + u ( i , j + 1 : n ) l ( j + 1 : n , j ) , j = i , , n ;
and
a i j = u ( i , i : n ) l ( i : n , j ) , j = 1 , , i 1 .
In fact, we can calculate the corresponding row of U according to Formula (10) and the corresponding column of L according to Formula (11) first, and then obtain the complete process of calculating a i j by Formula (13) or (14). The MATLAB statement is described as follows:
l = z e r o s ( n , 1 ) ; u = l T ; ( j i )
l ( j ) = 1 ; l ( j + 1 ) = L ( j + 1 , j ) ;
f o r k = j + 2 : n
l ( k ) = L ( k , j ) L ( k , j + 1 : k 1 ) l ( j + 1 : k 1 ) ;
e n d
u ( i ) = 1 / U ( i , i ) ;
f o r k = i + 1 : n
u ( k ) = ( u ( i : k 1 ) U ( i : k 1 , k ) ) / U ( k , k ) ;
e n d
a ( i , j ) = u ( j ) + u ( j + 1 : n ) l ( j + 1 : n ) ;
The total computational load is ( n j ) 2 + ( n i ) 2 + 2 n i j + 1 , where n is the dimension of the matrix A.
Remark 1.
The larger the values of i and j, the less workload it takes to calculate a i j . The total computational load is less than n 2 2 , when i , j > n 2 . It is easy to see that the matrix elements that affect the element a i j in the inverse matrix a are the elements in the lower right corner of L and U. Refer to the following figure.
L = 1 L j + 1 , j 1 L j + 2 , j L j + 2 , j + 1 1 L n , j L n , j + 1 L n , j + 2 1 , U = · U i , i U i , i + 1 U i , i + 2 U i , n U i + 1 , i + 1 U i + 1 , i + 2 U i + 1 , n U n 1 , n 1 U n 1 , n U n , n .
Especially, the computational complexity of calculating an inverse element of a matrix can be significantly reduced if the matrix possesses a certain special structure. Refer to Example 4.

5. Applications

Example 1.
The inverse of the following n-th-order matrix is well-known:
b = B 1 2 1 1 2 1 1 2 1 1 1 1 = 1 1 1 1 1 2 2 2 1 2 3 3 1 2 3 n .
With Formula (5), we can obtain
2 1 1 2 1 1 2 1 1 2 1 = b 1 1 + n 1 2 n 1 , 2 , , n = n 1 + n n 1 1 + n 1 1 + n n 1 1 + n 2 ( n 2 ) 1 + n 2 1 + n 1 1 + n 2 1 + n n 1 + n .
Example 2.
The inverse of the n-th-order tridiagonal matrix can be obtained with n 2 + O ( n ) workload (see [3,4,5]). With these algorithms and (7), we can get the inverse of the period tridiagonal matrix with O ( n 2 ) workload. In fact, if
b = B 1 a 1 b 1 c 2 a 2 b 2 c n 1 a n 1 b n 1 c n a n 1 , A = a 1 b 1 d 1 c 2 a 2 b 2 c n 1 a n 1 b n 1 d 2 c n a n ,
then
a = A 1 = b + b ( : , 1 ) [ h 2 b ( 1 , : ) h 1 b ( n , : ) ] + b ( : , n ) [ h 4 b ( n , : ) h 3 b ( 1 , : ) ] ,
where h 1 = d 1 ( 1 + d 2 b ( 1 , n ) ) D , h 2 = d 1 d 2 b ( n . n ) D , h 3 = d 2 ( 1 + d 1 b ( n , 1 ) ) D , h 4 = d 1 d 2 b ( 1 , 1 ) D , and D = 1 + d 1 b ( n , 1 ) + d 2 b ( 1 , n ) + d 1 d 2 ( b ( n , 1 ) b ( 1 , n ) b ( n , n ) b ( 1 , 1 ) ) . It needs to cost 3 n 2 + O ( n ) workload.
It is easy to deduce that solving A x = f requires only O ( n ) computational effort. In fact, letting y = B 1 f = ( y 1 , y 2 , , y n ) T (requiring 8 n 7 workload), then
x = A 1 f = y + b ( : , 1 ) [ h 2 y 1 h 1 y n ] + b ( : , n ) [ h 4 y n h 3 y 1 ] = y + [ h 2 y 1 h 1 y n ] B 1 e 1 + [ h 4 y n h 3 y 1 ] B 1 e n .
Refer to [4,5].
Example 3.
The following Comrade matrix A can be written as the sum of two matrices B and D:
B = a 1 b 1 c 2 a 2 b 2 c 3 a 3 b 3 c n 1 a n 1 b n 1 d 1 d 2 d n 2 c n a n = a 1 b 1 c 2 a 2 b 2 c 3 a 3 b 3 c n 1 a n 1 b n 1 0 0 0 c n a n + e n v T A + e n v T ,
where e n = ( 0 , 0 , , 0 , 1 ) T and v = ( d 1 , d 2 , , d n 2 , 0 , 0 ) T . With the use of the inverse of triangle matrix A and Formula (1), we can easily obtain the inverse of matrix B. If A is invertible, and we set a = a i j = A 1 , then
b = B 1 = a a e n v T a 1 + v T a e n = a a ( : , n ) ( v T a ) 1 + k = 1 n 2 d k a k n , 1 + k = 1 n 2 d k a k n 0 .
It is easy to deduce that solving B x = f requires only O ( n ) computational effort. In fact,
x = B 1 f = A 1 f g T f 1 + g ( n ) A 1 e n ,
where g = ( A T ) 1 v . Refer to [6,7,8,9]. Table 1 compares the numerical results obtained by using this fast algorithm, MATLAB’s built-in backslash operation, and methods for sparse matrices (regard A as a strip matrix with an upper half bandwidth of 1 and a lower half bandwidth of n 1 ) on a randomly selected coefficient matrix A and constant term f of a system of Comrade linear equations. The values for c p u (seconds) and e r r o r = f B x 2 in the table are the averages of cpu and error of 50 runs repeatedly the corresponding method.
All experiments (including the experiments in the example below) are carried out by using MATLAB (version R2016b) on a PC with an Intel® Xeon® E3-1225 v6 CPU @3.30 GHz to 3.31 GHz (Intel Corporation, Santa Clara, CA, USA), 8 GB RAM, and Windows 10.
Example 4.
Let A = ( a i j ) be a nonsingular tridiagonal matrix of order n such that a i j = 0 if | i j | > 1 . In general, many technical problems have coefficient matrices of this type. L U decomposition of an n-order tridiagonal matrix A requires 3 n 3 flops, and calculating one inverse element a ( i , j ) after L U decomposition of the tridiagonal matrix needs 4 n 2 i 2 j + 1 flops. Therefore, calculating one inverse element of a tridiagonal matrix of order n costs about 7 n 2 i 2 j 2 flops in total. Similarly, the computational complexity of a certain inverse element of a general banded matrix with bandwidth p can be deduced (refer to [10]). Table 2 compares the numerical results of a ( i , j ) obtained by using fast algorithm (14), MATLAB’s built-in backslash operation ( A e j , e j is the j-th column of the identity matrix) and the Thomas algorithm on a randomly selected invertible matrix, where i = n 3 and j = n 2 . The values for c p u (seconds) in the table are obtained from 50. The average value of the corresponding method run repeatedly. “error” refers to the discrepancy between the values obtained by calculating element a ( i , j ) using the two different methods.
Example 5.
Let B be a bidiagonal matrix and A be the matrix obtained after perturbation of four elements in B.
B = 1 1 1 1 1 1 1 , A = 1 1 2 1 1 1 2 1 2 1 1 1 2 1 1 .
Letting b = ( b i j ) n × n = B 1 and a = A 1 , then
A = B + u 1 e 1 T + u 2 e n T = ( E + u 1 e 1 T b + u 2 e n T b ) B = ( E + u 1 b ( 1 , : ) + u 2 b ( n , : ) ) B ,
Therefore, a = b ( E + u 1 b ( 1 , : ) + u 2 b ( n , : ) ) 1 . According to Formula (4), we can easily obtain
a = b b [ u 1 , u 2 ] M 1 [ b ( 1 , : ) , b ( n , : ) ] T = 1 1 3 1 3 1 3 1 3 1 3 1 1 3 2 3 2 3 2 3 2 3 1 1 3 1 3 2 3 2 3 2 3 1 1 3 1 3 2 3 2 3 2 3 1 1 3 1 3 1 3 2 3 2 3 1 2 1 2 1 2 1 2 1 2 1 2 0 2 3 2 3 2 3 2 3 2 3 ,
where
u 1 = 0 0 1 2 1 2 , u n = 1 2 1 2 0 0 , b = 1 1 1 1 1 1 1 1 1 1 , M = 1 1 2 1 2 .

Author Contributions

Conceptualization, W.L.; Methodology, W.Z. and W.L.; Validation, W.Z.; Formal Analysis, W.L.; Writing—Original Draft Preparation, W.Z.; Writing—Review and Editing, W.L.; Supervision, W.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was partially supported by the Scientific Research Fund Project of the Education Department of Yunnan Province (NO. 2026J0969) and Teaching Research Project of Yunnan Provincial Higher Education Computer Basic Teaching Guidance Committee and Yunnan Provincial Higher Education Computer Teaching Research Association in 2026 (No. 2026013).

Data Availability Statement

No new data were created or analyzed in this study.

Conflicts of Interest

The authors declare they have no conflict of interests.

References

  1. Herndon, J.R. Algorithm 51: Adjust inverse of a matrix when an element is perturbed. Commun. ACM 1961, 4, 180. [Google Scholar] [CrossRef]
  2. Zielke, G. Algorithm 325: Adjustment of the inverse of a symmetric matrix when two symmetric elements are changed. Commun. ACM 1968, 11, 118. [Google Scholar] [CrossRef]
  3. Jia, J.; Li, S. On the inverse and determinant of general bordered tridiagonal matrices. Comput. Math. Appl. 2015, 69, 503–509. [Google Scholar] [CrossRef]
  4. Hopkinsa, T.; Kılıç, E. An analytical approach: Explicit inverses of periodic tridiagonal matrices. J. Comput. Appl. Math. 2017, 335, 207–226. [Google Scholar] [CrossRef]
  5. Jia, J.-T.; Wang, Y.-F. Numerical algorithms for the fast and reliable solution of periodic tridiagonal Toeplitz linear systems. Numer. Algorithms 2025, 98, 307–324. [Google Scholar] [CrossRef]
  6. Karawia, A.A. Two algorithms for solving comrade linear systems. Appl. Math. Comput. 2007, 189, 291–297. [Google Scholar] [CrossRef]
  7. Karawia, A.A. Symbolic algorithm for solving comrade linear systems based on a modified Stair-Diagonal Approach. Appl. Math. Comput. 2013, 26, 913–918. [Google Scholar] [CrossRef]
  8. Jia, J.; Kong, Q. A novel elementary algorithm for solving comrade linear systems. Appl. Math. Comput. 2014, 236, 642–646. [Google Scholar] [CrossRef]
  9. Marrero, J.A. On linear-time solvers for comrade linear systems. J. Comput. Appl. Math. 2020, 366, 112421. [Google Scholar] [CrossRef]
  10. Ran, R.-S.; Huang, T.-Z. An inversion algorithm for a banded matrix. Comput. Math. Appl. 2009, 58, 1699–1710. [Google Scholar] [CrossRef][Green Version]
  11. Jia, J.; Sogabe, T. Generalized Sherman-Morrison-Woodbury formula based algorithm for the inverses of opposite-bordered tridiagonal matrices. J. Math. Chem. 2020, 58, 1466–1480. [Google Scholar] [CrossRef]
  12. Zhang, D.; Ma, L.; Mosić, D. Representations of the Moore-Penrose inverse of a 2×2 block matrix based on Schur complements. Appl. Math. Comput. 2026, 512, 129776. [Google Scholar] [CrossRef]
Table 1. Comparison with fast algorithm, method for sparse matrix and backslash operation on system of Comrade linear equations of order n.
Table 1. Comparison with fast algorithm, method for sparse matrix and backslash operation on system of Comrade linear equations of order n.
Methodn5000800010,00015,00020,000
Backslashcpu0.14550.44651.21502.424519.63
error 5.66 × 10 10 1.54 × 10 9 4.33 × 10 9 4.48 × 10 9 7.07 × 10 8
Method for Sparse Matrixcpu0.02550.18270.85361.889115.1081
error 1.96 × 10 12 7.54 × 10 12 9.54 × 10 12 1.46 × 10 11 1.41 × 10 11
Fast Algorithmcpu0.00220.08210.49141.218510.64
error 5.81 × 10 10 2.36 × 10 9 2.59 × 10 9 6.90 × 10 9 3.08 × 10 8
Table 2. Comparison with fast algorithm, Thomas algorithm and backslash operation on calculating one element in the inverse of a triangle matrix of order n.
Table 2. Comparison with fast algorithm, Thomas algorithm and backslash operation on calculating one element in the inverse of a triangle matrix of order n.
n10,00015,00020,00025,00030,000
Backslash0.61301.49484.482510.022328.6107
Thomas algorithm0.00040.00080.10320.16440.1939
Fast algorithm0.00020.00030.07810.08360.1174
Error 1.4 × 10 17 1.4 × 10 17 1.1 × 10 19 5.6 × 10 17 1.4 × 10 17
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zheng, W.; Li, W. Calculating the Inverse Matrix After Some Elements in the Matrix Change. Mathematics 2026, 14, 1525. https://doi.org/10.3390/math14091525

AMA Style

Zheng W, Li W. Calculating the Inverse Matrix After Some Elements in the Matrix Change. Mathematics. 2026; 14(9):1525. https://doi.org/10.3390/math14091525

Chicago/Turabian Style

Zheng, Wei, and Weiguo Li. 2026. "Calculating the Inverse Matrix After Some Elements in the Matrix Change" Mathematics 14, no. 9: 1525. https://doi.org/10.3390/math14091525

APA Style

Zheng, W., & Li, W. (2026). Calculating the Inverse Matrix After Some Elements in the Matrix Change. Mathematics, 14(9), 1525. https://doi.org/10.3390/math14091525

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop