Engineering/Mathematics/Systems of Linear Equations
Consistent and Inconsistent Systems
A system of linear equations is consistent when at least one assignment of the unknowns satisfies every equation simultaneously. Deciding which case you are in requires no cleverness at all — a single entry of the reduced augmented matrix settles it.
- Core level
- Stream: linear-systems
- Reading time 14 min
- Ref KVS-ENG-MATH-0010
- Taxonomy
- Engineering / Mathematics
- Prerequisite
- Reduced row-echelon form
- Decisive test
- Is column a pivot column?
- Only outcomes
- No solution, one solution, infinitely many
- Cost
- One row reduction of
- Applies to
- Any system over or
Overview
Before any question about which vectors solve a linear system can be answered, a prior question must be settled: does any vector solve it at all? A system that admits at least one solution is called consistent; one that admits none is inconsistent. The distinction is not a matter of degree. An inconsistent system is not nearly solvable or approximately solvable — its solution set is the empty set, and every downstream quantity that depends on a solution is undefined.
The value of reduced row-echelon form is that it converts this question into an inspection. Reducing the augmented matrix of a system in unknowns produces a matrix whose pivot positions encode the entire structure of the problem. If the final column — column , the one holding the constants — contains a leading one, some row of the reduced system reads , and the system is inconsistent. If it does not, a solution can be written down immediately. There is no intermediate case and no judgement call.
Once consistency is established, the same reduced matrix classifies the solution set. Writing for the number of non-zero rows, a consistent system with has exactly one solution, while leaves unknowns free to take any value, producing an infinite family. Combined with the inconsistent case this yields one of the foundational structural results of the subject: a linear system has no solutions, precisely one solution, or infinitely many. Two solutions is impossible; seventeen is impossible.
For an engineer this trichotomy is a modelling diagnostic rather than a curiosity. An inconsistent system usually signals over-specification — incompatible constraints, a measurement inconsistency, or a conservation law violated by the input data. An infinite solution set usually signals under-determination — redundant equations, an unconstrained degree of freedom, or a statically indeterminate structure. Reading which case has arisen, and why, is often more informative than the numbers in the solution itself.
Definition
Consistent System
CSA system of linear equations is consistent when its solution set contains at least one element — that is, when some assignment of values to the unknowns satisfies every equation of the system at once. A system whose solution set is empty is inconsistent.
Consistency is a property of the pair , not of the coefficient matrix alone. The same can give a consistent system for one right-hand side and an inconsistent system for another.
Reduced Row-Echelon Form Analysis
RREFALet be an matrix in reduced row-echelon form. Write for the number of rows of that are not zero rows. Each such row carries exactly one leading one; let be the column index of the leading one in row , so that . Let be the column indices that carry no leading one. The sets of pivot indices and of non-pivot indices partition .
When is the reduced form of the augmented matrix of a system in unknowns, has columns, so has elements and the index belongs to exactly one of or .
Solution Set of a Linear System
SSLEThe set of all vectors that satisfy every equation of the system simultaneously. Consistency is the statement ; inconsistency is the statement .
Concepts
The number carries most of the information
For a matrix in reduced row-echelon form, three counts coincide: the number of non-zero rows, the number of leading ones, and the number of pivot columns. That common value is . Because the reduced form of a matrix is unique, is a well-defined invariant of the original matrix and not an artefact of the reduction path chosen. Almost every structural question about a linear system — solvable or not, uniquely or not, with how many degrees of freedom — is answered by comparing against and and by locating the last leading one.
The consistency criterion and why it is an equivalence
Reduce the augmented matrix of a system in unknowns to a matrix in reduced row-echelon form with non-zero rows. The system is inconsistent if and only if the leading one of row sits in column . One direction is immediate: such a row has leading zeros followed by a one, which transcribes to the equation , false for every assignment of the unknowns, so no solution exists. The converse is cleaner in contrapositive form — if the last leading one is not in column , then by the staircase layout no leading one is, and a solution can be constructed explicitly by setting every non-pivot variable to zero and reading each dependent variable off the final column. Producing one solution establishes consistency.
A constructive proof yields a free particular solution
The converse argument above is worth noting for its by-product rather than its logic. Setting for every non-pivot index and for every pivot index produces a valid solution with no extra arithmetic whatsoever — the values are already sitting in the final column of the reduced matrix. This is exactly the single solution that numerical libraries return when asked to solve an under-determined but consistent system, and knowing its origin explains why such a library reports one answer where infinitely many exist.
Rank against variable count: the three cases
Since the reduced augmented matrix has columns, at most of them can be pivot columns, so always. If then every column is a pivot column, including the last, and the system is inconsistent. For a consistent system this case is excluded and follows. Within consistency, leaves no non-pivot variable columns and the solution is unique; leaves non-pivot variable columns whose values may be chosen arbitrarily, each choice determining the remaining unknowns exactly once. Infinitely many choices therefore give infinitely many solutions.
The converse traps
Two tempting converses are false and both are worth naming. First, implies inconsistency, but inconsistency does not imply : a system in unknowns can reduce to a matrix with whose leading ones sit in columns , and , which is inconsistent even though . Second, does not imply consistency; the deficiency in rank may be accompanied by a pivot in the final column. Only the pivot-position test is decisive in both directions; the counting tests are one-way implications.
More unknowns than equations forces an infinite family
If a system is known to be consistent and has — strictly more unknowns than equations — then it has infinitely many solutions. The reason is a counting argument: the reduced matrix has rows, so , hence and at least one variable is free. The practical force of this result is that it needs only , and a single exhibited solution. No row reduction is required, so a solution obtained by any means — measurement, guesswork, a physical argument — immediately certifies that the system is under-determined.
Decision path: classifying a linear system
Equations
Consistency as non-emptiness of the solution set
EQ-CIS-01The definition in set language. Everything else on this page is a mechanical way of deciding which side of this dichotomy a given system falls on.
Pivot and non-pivot index sets
EQ-CIS-02For an matrix in reduced row-echelon form, the column indices split into those carrying a leading one and those that do not. The two sets partition the columns.
The augmented-column test
EQ-CIS-03The system in unknowns is inconsistent exactly when the final column of the reduced augmented matrix is a pivot column. A single entry decides the question.
Full rank in the augmented matrix forces inconsistency
EQ-CIS-04If every one of the columns is a pivot column then the last one is, so the system is inconsistent. The implication does not reverse.
Particular solution from the reduced form
EQ-CIS-05For any consistent system this assignment satisfies every equation. It requires no arithmetic beyond reading the last column, and is the solution most software returns for an under-determined system.
The three possible solution sets
EQ-CIS-06A linear system has no solution, exactly one solution, or infinitely many. No finite cardinality above one can occur, because scaling the difference of two distinct solutions generates a continuum.
Consistent with more unknowns than equations
EQ-CIS-07A counting consequence of : the number of free variables satisfies , so at least one degree of freedom survives.
Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| Coefficient matrix | The array of coefficients of the unknowns | m x n matrix over C | |
| Vector of constants | The right-hand sides of the equations, collected as a column of size | vector in C^m | |
| Reduced augmented matrix | The reduced row-echelon form of | m x (n+1) matrix | |
| Equation count | Number of equations, equal to the number of rows | positive integer | |
| Unknown count | Number of unknowns, equal to the number of variable columns | positive integer | |
| Non-zero row count | Number of non-zero rows of , equivalently the number of leading ones | 0 to min(m, n+1) | |
| Pivot index set | Column indices carrying a leading one, listed in increasing order | subset of 1..n+1 | |
| Non-pivot index set | Column indices with no leading one; the complement of | subset of 1..n+1 | |
| Solution set | All vectors satisfying every equation of the system | subset of C^n |
Worked Numerical Example
Problem statement
A pipe network is modelled by three flow-balance equations in three unknown branch flows. The measured demands are , and units. Decide whether the model is consistent with those demands, and diagnose the result.
State the system and form the augmented matrix
The balances are , and . Here and , so the augmented matrix has four columns and the consistency test concerns column .
Clear the first pivot column
Entry is already a one. Apply and .
Continue to the next pivot
Column carries no available leading entry below row , so it is a non-pivot column. Column supplies the second leading one at position . Apply and .
Complete the reduction
Row now carries a leading one in column . Clearing above it with and gives the reduced row-echelon form.
Apply the consistency test
Read off and . Since , the augmented column is column , and . The system is inconsistent: row transcribes to .
Note which test fired
Here while , so and the rank-counting criterion does not apply. Only the pivot-position test detects this failure. Concluding consistency from alone would have been an error.
Diagnose the source
Subtracting the first two balances from the third shows that the third equation's left-hand side equals the sum of the first two, so the demands must satisfy . They do not; the recorded total is one unit too large. The contradiction is a data-consistency violation, not a modelling error in the network topology.
The measured demands cannot be reproduced by any set of branch flows: the solution set is empty. Because the left-hand sides satisfy an exact linear dependence that the right-hand sides violate by one unit, the correct engineering response is to audit the metering rather than to refine the solver. Adjusting the third demand to makes the system consistent with and one degree of freedom.
Applications & Industry Use
Detecting metering errors before simulation
Node balances in a pipe or duct network form a linear system whose left-hand sides obey exact conservation identities. If measured demands violate one of those identities the augmented matrix acquires a pivot in its final column. Running the consistency test before a hydraulic solve isolates instrumentation faults that would otherwise surface as a non-converging iteration.
Closure checks on a levelling network
Height differences around a closed loop must sum to zero. Treating the loop equations as a linear system in the unknown station heights, an inconsistency is precisely a non-zero misclosure. The pivot test identifies which loops fail, and the magnitude of the offending constant quantifies the error to be distributed by adjustment.
Recognising a mechanism or an over-constrained joint
Nodal equilibrium for a pin-jointed frame gives a system in the member forces. A consistent system with free variables indicates static indeterminacy; an inconsistent one under a given load indicates that equilibrium cannot be satisfied by axial forces alone, which usually means a mechanism has been modelled or a restraint has been omitted.
Feasibility of a specified blend
Meeting several composition targets from a fixed set of feed streams is a linear system in the stream flow rates. Inconsistency proves that the specification is unattainable with the available feeds — a conclusion reached in one row reduction, without optimisation and without iteration.
Degenerate configurations in calibration
Fitting a camera model produces a system whose consistency depends on the geometry of the observed points. Exactly degenerate configurations yield systems that are consistent but rank-deficient, so the fit is not unique. Detecting before inversion prevents a solver from returning an arbitrary member of an infinite family as though it were the answer.
State estimation observability
Linearised measurement equations relate meter readings to bus states. When the measurement set leaves degrees of freedom the network is unobservable, and no amount of numerical effort recovers the missing states. The rank test identifies exactly which additional measurements would remove the deficiency.
Design Considerations
Always carry the constants column
Reducing alone answers questions about rank but destroys the information needed for consistency. Since the extra column adds negligible cost, there is no reason to reduce the coefficient matrix in isolation when the right-hand side is known.
Distinguish the two failure signatures
A row of the reduced matrix that is entirely zero, augmented entry included, is a redundant equation and is harmless. A row that is zero across the coefficient columns but non-zero in the final column is a contradiction. Confusing the two is the most common misreading of a reduced augmented matrix, and the consequences are opposite: harmless redundancy versus a fatal inconsistency.
Consistency is not conditioning
A system can be exactly consistent and still be numerically hopeless, and a system can be marginally inconsistent because of rounding in the input data rather than any genuine contradiction. The algebraic test answers a yes-or-no question about exact arithmetic; it says nothing about sensitivity. Report a condition number alongside any consistency conclusion drawn from measured data.
Prefer least squares when inconsistency is expected
Over-determined systems built from redundant measurements are almost always inconsistent, because noise guarantees it. Testing such a system for consistency and reporting failure is technically correct but practically useless. The appropriate instrument is a least-squares solution, which minimises the residual instead of demanding that it vanish.
Use the counting shortcut only in the correct direction
Knowing that a system is consistent with is enough to conclude infinitely many solutions without any reduction. The reverse inference is invalid: a system with more unknowns than equations can be inconsistent, and no counting argument detects it.
Decide in advance what an infinite solution set means
In a design context an infinite solution set is an opportunity, not a defect — the free variables are the design freedoms available for a secondary objective. Fixing them arbitrarily to obtain a single answer discards that information. Record and the identity of the free variables in the model documentation.
Standards & Codes
Notation, interchange and numerical standards that govern how this material is written down, stored and computed in production systems.
| Reference | Title | Relevance to this topic |
|---|---|---|
ISO 80000-2 | Quantities and units — Part 2: Mathematics | Fixes the set-theoretic notation used for the solution set and the empty set, and the conventions for italic variables against upright operators, so that a statement such as is unambiguous across documents. |
IEEE 754-2019 | IEEE Standard for Floating-Point Arithmetic | Determines when an entry of the reduced augmented matrix counts as zero. Because consistency hinges on a single entry being non-zero, the standard's rounding rules directly govern the reliability of the test in floating-point arithmetic. |
ISO 5725-1 | Accuracy (trueness and precision) of measurement methods and results | Where the constants vector comes from measurement, this standard frames the uncertainty that makes exact inconsistency the expected outcome and motivates a residual-based rather than binary treatment. |
LAPACK / BLAS reference | Linear Algebra PACKage reference implementation | Routines such as xGELSD return a minimum-norm least-squares solution rather than reporting inconsistency, so library output must be interpreted with the residual in hand, not taken as evidence that a solution exists. |
ISO/IEC 40314 | Mathematical Markup Language (MathML) Version 3.0 | Encodes the augmented arrays and set expressions on this page as semantic markup, keeping the vertical partition of machine-readable rather than a visual artefact. |
Material Selection
For a mathematical topic, "material" is the numeric representation: the scalar field, storage format and precision the computation is built from.
| Representation | Select when | Trade-off |
|---|---|---|
| Exact rational arithmetic | Small symbolic or integer systems where the consistency verdict must be certain, such as verifying a conservation identity in a model. | Gives a defensible yes-or-no answer with no threshold, but coefficient growth makes it impractical beyond modest sizes. |
| IEEE 754 binary64 | Engineering systems assembled from measured or computed data at typical scale. | Fast and adequate for the solution itself, but an exactly zero augmented entry almost never arises, so the binary test must be replaced by a residual norm comparison. |
| Residual-norm test in place of a pivot test | Any floating-point setting with noisy right-hand sides. | Replaces an ill-posed binary decision with a continuous, reportable quantity, at the cost of requiring an explicit tolerance that must be justified. |
| Integer arithmetic with a scaled right-hand side | Stoichiometric, combinatorial or accounting systems whose data is exactly integral. | Removes rounding entirely and makes the test exact, but requires the whole model to be expressible without fractions. |
| Interval arithmetic | Safety-critical checks where a consistency claim must hold for every value within stated data bounds. | Delivers a rigorous enclosure and can certify inconsistency, but intervals widen rapidly during elimination and often yield an inconclusive verdict. |
| Sparse storage with a fill-reducing ordering | Large network models where the coefficient matrix is overwhelmingly zero. | Keeps memory tractable, but full reduction to echelon form causes fill-in; consistency is better assessed from a sparse factorisation's residual than from an explicit reduced form. |
Manufacturing Notes
Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.
Cost of the test
Deciding consistency requires no more work than solving. A single forward elimination of the augmented matrix, roughly operations for a square system, exposes the final pivot position. Because the test is a by-product of the reduction that would be performed anyway, it should be regarded as free.
Hand procedure and early exit
When the only question is consistency, forward elimination suffices; the back-clearing phase that produces the fully reduced form is unnecessary. Watch for a row whose coefficient entries all vanish and inspect its augmented entry immediately. A contradictory row can appear well before the reduction is complete, and the computation can be abandoned at that point.
Library behaviour and silent success
Most solvers do not report inconsistency. numpy.linalg.solve raises an error only for an exactly singular square matrix; numpy.linalg.lstsq and scipy.linalg.lstsq always return a vector. The correct discipline is to compute explicitly and compare it against the scale of , rather than to trust that a returned vector solves anything.
Verification against the original equations
Substitute any claimed solution into the original, unreduced system. An arithmetic slip during elimination produces a reduced matrix that is internally coherent but no longer row-equivalent to the input, so verification against the reduced form proves nothing. This check also catches the reverse error of declaring inconsistency that was manufactured by the reduction itself.
Symbolic right-hand sides
Carrying the constants symbolically through the reduction yields the compatibility conditions on that make the system consistent. For a rank-deficient these conditions are exactly the linear functionals annihilating the column space, and computing them once is far more useful than testing individual right-hand sides one at a time.
Failure Modes & Common Mistakes
| Failure mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Reducing the coefficient matrix without the constants | high | The augmented column is dropped, so the information that detects a contradiction never enters the computation. | Reduce as a single array and inspect column before drawing any other conclusion. |
| Reading a zero row as a contradiction | high | A row of all zeros, including the augmented entry, is mistaken for the row . | Check the augmented entry of every zero coefficient row explicitly; only a non-zero constant there signals inconsistency. |
| Concluding consistency from | high | Treating the rank-counting implication as an equivalence, when in fact only forces inconsistency, never the reverse. | Base the verdict solely on whether column is a pivot column; use rank counts only for classifying an already-consistent system. |
| Applying the free-variable count to an inconsistent system | medium | Computing before checking consistency, producing a meaningless degree-of-freedom count for an empty solution set. | Order the tests: consistency first, degrees of freedom second. The count is defined only when . |
| Exact-zero test on floating-point data | high | Comparing a reduced entry against zero on data that has been rounded, so a structurally zero entry of size is treated as a pivot. | Use a tolerance scaled to the matrix norm, or replace the binary test with a residual-norm comparison. |
| Declaring a noisy over-determined system inconsistent | medium | Applying an exact test to redundant measurements, where noise guarantees a non-zero residual regardless of model validity. | Switch to least squares and assess the residual magnitude against measurement uncertainty rather than against zero. |
| Assuming the pivots occupy the leading diagonal | medium | Generalising from square, full-rank examples where , then looking in the wrong place for the final leading one. | Record the pivot index set explicitly during the reduction instead of inferring positions from row numbers. |
| Reporting one solution for an infinite family | medium | Passing on the particular solution a solver returns without noting that free variables exist. | Always report and alongside any solution vector, and describe the solution set parametrically when it is infinite. |
FAQs
Can a linear system have exactly two solutions?
No. If and are distinct solutions of , then is a solution for every scalar , giving a continuum. The only possibilities are zero, one and infinitely many solutions, which is why the classification has exactly three cases.
Does an inconsistent system mean the model is wrong?
Not necessarily. It means the constraints as written cannot all hold simultaneously. That may reflect a genuine modelling error, but it far more often reflects measurement noise in the right-hand side or an over-specified requirement. Diagnosing which requires examining the linear dependence among the equations that the constants fail to respect.
Is consistency a property of the matrix ?
No, it is a property of the pair . Equivalently, the system is consistent precisely when lies in the column space of . A rank-deficient gives a consistent system for some right-hand sides and an inconsistent one for others.
Why does the test look only at the last row rather than every row?
Because of the staircase structure of reduced row-echelon form. Leading ones move strictly rightwards as you move down, so if any row has its leading one in the final column, the last non-zero row does too. Checking row therefore checks all of them at once.
If a system has more equations than unknowns, is it inconsistent?
Not automatically. Extra equations may be redundant — exact linear combinations of the others — in which case the system remains consistent and the redundant rows reduce to zero rows. Over-determination makes inconsistency likely with noisy data, but it never guarantees it.
How do I test consistency reliably in floating-point arithmetic?
Do not test the reduced entry against zero. Solve in the least-squares sense and compare the residual against scaled by the conditioning of and the machine epsilon. A residual at that scale is consistent with an exactly solvable system perturbed by rounding.
What does the free particular solution correspond to physically?
It is the solution obtained by switching off every free degree of freedom. In a statically indeterminate structure it is one equilibrium force state among many; in a flow network it is one feasible circulation. It is a valid answer but carries no claim of optimality or physical preference.
References
- Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section TSS, subsection CS. Licensed under the GNU Free Documentation License v1.2.
- ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
- IEEE 754-2019, IEEE Standard for Floating-Point Arithmetic. Institute of Electrical and Electronics Engineers.
- Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
- Anderson, E. et al. LAPACK Users' Guide, 3rd edition. Society for Industrial and Applied Mathematics, 1999.
AI Suggested Questions
- Construct a system in four unknowns that is inconsistent even though its reduced augmented matrix has only three non-zero rows.
- Given a rank-deficient matrix , derive the compatibility conditions on that make consistent.
- How should a residual tolerance for a consistency test be scaled with the condition number of the coefficient matrix?
- Show why the existence of two distinct solutions to a linear system forces the solution set to be infinite, and explain where linearity is used.
- Compare the diagnostic value of a consistency test against a least-squares residual for a surveying network with redundant observations.
- What changes about the consistency test if the arithmetic is performed over a finite field instead of the complex numbers?
Related Calculators
Solve and report consistency, rank, degrees of freedom and the parametric solution set.
System Consistency CheckerReduce an augmented matrix and report whether column is a pivot column, with the offending row highlighted.
Matrix Rank & Nullity CalculatorCompute , the pivot index set and the free index set with a selectable numerical tolerance.
