Singular Matrix Checker
Determine if a square matrix is singular by calculating its determinant. Features real-time Gaussian elimination and handles matrices up to 8x8.
About
In linear algebra, determining whether a matrix is singular is a fundamental diagnostic step before attempting operations like inversion or solving systems of linear equations. A singular matrix is a square matrix that does not have a multiplicative inverse. Geometrically, if a matrix represents a linear transformation, a singular matrix compresses space into a lower dimension (e.g., flattening a 3D volume into a 2D plane), resulting in a volume scaling factor of 0.
This checker utilizes Gaussian elimination with partial pivoting to compute the determinant efficiently. If the determinant D evaluates to zero (accounting for floating-point arithmetic limits where {
Formulas
The core mathematical test for singularity is evaluating the determinant of the matrix A. For small matrices, explicit algebraic formulas are used:
For a 2 × 2 matrix:
A = abcddet(A) = ad − bc
If ad − bc = 0, the matrix is singular.
For an n × n matrix (Gaussian Elimination approach):
The matrix is transformed into an upper triangular form U using row operations. The determinant is the product of the diagonal elements of U, adjusted by a sign factor S (±1) depending on the number of row swaps.
det(A) = S ⋅ n∏i=1 uiiWhere:
- S = Sign flip from row permutations.
- uii = Elements on the main diagonal of the upper triangular matrix.
Reference Data
| Property | Singular Matrix | Non-Singular (Invertible) Matrix |
|---|---|---|
| Determinant (det) | det(A) = 0 | det(A) ≠ 0 |
| Inverse (A-1) | Does not exist | Exists and is unique |
| System of Equations (Ax = b) | No solution or infinitely many solutions | Exactly one unique solution |
| Linear Independence | Rows/Columns are linearly dependent | Rows/Columns are linearly independent |
| Eigenvalues | At least one eigenvalue is 0 | All eigenvalues are non-zero |
| Rank (n × n matrix) | Rank < n | Rank = n (Full Rank) |
| Kernel / Null Space | Contains non-zero vectors | Contains only the zero vector 0 |