1. Introduction
The concept of matrix inverse is essential in the solution of systems of linear equations and other various practical applications. For a nonsingular matrix
, there is a unique matrix
called the usual inverse of
, with which the condition
holds [1,2]. The usual matrix inverse has the following properties,
where
is the transpose of
and
is its conjugate transpose. While it is generally thought of that
is unique to nonsingular matrices, there are cases where approximations of matrix inverse from singular matrices or rectangular matrices are necessary; hence, the concept of generalized matrix inverse
defined as follows [
3],
In a system of linear equation
where
is a nonsingular
matrix, left multiplication of the equation by
yields
and with
, the solution is given by
[
1,
2]. Where
is not necessarily singular such that
then
has a solution if and only if
[
3]. Consequently, Penrose [
3] introduced the Moore-Penrose matrix inverse denoted by
with the following properties,
There are other generalized matrix inverses introduced depending on relations and applications investigated such as those involved in differential and difference equations, cryptography, Markov chains, and numerical analysis [
5,
7]. For instance, the Drazin matrix inverse denoted by
satisfies the following conditions [
6]
where
called the index of
, is the least nonnegative integer such that
. Note that the rank of
is the number of its nonzero eigenvalues. When
, the Drazin inverse reduces to the usual matrix inverse; that is
.
With technological applications in the computation of matrix inverse for specific purposes, accuracy in estimations and consistency of generalized matrix inverse can be readily obtained. The very goal of this paper is directed to the pedagogical context. Hence, we revisit the fundamental concepts and procedures to facilitate conceptual understanding of mathematical principles and fluency in procedural knowledge. With , and as matrix size becomes larger, manually solving for solution of systems of linear equations by separately computing for the inverse of the coefficient matrix becomes tedious and thus the approach becomes less efficient in terms of teaching time. One may consider common approaches in solving systems of linear equations without matrix inversing such as the Gaussian elimination method, Gauss-Jordan reduction method, LU Decomposition.
In the Gauss-Jordan reduction method, solving both the linear system and matrix inverse can be addressed independently. For linear systems , an augmented matrix is formed and elementary row operations are performed to transform into reduced row echelon form. The process is actually multiplying and without specifically computing the entries of
In matrix inversing, we extend the Gauss-Jordan reduction method by forming a linear system . With is as the coefficient matrix and then augmenting it with we produce . Here, the columns of represent n different sets of right-hand side values of equations of the linear system Forming and transforming into reduced row echelon form implies solving a system of linear equations with different right-hand sides at the same time. That is, pre-multiplying . With this approach, solving systems of linear equations is but a special case of matrix inversing.
The second method of computing matrix inverse involves the determinant as indicated in the relation below [
1,
2].
where
;
and
is a matrix formed by removing the column and row of
where
lies.
is a cofactor of
Current texts in linear algebra treat independently these two usually-employed methods, Gauss-Jordan reduction method through elementary row operations and determinant method, of matrix inversion. In this paper, we attempted to develop a general approach applied to matrices with numerical entries to connect the Gauss-Jordan reduction and determinant methods and to propose a more straightforward and pedagogically efficient algorithm in manually computing matrix inverse.
2. Materials and Methods
Matrix Reduction and Inversion by Cross-Multiplication-Flip (CMF) Method
We compute the inverse of an
matrix
with the augmented matrix
represented as follows:
|
|
|
… |
|
|
1 |
0 |
… |
0 |
|
|
… |
|
|
0 |
1 |
… |
0 |
| . |
. |
… |
. |
|
. |
. |
… |
. |
| . |
. |
… |
. |
|
. |
. |
… |
. |
|
|
… |
|
|
0 |
0 |
… |
0 |
|
|
… |
|
|
0 |
0 |
… |
1 |
In the Gauss-Jordan reduction, the process of matrix inversion involves transformation of A into reduced row echelon form, which in the case of nonsingular matrices, is the identity matrix by performing elementary row operations through the rows of the augmented matrix. We start the reduction by zeroing out the entries under . Assuming the first entries of each row of A are nonzero, we do the straightforward approach by taking two successive rows at a time beginning at the top. We multiply by and by . Adding the results would produce a row with zero first entry. We continue the process with and , then and until and . We write the resulting rows under and label this as a submatrix with rows and columns by disregarding the first column with zero entries.
The process of multiplying
row by
and the
row by
and adding the results leads to a scheme of individually computing each entry of the succeeding submatrix
which we refer to here as
cross-multiplication and that the resulting entry for the left matrix,
, is denoted as
where
indicates the number of reductions performed. In determinant form, we can also denoted
as
where
, which provides a symmetric (butterfly) movement of the algorithm; hence, the term cross-multiplication. We also denote the entries of the right matrix by
which is determined in similar manner since cross-multiplication is extended to the entire augmented matrix. We now represent the initial results as follows:
|
|
|
… |
|
|
|
1 |
0 |
… |
0 |
|
|
… |
|
|
|
0 |
1 |
… |
0 |
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
|
|
… |
|
|
|
0 |
0 |
… |
0 |
|
|
… |
|
|
|
0 |
0 |
… |
1 |
|
|
|
|
… |
|
|
|
|
… |
0 |
| |
|
|
… |
|
|
|
|
|
|
| |
. |
. |
. |
. |
|
. |
. |
… |
. |
| |
|
|
|
|
|
|
|
|
|
| … |
… |
… |
… |
… |
… |
|
… |
… |
… |
… |
|
|
|
|
|
|
|
|
|
… |
|
| |
|
|
|
|
|
|
|
… |
|
|
|
|
|
|
|
|
|
|
… |
|
At this point, the last row of
can now be determined from
and it should be
|
|
… |
|
But we will not compute the last row of
yet to avoid fractions. We now do the first part of the FLIP by getting the first row of each submatrix beginning from the lowest submatrix
to form an augmented matrix by
.
|
0 |
0 |
… |
0 |
|
|
|
|
… |
|
| 0 |
0 |
… |
|
|
|
|
|
… |
|
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
| 0 |
|
… |
|
|
|
|
|
… |
|
|
|
… |
|
|
|
1 |
0 |
… |
0 |
Note that we cannot perform cross-multiplication here since the first entries of the left matrix are zeros, except that of the last row. We do now the second part of the FLIP by flipping left the entries of the left matrix to obtain a matrix in lower triangular form.
|
|
0 |
… |
0 |
0 |
|
|
|
… |
|
|
|
… |
0 |
0 |
|
|
|
… |
|
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
|
|
… |
|
0 |
|
|
|
… |
|
|
|
… |
|
|
|
1 |
0 |
… |
0 |
We repeat the process of performing cross-multiplication through the rows of
to obtain the rows of
. Here, we denote the entries of the left matrix by
and of the right matrix by
.
|
|
0 |
… |
0 |
0 |
|
|
|
… |
|
|
|
… |
0 |
0 |
|
|
|
… |
|
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
|
|
… |
|
|
|
|
|
… |
|
|
|
… |
|
|
|
1 |
0 |
… |
0 |
|
|
|
… |
0 |
0 |
|
|
|
|
|
| |
|
… |
0 |
0 |
|
|
|
|
|
| |
. |
… |
|
. |
|
. |
. |
… |
. |
| |
. |
… |
|
. |
|
. |
. |
… |
. |
| |
|
|
|
0 |
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
| … |
… |
… |
… |
… |
… |
|
… |
… |
… |
… |
|
|
|
|
|
0 |
|
|
|
… |
|
| |
|
|
|
|
|
|
|
… |
|
|
|
|
|
|
|
|
|
|
… |
|
Since the left matrix in
is in lower triangular form, every first row of the left matrix of every succeeding submatrix
takes the form
|
|
|
0 |
… |
0 |
|
|
|
… |
|
that is,
and 0 elsewhere.
To restore the original sequence of rows and columns, we now write the rows of the augmented matrix leading to the inverse of A by collecting the first rows of
beginning from
and doing the FUL movement.
|
|
0 |
… |
0 |
0 |
|
|
|
… |
|
| 0 |
|
… |
0 |
0 |
|
|
|
… |
|
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
| 0 |
0 |
… |
|
0 |
|
|
|
… |
|
| 0 |
0 |
… |
0 |
|
|
|
|
… |
|
Note that the left matrix is a diagonal matrix and we can now specify the inverse by diving each row of
by the corresponding diagonal entry of C. Thus
|
1 |
0 |
… |
0 |
0 |
|
|
|
… |
|
| 0 |
1 |
… |
0 |
0 |
|
|
|
… |
|
| . |
. |
… |
. |
. |
|
. |
. |
… |
. |
| . |
. |
… |
. |
. |
|
. |
. |
… |
. |
| 0 |
0 |
… |
1 |
0 |
|
|
|
… |
|
| 0 |
0 |
… |
0 |
1 |
|
|
|
… |
|
Cases with Zero First Entries
The derivation of the algorithm assumes that there are no zero first entries. If there are zero first entries, these rows are considered as standby rows and are not involved in cross-multiplication within a submatrix where it belongs. These rows are then transferred to the next submatrix by dropping the first zero entry. Below,
, hence, the row is transferred as first row of the next submatrix. Cross-multiplication is performed between the first and third rows of
. We can also first move the row with zero first entry to the bottom of its submatrix to avoid confusion before commencing cross-multiplication especially if it is the first row of a submatrix. If all of the first entries of a submatrix are zeros, then the matrix is invertible.
|
|
|
… |
|
|
|
1 |
0 |
… |
0 |
| 0 |
|
… |
|
|
|
0 |
1 |
… |
0 |
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
| . |
. |
… |
|
. |
|
. |
. |
… |
. |
|
|
… |
|
|
|
0 |
0 |
… |
0 |
|
|
… |
|
|
|
0 |
0 |
… |
1 |
|
|
|
… |
|
|
|
0 |
1 |
… |
0 |
| |
|
|
… |
|
|
|
|
|
|
| |
. |
. |
. |
. |
|
. |
. |
… |
. |
| |
|
|
|
|
|
|
|
|
|
3. CMF and Determinant Methods
For this illustration, we make use of
matrix denoted as follows
We proceed with reduction by cross-multiplication through the rows of the augmented matrix.
|
|
|
|
|
1 |
0 |
0 |
|
|
|
|
0 |
1 |
0 |
|
|
|
|
0 |
0 |
1 |
|
|
|
|
|
|
|
0 |
| |
|
|
|
0 |
|
|
|
|
|
|
|
|
|
|
We let
and by the determinant method,
Now we introduce the following lemma:
Lemma 1.
If
a
matrix then
where
Proof. By the above definition of
,
Thus,
Note that each of can be expressed in terms of cofactor such that , , , , and
From
, we can specify the entries in the last row of
as follows:
and
To verify the entries in the first and second rows of
we do the FUL technique. For simplicity of notations, we use the cofactor equivalents of each
.
|
|
0 |
0 |
|
|
|
|
|
|
|
|
|
|
0 |
|
|
|
|
1 |
0 |
0 |
| |
|
0 |
0 |
|
|
|
|
|
|
0 |
|
|
|
0 |
|
|
|
|
1 |
0 |
0 |
|
|
|
0 |
|
|
|
|
| |
|
|
|
|
|
0 |
|
|
|
|
|
|
|
|
We now verify the results for the remaining entries in the rows of
For the entries of the second row, we have
For the entries of the first row,
4. CMF and Solving Systems of Linear Equations
Earlier in this paper, we assume that the process of computing the matrix inverse is an extension of the Gauss-Jordan reduction method of solving systems of linear equations by forming system
. With the developed algorithm, we can now address the problem of solving linear systems by replacing each column of
by a set of right-hand values of the equations in the system.
|
|
|
… |
|
|
|
|
|
… |
|
|
… |
|
|
|
|
|
|
| . |
. |
… |
|
. |
|
|
|
. |
| . |
. |
… |
|
. |
|
|
|
. |
|
|
… |
|
|
|
|
|
… |
|
|
… |
|
|
|
|
|
… |
|
|
|
|
… |
|
|
|
|
… |
| |
|
|
… |
|
|
|
|
|
| |
. |
. |
. |
. |
|
. |
. |
… |
| |
|
|
|
|
|
|
|
|
| … |
… |
… |
… |
… |
… |
|
… |
… |
… |
|
|
|
|
|
|
|
|
|
… |
| |
|
|
|
|
|
|
|
… |
|
|
|
|
|
|
|
|
|
… |
or
, and so on. Working the way up, we can solve for
,
, …,
,
by back substitution. Likewise, by doing FLIP, we complete the Gauss-Jordan reduction to readily obtain the solution.
|
|
0 |
… |
0 |
0 |
|
|
|
… |
|
|
… |
0 |
0 |
|
|
|
… |
| . |
. |
… |
|
. |
|
. |
. |
… |
| . |
. |
… |
|
. |
|
. |
. |
… |
|
|
… |
|
|
|
|
|
… |
|
|
… |
|
|
|
|
|
… |
|
|
|
… |
0 |
0 |
|
|
|
|
| |
|
… |
0 |
0 |
|
|
|
|
| |
. |
… |
|
. |
|
. |
. |
… |
| |
. |
… |
|
. |
|
. |
. |
… |
| |
|
|
|
0 |
|
|
|
|
| |
|
|
|
|
|
|
|
|
| … |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Here for instance, , , …, , .
5. Verifying the Proposed Algorithm with Numerical Examples
We test the developed algorithm with specific cases and verify the result by the definition of matrix inverse.
Illustration 1.
matrix.
|
2 |
3 |
1 |
|
1 |
0 |
0 |
| 1 |
2 |
1 |
|
0 |
1 |
0 |
| 1 |
-2 |
2 |
|
0 |
0 |
1 |
|
|
1 |
1 |
|
-1 |
2 |
0 |
| |
-4 |
1 |
|
0 |
-1 |
1 |
|
|
|
5 |
|
-4 |
7 |
1 |
| Collect a row from each submatrix and do FLIP |
|
5 |
0 |
0 |
|
-4 |
7 |
1 |
| 1 |
1 |
0 |
|
-1 |
2 |
0 |
| 1 |
3 |
2 |
|
1 |
0 |
0 |
|
|
5 |
0 |
|
-1 |
3 |
-1 |
| |
2 |
2 |
|
2 |
-2 |
0 |
|
|
|
10 |
|
12 |
-16 |
-2 |
| Collect first row from each submatrix and do FLIP |
| |
10 |
0 |
0 |
|
12 |
-16 |
2 |
| |
0 |
5 |
0 |
|
-1 |
3 |
-1 |
| |
0 |
0 |
5 |
|
-4 |
7 |
1 |
| |
|
|
|
|
|
|
|
|
1 |
0 |
0 |
|
|
|
|
| 0 |
1 |
0 |
|
|
|
|
| 0 |
0 |
1 |
|
|
|
|
We verify the result by the definition
Illustration 2.
matrix with resulting zero first entry.
|
1 |
2 |
1 |
3 |
|
1 |
0 |
0 |
0 |
| 2 |
-2 |
0 |
1 |
|
0 |
1 |
0 |
0 |
| 1 |
-1 |
2 |
3 |
|
0 |
0 |
1 |
0 |
| 3 |
1 |
1 |
4 |
|
0 |
0 |
0 |
1 |
|
|
-6 |
-2 |
-5 |
|
-2 |
1 |
0 |
0 |
| * |
0 |
4 |
5 |
|
0 |
-1 |
2 |
0 |
| |
4 |
-5 |
-5 |
|
0 |
0 |
-3 |
1 |
| *Row 2 in is a standby row. |
|
|
|
38 |
50 |
|
8 |
-4 |
18 |
-6 |
| |
|
4 |
5 |
|
0 |
-1 |
2 |
0 |
|
|
|
|
-10 |
|
-32 |
-22 |
4 |
24 |
| We collect 1 row from each submatrix and do FLIP. Since an augmented matrix represents an equation, we can reduce to lower term a row with entries having common factor. |
|
5 |
0 |
0 |
0 |
|
16 |
11 |
-2 |
-12 |
| 5 |
4 |
0 |
0 |
|
0 |
-1 |
2 |
0 |
| 5 |
2 |
6 |
0 |
|
2 |
-1 |
0 |
0 |
| 3 |
1 |
2 |
1 |
|
1 |
0 |
0 |
0 |
|
|
20 |
0 |
0 |
|
-80 |
-60 |
20 |
60 |
| |
-10 |
30 |
0 |
|
10 |
0 |
-10 |
0 |
| |
-1 |
-8 |
5 |
|
-1 |
3 |
0 |
0 |
| Reducing to lower terms. |
| |
|
1 |
0 |
0 |
|
-4 |
-3 |
1 |
3 |
| |
|
1 |
-3 |
0 |
|
-1 |
0 |
1 |
0 |
| |
|
1 |
8 |
-5 |
|
1 |
-3 |
0 |
0 |
|
|
|
-3 |
0 |
|
3 |
3 |
0 |
-3 |
| |
|
11 |
-5 |
|
2 |
-3 |
-1 |
0 |
|
|
|
|
15 |
|
-39 |
-24 |
3 |
33 |
| Collect first rows and do FLIP |
| |
15 |
0 |
0 |
0 |
|
-39 |
-24 |
3 |
33 |
| |
0 |
-3 |
0 |
0 |
|
3 |
3 |
0 |
-3 |
| |
0 |
0 |
1 |
0 |
|
-4 |
-3 |
1 |
3 |
| |
0 |
0 |
0 |
5 |
|
16 |
11 |
-2 |
-12 |
| We express the results with a denominator 5. |
|
1 |
0 |
0 |
0 |
|
|
|
|
|
| 0 |
1 |
0 |
0 |
|
|
|
0 |
|
| 0 |
0 |
1 |
0 |
|
|
|
|
|
| |
0 |
0 |
0 |
1 |
|
|
|
|
|
We verify the result as follows.
Illustration 3. Solving a system of linear equations.
We form the augmented matrix and proceed with cross-multiplication as follows
|
1 |
-1 |
1 |
1 |
|
1 |
|
| 2 |
1 |
-1 |
-1 |
|
2 |
|
| 1 |
2 |
1 |
2 |
|
10 |
|
| 2 |
-2 |
-1 |
-1 |
|
-4 |
|
|
|
3 |
-3 |
-3 |
|
0 |
Reduce before flipping |
| |
3 |
3 |
5 |
|
18 |
|
| |
-6 |
-3 |
-5 |
|
-24 |
|
|
|
|
18 |
24 |
|
54 |
Reduce before flipping |
| |
|
9 |
15 |
|
36 |
|
|
|
|
|
54 |
|
162 |
Reduce before flipping |
| |
|
|
|
1 |
|
3 |
At this point, one may consider back substitution instead of flipping |
|
1 |
0 |
0 |
0 |
|
3 |
|
| 4 |
3 |
0 |
0 |
|
9 |
|
| 1 |
1 |
-1 |
0 |
|
0 |
|
| 1 |
1 |
-1 |
1 |
|
1 |
|
|
|
3 |
0 |
0 |
|
-3 |
|
| |
1 |
-4 |
0 |
|
-9 |
|
| |
0 |
0 |
1 |
|
1 |
Standby. This already gives |
|
|
|
-12 |
0 |
|
-24 |
|
| |
|
0 |
1 |
|
1 |
|
| |
|
|
|
|
|
|
|
6. Conclusions
The computation of matrix inverse by CMF is an innovation of the Gauss-Jordan reduction method by individually computing the entries of succeeding reduced augmented matrices through or ; Beginning with the augmented matrix the algorithm is continued until a matrix with one row is obtained. By taking the first row from each submatrix, an augmented matrix where the left matrix is in upper triangular form is obtained. Doing the FLIP by flipping the rows up and then flipping the rows of the left matrix to the left produces an augmented matrix where the left matrix is in lower triangular form, . The process of reduction by cross-multiplication is performed until obtaining the last submatrix . Collecting the first row from each submatrix and then doing the FLIP movement generates an augmented matrix from which the inverse is determined by dividing the entries of the right matrix by the corresponding diagonal entries of the left matrix.
Solving systems of linear equations by CMF follows the same algorithm as matrix inversing by treating each row of as different sets of right-hand values of the equations of the linear system.
For , the CMF proceeds in the same process as the determinant method in matrix inversing; thus, bridging the Gauss-Jordan reduction and determinant methods.
The limitation of the cross-multiplication occurs when a zero first entry occurs in which cross-multiplication cannot be performed. This can be compensated by permuting the rows, treating the row zero as a standby row and then placing it at the bottom row of the succeeding augmented submatrix.
Acknowledgments
The author acknowledges the invaluable service of peer reviewers of this paper.
Conflicts of Interest
The author declares no conflict of interest. This paper is solely developed by the author.
References
- Kolman, B.; Hill, D. Elementary Linear Algebra with Applications, 9th ed.; Pearson Education Ltd.: London, UK, 2014. [Google Scholar]
- Anton, H.; Rorres, C.; Kaul, A. Elementary Linear Algebra, 12th ed.; John Wiley and Sons: NY, USA, 2019. [Google Scholar]
- Ben-Israel, A.; Greville, T. Generalized Inverses: Theory and Applications; Springer: New York, 2003. [Google Scholar]
- Penrose, R.; Todd, J. A generalized inverse for matrices. Mathematical Proceedings of the Cambridge Philosophical Society 1955, 51. [Google Scholar] [CrossRef]
- Campbell, S.L. ; Meyer,, C.D. Generalized Inverses of Linear Transformations; Pitman: London, 1979. [Google Scholar]
- Drazin, M. P. Pseudo-inverses in associative rings and semigroups. The American Mathematical Monthly 1958, 65. [Google Scholar] [CrossRef]
- Hartwig, R.E.; Levine, J. Applications of Drazin inverse to the Hill cryptographic systems, Part III. Cryptologia 1981, 5. [Google Scholar] [CrossRef]
|
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. |
© 2023 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).