AI Glossary / Mathematics and optimization / Beginner
Singular matrix
Definition
A singular matrix is a square matrix that has no inverse. Its rows or columns contain a linear dependency, so the transformation it represents loses at least one independent direction of information. For an n-by-n matrix, singularity is equivalent to rank below n, determinant zero and the existence of a nonzero vector x for which Ax = 0.
What it means
An invertible matrix maps each possible output back to exactly one input. A singular matrix cannot do that: different inputs can produce the same output, and some outputs may be unreachable. This distinction matters when solving equations, fitting models and interpreting covariance matrices. Singularity is a structural mathematical property, not a statement that a matrix contains only zeros or is useless. A singular matrix can still represent meaningful projections, redundant measurements or a lower-dimensional relationship.
How it works
To examine Ax = b, first consider the columns of A. Their span is the set of outputs the matrix can produce. If b lies outside that column space, no exact solution exists. If A is singular and b is reachable, there are infinitely many real solutions because a nonzero null-space vector can be added to one solution without changing Ax. Elimination and suitable matrix factorizations reveal rank and dependencies. In numerical work, a singular-value decomposition or rank-revealing factorization with an appropriate tolerance is usually more informative than testing whether a computed determinant is exactly zero.
Three practical examples
- A regression design can become rank deficient when one input column is an exact combination of others, making individual coefficients unidentifiable without additional choices.
- A covariance matrix can be singular when variables have an exact linear relationship, or when the available sample structure does not support full rank.
- A geometric projection onto a plane or line is deliberately singular because it discards the component perpendicular to that lower-dimensional space.
Think of it this way
Think of a recording device that stores only the total of two separate readings. Many pairs produce the same total, so the original pair cannot be uniquely recovered from the stored value. A singular transformation similarly collapses distinctions between inputs. The analogy captures information loss, but a matrix can preserve several independent combinations while losing only one, and additional external information may still identify a particular solution.
Worked example
Let A = [[1, 2], [2, 4]]. Its second row is twice its first, and its determinant is 1×4 − 2×2 = 0. For b = [3, 6], both equations reduce to x + 2y = 3. Every vector [3 − 2t, t], with real t, is a solution. For example, [3, 0] and [1, 1] both produce [3, 6]. Their difference [−2, 1] is a nonzero null-space vector because A[−2, 1] = [0, 0]. If b instead equals [3, 7], the equations demand both 2x + 4y = 6 and 2x + 4y = 7, so no solution exists. Among the infinitely many solutions for [3, 6], the minimum-Euclidean-norm one is [0.6, 1.2]: minimizing (3 − 2t)² + t² gives derivative −12 + 10t = 0, hence t = 1.2. A pseudoinverse can select that solution, but it does not reconstruct a unique original input that the matrix had already collapsed.
Illustrative case study
In a fictional project, Elm Forecasting includes both sales in units and the same quantity expressed in thousands as separate regression inputs. A solver reports rank deficiency. The team identifies the duplicate information, revisits the feature definitions and documents which representation is retained. It also checks whether coefficient interpretation was part of the intended use. The case illustrates diagnosis of a modeling dependency, not a claim that removing a column automatically improves predictive accuracy.
Common misconceptions and mistakes
Singular does not mean that Ax = b always has no solution; it can have infinitely many, depending on b. Near-singular and exactly singular are different: an invertible matrix can still amplify small errors severely. A small determinant alone is not a scale-independent measure of conditioning. Rectangular matrices can be rank deficient, but the ordinary singular-versus-invertible distinction here concerns square matrices. Adding a small diagonal term or using a pseudoinverse changes how a problem is solved; it does not magically restore information absent from the original measurements.
Business use
When a solver reports singularity, inspect duplicated features, redundant equations, missing constraints and intended symmetries. Determine whether the task needs an exact solution, a least-squares fit, a minimum-norm choice or regularization. Preserve the reason for that choice in the model documentation. Treat numerical rank tolerances in relation to data scale and measurement precision. If results vary sharply under tiny input changes, investigate conditioning even when a formal inverse exists. Solving a system directly with an appropriate factorization is generally preferable to explicitly forming an inverse merely to multiply it by b.
People also ask
Can a matrix with no zero entries be singular?
Yes. The worked matrix has all nonzero entries but dependent rows and columns.
Is the zero determinant the only way to recognize singularity?
No. Rank, elimination and a nontrivial null space provide equivalent mathematical evidence for square matrices.
Does a pseudoinverse always give an exact solution?
No. If b is outside the column space, it gives a least-squares solution under the usual Moore - Penrose interpretation, not an exact match.
Check your understanding
A singular matrix maps both u and v to the same output. What happens to u − v?
Answer: A(u − v) = Au − Av = 0. If u and v differ, their difference is a nonzero vector in the null space.
Related terms
- Condition number
- Pseudoinverse
- Regularization
- matrix rank
- null space
- linear dependence
Learn next
substitute three different t values into the worked solution family and verify that all outputs match. Then change the lower-right matrix entry from 4 to 4.0001 and compare solutions for nearby right-hand sides. This shows how removing exact singularity can still leave serious sensitivity.
More in Mathematics and optimization
- Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
- Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
- Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
- Σ-algebra
- Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
- Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.
Sources
Sources: MIT 18.06 Linear Algebra, official course summaries on invertibility, column space, null space and solutions, https://github.com/mitmath/1806 ; Semyon Dyatlov, MIT 18.03, Null Space, Column Space, Rank, Invertibility, https://math.mit.edu/~dyatlov/18.03/lectures/Section7-2.pdf . The two-by-two system, minimum-norm calculation and fictional regression case are original.
Previous: Singular extensions Next: Singular they