Engineering/Mathematics/Systems of Linear Equations
Independent and Dependent Variables
Every unknown in a consistent linear system is either pinned down by a pivot column or left free to take any value whatsoever. That single partition determines how many degrees of freedom the solution set has and gives an exact, finite description of an infinite family of solutions.
- Core level
- Stream: linear-systems
- Reading time 15 min
- Ref KVS-ENG-MATH-0011
- Taxonomy
- Engineering / Mathematics
- Prerequisite
- Reduced row-echelon form; system consistency
- Rule
- Pivot column → dependent; non-pivot column → free
- Degrees of freedom
- for a consistent system
- Unique solution iff
- with the system consistent
- Shortcut
- Consistent with → infinitely many solutions
Overview
A consistent linear system with fewer independent equations than unknowns has infinitely many solutions, which is an uncomfortable object to hand to an engineer. The remedy is not to enumerate the solutions but to parametrise them. Reduced row-echelon form supplies the parametrisation automatically: it sorts the unknowns into two groups, one of which may be assigned arbitrary values and the other of which is then determined uniquely.
The sorting rule is purely positional. Reduce the augmented matrix; a variable whose column carries a leading one is dependent, and every other variable is independent or free. Because a leading one is the only non-zero entry in its column, the row containing it already expresses its dependent variable explicitly in terms of the free variables. No back-substitution and no rearrangement are required — the reduced matrix is a solved system, written down.
Counting makes the structure quantitative. Writing for the number of non-zero rows and for the number of unknowns, a consistent system has exactly free variables. When the solution is unique; when the solution set is an -parameter family. This is also the sense in which the notion is robust: because reduced row-echelon form is unique, which variables are free is not a matter of taste or of elimination order but a property of the system itself.
The engineering reading of is degrees of freedom, and it is usually the most valuable number the analysis produces. In a redundantly actuated mechanism it is the size of the null-space motion available for secondary objectives; in a statically indeterminate structure it is the number of independent self-stress states; in a reaction network it is the number of independent reactions. The free variables are not a nuisance to be eliminated but the design latitude the model has revealed.
Definition
Independent and Dependent Variables
IDVLet be the augmented matrix of a system of linear equations in unknowns and let be a row-equivalent matrix in reduced row-echelon form. Suppose column of contains the leading one of some row and that , so column is a pivot column other than the constants column. Then the variable is dependent. Any variable that is not dependent is independent, also called free.
The clause excluding the final column matters. A leading one in column makes the system inconsistent, and in that case the language of dependent and free variables has no content because there is no solution set to parametrise.
Free Variable Count
FVCSFor a consistent system of equations in unknowns whose augmented matrix reduces to a form with non-zero rows, the solution set can be described using exactly free variables. Equivalently, the pivot index set has elements, of which none is , so precisely of the variable columns carry no leading one.
Parametric Description of a Solution Set
PDSSAn expression of the solution set in which each free variable ranges over the whole scalar field and each dependent variable is written as a fixed affine function of the free variables. Such a description is finite, exact and complete: every solution arises from exactly one assignment of the free variables, and every assignment yields a solution.
Concepts
Why the pivot column decides
Consider row of the reduced matrix, whose leading one lies in column . Because a leading one is the only non-zero entry of its column, no other row constrains , and row itself constrains it exactly once. The equation that row transcribes is therefore already solved for : its value is the constant entry minus a linear combination of the variables in non-pivot columns. A variable in a non-pivot column appears in no row as a leading term, so nothing forces its value; it may be chosen freely. The partition is thus not a convention but a direct consequence of the shape of reduced row-echelon form.
The solved form written once and for all
With the pivot indices and the non-pivot variable indices, row gives . Every solution of the system has this form and every choice of the produces one. Note that the constants column contributes the particular part and the non-pivot columns contribute the homogeneous part — a decomposition that reappears later as the statement that a solution set is a translate of a null space.
Consistency, rank and the count of solutions
For a consistent system with unknowns, necessarily: the reduced augmented matrix has columns, so , and would place a leading one in the final column, contradicting consistency. Two cases remain. If every variable column is a pivot column, there are no free variables, and the first entries of the constants column are the unique solution. If then variables are free, and since each may take any of infinitely many values, the solution set is infinite.
Degrees of freedom are an invariant, not a choice
Reduced row-echelon form is unique, so the pivot index set is determined by the original matrix alone. Consequently which variables are dependent and which are free is fixed by the system, not by the order in which rows were eliminated. This is what allows to be quoted as the number of degrees of freedom. What is not canonical is the choice of which variables one might prefer to treat as parameters in a hand-rolled parametrisation; the reduced form simply supplies a distinguished, reproducible choice.
The counting shortcut for wide systems
A consistent system with strictly more unknowns than equations has infinitely many solutions. The proof is a two-line count: the reduced matrix has rows so , and therefore . The practical value is that it uses only , and the knowledge that some solution exists. A single solution obtained from measurement, from physical reasoning or from a solver certifies consistency, after which the conclusion follows without any reduction at all.
What the free variables mean in a model
A free variable is a quantity the constraints do not determine. In a well-posed design problem that is information, not error: it identifies where the model leaves latitude that a secondary criterion — minimum energy, minimum norm, manufacturability — can be used to resolve. In an ill-posed identification problem it is a warning: a parameter the data cannot distinguish, so any reported value for it is an artefact of the solver. Distinguishing these two readings is a modelling judgement that the algebra cannot make for you.
Procedure: partitioning the unknowns and describing the solution set
Equations
Partition of the variable indices
EQ-IDV-01The partition rule is purely positional. Writing for the pivot indices that reference a variable and for its complement, the dependent variables are indexed by and the free variables by .
Solved form of a pivot row
EQ-IDV-02Each non-zero row of the reduced augmented matrix expresses one dependent variable as an affine function of the free variables. The constant term is a particular solution; the sum is the homogeneous part.
Number of free variables
EQ-IDV-03For a consistent system in unknowns whose reduced augmented matrix has non-zero rows, exactly variables are free. This is the number of degrees of freedom of the solution set.
Consistent systems, rank and uniqueness
EQ-IDV-04The complete classification for a consistent system. Rank equal to the number of unknowns is exactly the condition for a unique solution.
Wide consistent systems have infinitely many solutions
EQ-IDV-05Since the reduced matrix has only rows, . More unknowns than equations therefore guarantees at least one free variable, provided a solution exists at all.
Parametric solution set
EQ-IDV-06A finite, exact description of a possibly infinite set. Every solution corresponds to exactly one assignment of the free variables.
Particular solution from switching off the free variables
EQ-IDV-07Setting every free variable to zero recovers the constants column directly. This is the distinguished representative most software returns for an under-determined system.
Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| Reduced augmented matrix | Reduced row-echelon form of | m x (n+1) matrix | |
| Unknown count | Number of variables in the system | positive integer | |
| Equation count | Number of equations, equal to the row count | positive integer | |
| Rank | Number of non-zero rows of , equal to the number of leading ones | 0 to min(m, n+1) | |
| Pivot column index | Column of the leading one in row ; indexes a dependent variable when | 1 to n+1 | |
| Non-pivot column index | Column carrying no leading one; indexes a free variable when | 1 to n+1 | |
| Degrees of freedom | Number of free variables in a consistent system | non-negative integer | |
| Solution set | All vectors satisfying the system | subset of C^n | |
| Vector of constants | Right-hand sides of the equations | vector in C^m |
Worked Numerical Example
Problem statement
A planar manipulator has five actuated joint rates and three task-space velocity constraints. Determine which joint rates are determined by the task, which are free, and describe the complete set of admissible joint-rate vectors.
Assemble the constraint system
The three constraints are , and . Here and , so the augmented matrix is .
Anticipate the outcome
Before reducing, note that . If the system turns out to be consistent, it must have infinitely many solutions — at least free variables. This is a check on the answer, not a substitute for the computation.
Eliminate in the first pivot column
Entry is a one. Apply and .
Complete the reduction
Column has no available leading entry below row , so it is a non-pivot column. Column supplies the second leading one. Apply ; nothing needs clearing above, since entry is already zero.
Check consistency, then partition the variables
Here and . Since , the system is consistent. Columns and are pivot columns, so and are dependent. Columns , and carry no leading one, so , and are free. The count agrees: .
Read the solved equations
Row is and row is . Each already isolates its dependent variable:
Write the solution set
Collecting the components in order gives an exact description of the whole three-parameter family.
Verify two members
Setting gives , and the three constraints evaluate to , and as required. Setting , , gives and , and substitution again returns , and . Both checks are performed against the original equations, not the reduced ones.
The task determines only two of the five joint rates; three degrees of freedom remain. In manipulator terms the mechanism is kinematically redundant to order three, and that redundancy is available for secondary objectives such as joint-limit avoidance or minimum-norm motion. Reporting the solution as a single vector would discard exactly the information a redundancy-resolution scheme needs.
Applications & Industry Use
Redundancy resolution in manipulator control
For a redundant arm the instantaneous inverse-kinematics problem is an under-determined linear system in the joint rates. The free variables span the self-motion of the mechanism — joint motions that leave the end effector stationary. Identifying them explicitly is the precondition for any secondary-task projection scheme.
Self-stress states in indeterminate frames
Equilibrium equations for a redundant truss are consistent but rank-deficient in the member forces. The free variables index independent self-stress states: internal force distributions in equilibrium with zero external load. Their number is the degree of static indeterminacy and dictates how many compatibility conditions must be added.
Independent reactions in a reaction network
Atom balances over a set of candidate reactions form a homogeneous system in the stoichiometric coefficients. The free variables correspond to an independent reaction set, and their count tells a process engineer how many reaction extents must be measured or specified to close the model.
Circulations in a flow network
Conservation at each node leaves the flows determined only up to circulations around independent cycles. The free variables are exactly one flow per independent cycle, so their number equals the cyclomatic number of the network and quantifies the routing latitude available to a scheduler.
Non-estimable parameters
In an over-parametrised linear model the normal equations are consistent but rank-deficient. Free variables identify parameter combinations the data cannot distinguish. Reporting individual coefficient values in this situation is meaningless; only functions of the dependent combinations are estimable.
Under-constrained geometric fits
Fitting a plane, conic or transform to fewer constraints than parameters yields a family of solutions. Enumerating the free variables shows which geometric attributes the data pins down and which must be supplied by a regularisation term or an additional observation.
Design Considerations
Test consistency before partitioning
The dependent-free distinction presupposes a non-empty solution set. Applying the count to an inconsistent system produces a number that describes nothing. Order the analysis so that the augmented-column pivot test always runs first.
Report the free variables, not just their count
Two systems with the same can leave entirely different quantities undetermined. Downstream consumers of a model need to know which variables are free, because that is what determines whether the residual freedom is useful design latitude or an identifiability failure.
Do not confuse free with arbitrary in a physical sense
Mathematically a free variable ranges over the entire scalar field. Physically it is usually bounded by actuator limits, non-negativity or material capacity. The parametric solution set describes the affine family; intersecting it with the physical feasible region is a separate step and may leave nothing at all.
Prefer the canonical partition for reproducibility
Any set of variables that indexes a non-singular submatrix could serve as parameters, and hand-picked choices are sometimes more natural physically. The pivot-based partition has the advantage of being unique and reproducible, which matters when two teams must compare results. If a different parametrisation is used, document it.
Rank is a fragile quantity in floating point
The number of free variables is determined by , and is discontinuous in the matrix entries. A nearly dependent pair of equations can be counted as independent or not depending on rounding, changing the reported degrees of freedom. Where the entries come from measurement, determine rank from a singular value decomposition with a stated tolerance rather than from a pivot count.
Use the minimum-norm solution deliberately, not by default
Least-squares routines silently select one member of an infinite family, usually the one of smallest norm. That choice is defensible, but it is a choice. If the free variables carry engineering meaning, resolve them against an explicit criterion rather than accepting a library default.
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 | Prescribes the set-builder and indexing notation used to write a parametric solution set, including the conventions for subscripted indices such as and . |
ISO 8373 | Robotics — Vocabulary | Defines degrees of freedom, redundancy and mobility for manipulators, aligning the algebraic quantity with the terminology used in robotic system specifications. |
IEEE 754-2019 | IEEE Standard for Floating-Point Arithmetic | Governs the rounding that makes the pivot count, and hence the reported number of free variables, sensitive to perturbation in computed matrices. |
LAPACK / BLAS reference | Linear Algebra PACKage reference implementation | Rank-revealing routines such as xGELSY and xGELSD return a minimum-norm solution and an estimated numerical rank, which is the production analogue of counting free variables by hand. |
ISO/IEC 40314 | Mathematical Markup Language (MathML) Version 3.0 | Encodes the set-builder expressions and stacked column vectors on this page so that the parametric description remains machine-readable and accessible. |
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 | Symbolic models where the parametric solution set is the deliverable and coefficients are small integers or ratios. | Yields an exact, auditable parametrisation with an unambiguous free-variable set, but intermediate coefficients can grow rapidly. |
| IEEE 754 binary64 with an SVD rank test | Measured or computed matrices at engineering scale where the degrees of freedom must be robust to noise. | Gives a defensible rank with an explicit tolerance, at roughly an order of magnitude more arithmetic than elimination. |
| Pivoted QR factorisation | Selecting a well-conditioned set of dependent variables rather than the leftmost one. | Chooses a numerically sensible partition and is far cheaper than an SVD, but the resulting free-variable set is not the canonical one and must be reported explicitly. |
| Symbolic parameters for the free variables | Design studies where the effect of each degree of freedom must be traced analytically. | Preserves interpretability and supports sensitivity analysis, but expressions grow quickly with . |
| Fixed-point arithmetic | Embedded controllers evaluating a precomputed parametric solution on-line. | Cheap and deterministic for evaluating an already-derived parametrisation, but wholly unsuitable for determining rank in the first place. |
| Sparse elimination with a fill-reducing ordering | Large network or finite-element systems where the free variables correspond to cycles or mechanisms. | Keeps the factorisation tractable, but the pivot order is chosen for sparsity, so the resulting dependent-free split is not the canonical one. |
Manufacturing Notes
Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.
The reduced form is already the answer
Once the augmented matrix is fully reduced, writing the parametric solution requires only transcription: move the non-pivot terms of each pivot row to the right-hand side and change their signs. The characteristic cost of the method is therefore the reduction itself, about operations for a square system, with the parametrisation effectively free.
Hand procedure and index bookkeeping
Record the pivot column index as each leading one is created, rather than reconstructing at the end. Then list the variable indices not in in increasing order to obtain the free variables. This ordering discipline is what prevents the classic slip of pairing row with variable in a rank-deficient system.
Extracting a basis for the direction space
Setting one free variable to and the rest to , then reading the resulting dependent values, produces one vector per degree of freedom. The vectors obtained this way are linearly independent by construction, because each carries a in a coordinate where all the others carry , and together they span the homogeneous part of the solution set.
Library behaviour
SymPy's linsolve returns a parametric solution with symbols for the free variables, which mirrors the hand method directly. NumPy and SciPy instead return a single minimum-norm vector from lstsq plus an estimated rank; recovering the free directions there requires the null space, obtained from the trailing right singular vectors of the SVD.
Verification strategy
Check the parametrisation, not just one solution. Substitute the general expression into the original equations symbolically and confirm that every free variable cancels identically; a residual term in a free variable indicates an arithmetic error in the corresponding column. Then confirm that the count of independent direction vectors equals .
Failure Modes & Common Mistakes
| Failure mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Pairing variable with row | high | Assuming pivots lie on the leading diagonal, which holds only for square full-rank systems. | Track the pivot index set explicitly during reduction and label dependent variables by column index, never by row number. |
| Counting free variables as the number of zero rows | high | Confusing the row deficiency with the column deficiency ; they coincide only when . | Always compute from the number of unknowns, and treat zero rows as evidence of redundant equations only. |
| Partitioning an inconsistent system | high | Skipping the augmented-column test and applying the dependent-free rule to a system with no solutions. | Confirm before any variable is labelled. The free-variable theorem has consistency as an explicit hypothesis. |
| Treating the constants column as a variable column | medium | Including index when listing non-pivot columns, inflating the free-variable count by one. | Remember that for a consistent system always lies in but indexes no variable; exclude it before counting. |
| Reporting one vector for an infinite family | medium | Passing on a solver's minimum-norm output without noting that . | Report , and the identity of the free variables alongside any numeric solution. |
| Inferring consistency from | medium | Reading the classification theorem as an equivalence when its hypothesis is consistency. | Establish consistency independently; a rank-deficient system can still have a pivot in the constants column. |
| Rank inflation from rounding | high | A structurally dependent row acquires a tiny non-zero pivot in floating point, reducing the apparent degrees of freedom to zero. | Determine rank from singular values against a tolerance scaled by the matrix norm and the machine epsilon, not from exact pivot tests. |
| Assuming the free variables are physically unbounded | low | Reading the algebraic parametrisation as a statement about achievable configurations. | Intersect the parametric family with the physical feasible set before quoting the available latitude. |
FAQs
Can I choose which variables to treat as free?
Yes, provided the remaining variables correspond to a non-singular submatrix of the coefficient matrix. The pivot-based choice is simply the canonical one, produced automatically by reduced row-echelon form and reproducible by anyone. If you deviate from it, say so explicitly, because the algebraic form of the solution changes even though the solution set does not.
Why is the number of free variables rather than ?
Because equations may be redundant. The value counts the independent equations, and only those constrain the unknowns. When all equations are independent the two counts agree, but a system with duplicated or linearly dependent rows has and correspondingly more freedom than the raw equation count suggests.
Does a free variable mean the system is badly posed?
Not by itself. In design and control, free variables represent genuine latitude and are exploited deliberately. In parameter identification they usually indicate that the data cannot separate certain parameter combinations, which is a problem. The mathematics is identical; the interpretation depends on what the model is for.
How do I get a single representative solution?
Set every free variable to zero. The dependent variables are then read directly from the constants column of the reduced augmented matrix, with no further arithmetic. This is a valid solution but carries no claim to being preferred; a minimum-norm solution obtained from a least-squares routine is a different, and often more defensible, representative.
What is the relationship between the free variables and the null space?
Setting each free variable to one in turn, with the others zero, and reading the induced dependent values produces a set of vectors that span the null space of the coefficient matrix. The full solution set is one particular solution plus every combination of these vectors, which is the affine translate structure of a consistent system.
If a system has more unknowns than equations, must it have free variables?
If it is consistent, yes: forces . If it is inconsistent the question does not arise, since there is no solution set to parametrise. The hypothesis of consistency cannot be dropped.
Does the number of degrees of freedom change if I reorder the equations?
No. Row swaps are elementary row operations and preserve the reduced row-echelon form, hence , and the entire dependent-free partition. Reordering the variables is a different matter: that permutes columns, which is not a row operation and does change which columns are pivotal.
References
- Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section TSS, subsection IDV. Licensed under the GNU Free Documentation License v1.2.
- ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
- ISO 8373:2021, Robotics — Vocabulary. International Organization for Standardization.
- Strang, G. Introduction to Linear Algebra, 5th edition. Wellesley-Cambridge Press, 2016.
- Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
AI Suggested Questions
- Given a 4x7 augmented matrix in reduced row-echelon form with pivots in columns 1, 2 and 5, list the dependent and free variables and write the parametric solution set.
- Show how setting each free variable to one in turn produces a spanning set for the null space, and prove that the resulting vectors are linearly independent.
- Why can a different choice of free variables give a different-looking parametrisation of the same solution set, and how would I verify two such descriptions agree?
- How does the numerical rank tolerance in a least-squares routine change the reported number of degrees of freedom for a nearly rank-deficient system?
- Relate the number of free variables in a truss equilibrium system to the degree of static indeterminacy computed from the Maxwell counting rule.
- For a redundant manipulator, how are the free variables of the velocity kinematics used to construct a null-space projection controller?
Related Calculators
Reduce and return the dependent and free variables with the full parametric solution set.
Degrees of Freedom CounterReport , and the pivot index set for any augmented matrix, with a selectable rank tolerance.
Null Space Basis CalculatorGenerate one direction vector per free variable and verify that they span the homogeneous part of the solution set.
