A MATLAB toolbox that analyzes the structural properties of a matrix using manual Gaussian elimination (no built-in functions like rank, null, inv, or rref).
| File | Description |
|---|---|
matrixStructureAnalyzer.m |
Main function that computes all structural properties of a matrix |
myRREF.m |
Computes the Reduced Row Echelon Form (forward + backward elimination) |
solveMultipleRHS.m |
Solves multiple right-hand-side systems (used for one-sided inverses) |
demo.m |
Example usage with a sample matrix |
report.docx |
Detailed technical report (Persian) |
A = [1 2 0 3 5;
2 4 1 1 5;
3 6 1 4 5];
res = matrixStructureAnalyzer(A);
disp('Rank(A):'); disp(res.Rank)
disp('Columns independent?'); disp(res.ColumnsIndependent)
disp('Invertible?'); disp(res.Invertible)
disp('Null space basis:'); disp(res.NullSpaceBasis)
disp('Column space basis:'); disp(res.ColumnSpaceBasis)
disp('Left inverse:'); disp(res.LeftInverse)
disp('Right inverse:'); disp(res.RightInverse)- Rank (scalar integer) — Number of pivot columns found in RREF
- ColumnsIndependent (logical) —
truewhen rank == number of columns - Invertible (logical) —
trueonly for square matrices with full rank - InvertibleReason (string) — Natural-language explanation of why a matrix is or isn't invertible
- NullSpaceBasis (matrix or string) — Basis vectors for the null space;
'No solution'if null space is trivial - NullSpaceDim (integer) — Number of free variables (n - rank)
- ColumnSpaceBasis (matrix or string) — Pivot columns from the original matrix A
- ColumnSpaceDim (integer) — Equals rank (by the rank theorem)
- RowSpaceBasis (matrix or string) — Non-zero rows of the RREF
- RowSpaceDim (integer) — Equals rank
- LeftInverse (matrix or string) — Solution to A^T X = I_n (exists only if rank == n)
- RightInverse (matrix or string) — Solution to A X = I_m (exists only if rank == m)
The entire analysis is built on top of a manual Gauss-Jordan elimination:
myRREFperforms forward elimination with partial pivoting, followed by backward elimination to produce the RREF.solveMultipleRHSperforms Gauss-Jordan elimination on the augmented matrix [M | B] to solve M·X = B for multiple right-hand sides simultaneously.matrixStructureAnalyzerorchestrates the above two functions and extracts all structural properties from the RREF result.