← LibraryConsistent and Inconsistent Systems | KEVOS® MathematicsProject Delivery · Project ManagementLesson 51/189← PrevNext →
ArticlePublished 8 Aug 202622 min readBy Kevin Jogin
Skip to content

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 n+1 a pivot column?
Only outcomes
No solution, one solution, infinitely many
Cost
One row reduction of [Ab]
Applies to
Any m×n 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 [Ab] of a system in n unknowns produces a matrix whose pivot positions encode the entire structure of the problem. If the final column — column n+1, the one holding the constants — contains a leading one, some row of the reduced system reads 0=1, 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 r for the number of non-zero rows, a consistent system with r=n has exactly one solution, while r<n leaves nr 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

CS

A 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 (A,b), not of the coefficient matrix A alone. The same A can give a consistent system for one right-hand side and an inconsistent system for another.

Reduced Row-Echelon Form Analysis

RREFA

Let B be an m×n matrix in reduced row-echelon form. Write r for the number of rows of B that are not zero rows. Each such row carries exactly one leading one; let di be the column index of the leading one in row i, so that d1<d2<<dr. Let f1<f2<<fnr be the column indices that carry no leading one. The sets D of pivot indices and F of non-pivot indices partition {1,2,,n}.

When B is the reduced form of the augmented matrix of a system in n unknowns, B has n+1 columns, so F has n+1r elements and the index n+1 belongs to exactly one of D or F.

Solution Set of a Linear System

SSLE

The set S of all vectors x that satisfy every equation of the system simultaneously. Consistency is the statement S; inconsistency is the statement S=.

Concepts

The number r 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 r. Because the reduced form of a matrix is unique, r 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 r against m and n and by locating the last leading one.

The consistency criterion and why it is an equivalence

Reduce the augmented matrix of a system in n unknowns to a matrix B in reduced row-echelon form with r non-zero rows. The system is inconsistent if and only if the leading one of row r sits in column n+1. One direction is immediate: such a row has n leading zeros followed by a one, which transcribes to the equation 0=1, 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 n+1, 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 xfi=0 for every non-pivot index and xdi=[B]i,n+1 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 n+1 columns, at most n+1 of them can be pivot columns, so rn+1 always. If r=n+1 then every column is a pivot column, including the last, and the system is inconsistent. For a consistent system this case is excluded and rn follows. Within consistency, r=n leaves no non-pivot variable columns and the solution is unique; r<n leaves nr 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, r=n+1 implies inconsistency, but inconsistency does not imply r=n+1: a system in 3 unknowns can reduce to a matrix with r=3 whose leading ones sit in columns 1, 3 and 4, which is inconsistent even though rn+1. Second, r<n 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 n>m — strictly more unknowns than equations — then it has infinitely many solutions. The reason is a counting argument: the reduced matrix has m rows, so rm, hence nrnm>0 and at least one variable is free. The practical force of this result is that it needs only m, n 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

Reduce [Ab]Row-reduce the full augmented matrix, constants column included, to reduced row-echelon form B.
Locate the last leading oneFind r, the number of non-zero rows, and the column index dr of the leading one in row r.
Is dr=n+1?If yes, a row reads 0=1: the system is inconsistent and S=. Stop.
Compare r with nThe system is consistent, so rn. Compute the deficit nr.
r=n: unique solutionNo free variables. Read the solution directly from the first n entries of column n+1.
r<n: infinite solution setThere are nr free variables. Describe the set parametrically rather than enumerating it.

Equations

Consistency as non-emptiness of the solution set

EQ-CIS-01
S={xnAx=b},consistentS

The 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-02
D={d1,d2,,dr},F={f1,f2,,fnr},DF=,DF={1,2,,n}

For an m×n 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-03
S=(n+1)D

The system in n 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-04
r=n+1S=

If every one of the n+1 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-05
xfi=0(1inr),xdi=[B]i,n+1(1ir)

For 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-06
|S|{0,1,}

A 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-07
Sandn>m|S|=

A counting consequence of rm: the number of free variables satisfies nrnm>0, so at least one degree of freedom survives.

Variable Definitions

Symbols used on this page
SymbolNameMeaningDomain / type
ACoefficient matrixThe m×n array of coefficients of the unknownsm x n matrix over C
bVector of constantsThe right-hand sides of the equations, collected as a column of size mvector in C^m
BReduced augmented matrixThe reduced row-echelon form of [Ab]m x (n+1) matrix
mEquation countNumber of equations, equal to the number of rowspositive integer
nUnknown countNumber of unknowns, equal to the number of variable columnspositive integer
rNon-zero row countNumber of non-zero rows of B, equivalently the number of leading ones0 to min(m, n+1)
DPivot index setColumn indices carrying a leading one, listed in increasing ordersubset of 1..n+1
FNon-pivot index setColumn indices with no leading one; the complement of Dsubset of 1..n+1
SSolution setAll vectors satisfying every equation of the systemsubset 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 4, 9 and 14 units. Decide whether the model is consistent with those demands, and diagnose the result.

  1. State the system and form the augmented matrix

    The balances are x1+2x2+x3=4, 2x1+4x2+3x3=9 and 3x1+6x2+4x3=14. Here m=3 and n=3, so the augmented matrix has four columns and the consistency test concerns column 4.

    [1214243936414]
  2. Clear the first pivot column

    Entry (1,1) is already a one. Apply R2R22R1 and R3R33R1.

    [121400110012]
  3. Continue to the next pivot

    Column 2 carries no available leading entry below row 1, so it is a non-pivot column. Column 3 supplies the second leading one at position (2,3). Apply R3R3R2 and R1R1R2.

    [120300110001]
  4. Complete the reduction

    Row 3 now carries a leading one in column 4. Clearing above it with R1R13R3 and R2R2R3 gives the reduced row-echelon form.

    B=[120000100001]
  5. Apply the consistency test

    Read off r=3 and D={1,3,4}. Since n=3, the augmented column is column n+1=4, and 4D. The system is inconsistent: row 3 transcribes to 0x1+0x2+0x3=1.

  6. Note which test fired

    Here r=3 while n+1=4, so rn+1 and the rank-counting criterion does not apply. Only the pivot-position test detects this failure. Concluding consistency from rn+1 alone would have been an error.

  7. 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 4+9=14. 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.

Result

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 13 makes the system consistent with r=2 and one degree of freedom.

Applications &amp; Industry Use

Water &amp; process networks

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.

Surveying &amp; geodesy

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.

Structural engineering

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.

Chemical engineering

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.

Computer vision &amp; photogrammetry

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 r<n before inversion prevents a solver from returning an arbitrary member of an infinite family as though it were the answer.

Power systems

State estimation observability

Linearised measurement equations relate meter readings to bus states. When the measurement set leaves nr>0 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 A 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 n>m 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 nr and the identity of the free variables in the model documentation.

Standards &amp; Codes

Notation, interchange and numerical standards that govern how this material is written down, stored and computed in production systems.

Applicable standards, conventions and reference implementations
ReferenceTitleRelevance to this topic
ISO 80000-2Quantities and units — Part 2: MathematicsFixes 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 S= is unambiguous across documents.
IEEE 754-2019IEEE Standard for Floating-Point ArithmeticDetermines 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-1Accuracy (trueness and precision) of measurement methods and resultsWhere 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 referenceLinear Algebra PACKage reference implementationRoutines 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 40314Mathematical Markup Language (MathML) Version 3.0Encodes the augmented arrays and set expressions on this page as semantic markup, keeping the vertical partition of [Ab] 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 and precision selection
RepresentationSelect whenTrade-off
Exact rational arithmeticSmall 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 binary64Engineering 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 testAny 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 sideStoichiometric, 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 arithmeticSafety-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 orderingLarge 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 23n3 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 Axb explicitly and compare it against the scale of b, 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 b that make the system consistent. For a rank-deficient A 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 &amp; Common Mistakes

Failure modes, root causes and prevention
Failure mode / mistakeImpactRoot causePrevention & detection
Reducing the coefficient matrix without the constantshighThe augmented column is dropped, so the information that detects a contradiction never enters the computation.Reduce [Ab] as a single array and inspect column n+1 before drawing any other conclusion.
Reading a zero row as a contradictionhighA row of all zeros, including the augmented entry, is mistaken for the row [001].Check the augmented entry of every zero coefficient row explicitly; only a non-zero constant there signals inconsistency.
Concluding consistency from rnhighTreating the rank-counting implication as an equivalence, when in fact only r=n+1 forces inconsistency, never the reverse.Base the verdict solely on whether column n+1 is a pivot column; use rank counts only for classifying an already-consistent system.
Applying the free-variable count to an inconsistent systemmediumComputing nr 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 nr is defined only when S.
Exact-zero test on floating-point datahighComparing a reduced entry against zero on data that has been rounded, so a structurally zero entry of size 1016 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 inconsistentmediumApplying 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 diagonalmediumGeneralising from square, full-rank examples where di=i, then looking in the wrong place for the final leading one.Record the pivot index set D explicitly during the reduction instead of inferring positions from row numbers.
Reporting one solution for an infinite familymediumPassing on the particular solution a solver returns without noting that nr>0 free variables exist.Always report r and nr 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 x and y are distinct solutions of Ax=b, then x+t(yx) is a solution for every scalar t, 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 A?

No, it is a property of the pair (A,b). Equivalently, the system is consistent precisely when b lies in the column space of A. A rank-deficient A 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 r 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 Axb against b scaled by the conditioning of A 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

  1. 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.
  2. ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
  3. IEEE 754-2019, IEEE Standard for Floating-Point Arithmetic. Institute of Electrical and Electronics Engineers.
  4. Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
  5. 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 A, derive the compatibility conditions on b that make Ax=b 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

Continue learning

Algebraic and Geometric Multiplicities of Eigenvalues | KEVOS® MathematicsArticle · Project ManagementAmitsur’s Theorem on the Radical of a Polynomial Ring | KEVOS®Article · Project ManagementAmitsur’s Theorem on the Radical of an Algebra of Small Dimension | KEVOS®Article · Project ManagementArchetypes: Reference Catalogue of Worked Systems | KEVOS® MathematicsArticle · Project Management