You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
The inverse (AI) and determinant (det) of a given square matrix (AO) may be directly found by
[AI,det] = inv1(AO)
It uses automatic pivoting scheme. All computations involves only simple matrix multiplication.
The direct result without pivoting may also be found by
AI = inv0(AO)
The sourse code is only 4 statement lines. Yet it works for AO = randn(n), even n = 1000.
However, it fails for some simple peculiar matrix, such as AO = [0 1; 1 0].
Cite As
Feng Cheng Chang (2026). Inverse and determinant of square matrix (https://uk.mathworks.com/matlabcentral/fileexchange/38819-inverse-and-determinant-of-square-matrix), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: GINV(X), inv4spd.m, InvSWM_F(xcoord,ycoord,lower,upper,RowStdOpt), Update Inverse Matrix
Inspired: inv_det_0(A)
General Information
- Version 1.5.0.0 (1.44 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
