Matrix inverse and determinant

version 1.0.0.0 (1.37 KB) by Feng Cheng Chang
Finding inverse and determinant of matrix by order expansion and condensation

308 Downloads

Updated Wed, 16 Dec 2015 02:08:43 +0000

View License

The inverse and determinant of a given square matrix can be computed by the following routine applying simultaneously matrix order expansion and condensation. After completing the iteration, the expansion process results in the inverse of the given matrix (invM), and the condensation process generate an array of pivot elements (p) which eventualy gives the determinant (detM) of the given matrix (M):
[invM,detM,p,s,rc] = inv_det_opt(M).
In summary: (1) if the given matrix is non-singular then its determinant is found to be equal to the product of pivot elements. (2) if the last pivot element is found shrinking sharply toward zero, then the given matrix is said to be singular.

Cite As

Feng Cheng Chang (2022). Matrix inverse and determinant (https://www.mathworks.com/matlabcentral/fileexchange/48600-matrix-inverse-and-determinant), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: inv_det_0(A), mtx_d(A,D,d)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!