Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Solution Sets of Linear Systems


Row reduce [A | b] to reduced row echelon form and read the answer: one solution, none, or infinitely many.

Preset?A system of linear equations has exactly one solution, no solution, or infinitely many. Row reducing the augmented matrix [A | b] decides which: a row of zeros equal to a non-zero constant means no solution; a pivot in every column of A means one solution, read off the last column; free columns mean infinitely many, with one free parameter per free column. Reduced row echelon form makes all three cases readable at a glance.
Shape
equations3unknowns3
A | b
|
|
|
A | b3×4
1
1
1
6
0
2
5
−4
2
5
−1
27
Step 1 / 12

Row operations

13 equations, 3 unknowns
The augmented matrix [A | b] holds the coefficients of the unknowns on the left and the constants on the right (in amber). Row operations on it are legal moves on the equations: they change how the system is written, never what it says. The plan is to reduce it to reduced row echelon form, where the answer — one solution, none, or infinitely many — can be read directly.
Rows are equations; row operations rewrite them without changing the solutions. Learn more about the opening scene · the three outcomes








Key Terms

Augmented matrix[Ab][A \mid \mathbf{b}], the coefficients and the constants side by side, one row per equation.

Row operations — swapping two rows, scaling a row by a non-zero constant, and adding a multiple of one row to another; each rewrites the system without changing its solutions.

Row echelon form — pivots step to the right down the rows, with zeros below each pivot; the result of the forward pass.

Reduced row echelon form — echelon form with every pivot equal to 11 and zeros above each pivot as well; the result of the backward pass, and unique for a given matrix.

Pivot column, leading variable — a column of AA containing a pivot; its variable is determined by the others.

Free column, free variable — a column of AA with no pivot; its variable can be chosen at will.

Consistent — the system has at least one solution; inconsistent if a row reduces to 0=c0 = c with c0c \neq 0.

Particular solution and directions — for infinitely many solutions, x=p+t1v1+\mathbf{x} = \mathbf{p} + t_1 \mathbf{v}_1 + \cdots: one solution plus one direction per free variable.

Getting Started with the Visualizer

Choose a system, then watch the augmented matrix reduce until the answer can be read off.

• Use the Preset pills for six systems: one solution, infinitely many, none, a homogeneous system, an overdetermined but consistent one, and one with two free variables
• Use the Shape steppers for 11 to 44 equations and 11 to 44 unknowns, independently; resizing keeps the existing entries
• Edit any entry of AA or of b\mathbf{b} directly, or press Shuffle for a random system; half the time one equation is a multiple of another, so the non-unique cases turn up often
• Hover the ? icon for a reminder of the three outcomes and how the reduced form reveals them
• Press play or step manually; the step log on the right lists every row operation

The run has a forward pass, a consistency check, and a backward pass, and it ends in one of three final scenes. The constants stay in amber throughout, so the right-hand side is always distinguishable from the coefficients.

How the Reduction Runs

The visualizer performs Gauss-Jordan elimination in the standard order.

Forward pass — for each column of AA in turn: find a pivot at or below the current row, swapping rows if needed; mark it; clear every entry below it. A column with no available pivot is skipped, and its variable is declared free
Consistency check — if any row now reads 00c0 \cdots 0 \mid c with c0c \neq 0, the system is inconsistent and the run ends there
Backward pass — from the last pivot up: divide the pivot row so the pivot is 11, then clear every entry above the pivot
Classification — with a pivot in every column of AA, the right-hand column is the solution; otherwise the solution is written as a particular solution plus one direction per free variable

The row operations act on the whole augmented row, constants included. That is what makes them legal: each one replaces an equation by an equivalent equation, so the solution set never changes from the first scene to the last.

The Opening Scene: The Augmented Matrix

The player opens with [Ab][A \mid \mathbf{b}], the coefficients on the left and the constants in amber on the right, one row per equation. At the default preset it is 3×43 \times 4.

Nothing has been reduced yet. What the scene establishes is that the system and the matrix are the same object written two ways, and that operations on rows are operations on equations.
A | b3×41116025−425−127
Augmented matrix, frozen

[A | b] for the default preset, the constants in amber. The system and the matrix are one object written two ways; the shape alone does not say which of the three outcomes is coming.

The augmented matrix drops the variable names because they carry no information the column position does not. Column jj is xjx_j wherever it sits, and the bar, or here the colour, marks the constants.

The three outcomes are not visible yet. They emerge from the reduction, and the shape of the matrix alone, three equations for three unknowns here, does not predict which one it will be.

The Forward Pass

The forward pass works down the columns of AA: find a pivot, swap rows if it sits lower, and clear everything beneath it by subtracting multiples of the pivot row, constants included.

The frozen picture below is the first elimination of the default preset, R3R32R1R_3 \leftarrow R_3 - 2R_1, with the pivot row primary, the row being changed secondary, and the cleared entry marked.
A | b3×41116025−403−315
Forward pass, frozen

R3 ← R3 − 2R1, constants included. Reversible, so the solution set is untouched - the equations are being rewritten, not changed.

Every operation here is reversible, which is why the solution set survives: adding twice row one to row three would restore the original. The reduction rewrites the equations in a form that is easier to read, and nothing more.

This pass is the same one the rank tool performs, and it does the same job: the pivots it finds count the independent equations. Where it differs is that the constants come along, so that the consistency check and the eventual solution are available at the end.

The Backward Pass

Once the forward pass is done and no row contradicts itself, the backward pass makes each pivot 11 and clears the entries above it, working from the last pivot up.

The frozen picture below is the first backward elimination of the default preset, R2R25R3R_2 \leftarrow R_2 - 5R_3, clearing the entry above the third pivot.
A | b3×411160206001−2
Backward pass, frozen

R2 ← R2 − 5R3, clearing the entry above the third pivot. Reduced form puts each leading variable in exactly one equation with coefficient 1.

Echelon form would already allow back substitution by hand. Reduced form goes one step further so that each leading variable appears in exactly one equation with coefficient 11, and that equation states its value directly.

The reduced form is unique: however the operations are sequenced, the same matrix results. That uniqueness is what makes it a canonical description of the solution set rather than one convenient rewriting among many.

One Solution

When the system is consistent and every column of AA has a pivot, the reduced matrix is the identity next to the solution.

The frozen picture below is the default preset finished: pivots down the diagonal, the right-hand column reading 5,3,25, 3, -2, and the solution vector beside it.
A | b3×410050103001−2x3×153−2
One solution, frozen

The identity on the left, 5, 3, −2 on the right, and the solution vector beside it. Three pivots for three unknowns: independent columns, one combination reaching b.

Three pivots for three unknowns is the condition. It says the columns of AA are independent, so b\mathbf{b} is reached by exactly one combination of them, and each row of the reduced matrix names one coordinate of that combination.

For a square system this is the same as detA0\det A \neq 0, and the same solution could have been produced by Cramer's rule. The reduction is the cheaper route and, unlike the determinant formula, it also handles the two other outcomes.

No Solution

When a row reduces to zeros on the left and a non-zero constant on the right, the equation it represents is 0=c0 = c, and nothing satisfies it.

The frozen picture below is the no-solution preset at that moment: the third row reading (0,01)(0, 0 \mid 1), highlighted, after the second equation was found to contradict twice the first.
A | b3×31120−2−2001
No solution, frozen

The third row reading 0 0 | 1 - the equation 0 = 1. The contradiction was in the original equations; elimination made it visible.

The contradiction was present in the original equations, just not visible: x1+x2=2x_1 + x_2 = 2 and 2x1+2x2=52x_1 + 2x_2 = 5 cannot both hold. Elimination exposes it by subtracting one from the other.

In terms of the columns, b\mathbf{b} lies outside the column space of AA. The rank of the augmented matrix exceeds the rank of AA by one, which is the algebraic form of the test. Inconsistent systems are the normal case for measured data, and least squares is the tool for the closest consistent replacement.

Infinitely Many Solutions

When the system is consistent but some column of AA has no pivot, the corresponding variable is free, and the solution set is a line, plane or higher-dimensional flat.

The frozen picture below is the infinitely-many preset finished: reduced rows (1,2,04)(1, 2, 0 \mid 4) and (0,0,11)(0, 0, 1 \mid 1), the free column marked, and beside the matrix the particular solution p=(4,0,1)\mathbf{p} = (4, 0, 1) and the direction v1=(2,1,0)\mathbf{v}_1 = (-2, 1, 0).
A | b2×412040011p3×1401+t₁v₁3×1−210
Infinitely many solutions, frozen

Reduced rows (1, 2, 0 | 4) and (0, 0, 1 | 1) with the free middle column marked, and beside them p = (4, 0, 1) and v1 = (−2, 1, 0): the solution line x = p + t v1.

Reading the parametric form from reduced rows is mechanical. Set the free variable x2=tx_2 = t; the first row says x1+2t=4x_1 + 2t = 4, so x1=42tx_1 = 4 - 2t; the second says x3=1x_3 = 1. Collect the constants into p\mathbf{p} and the coefficients of tt into v1\mathbf{v}_1, and x=p+tv1\mathbf{x} = \mathbf{p} + t\mathbf{v}_1.

The direction vectors span the null space of AA, the solutions of Ax=0A\mathbf{x} = \mathbf{0}, and the full solution set is that null space shifted by p\mathbf{p}. With two free variables, as in the last preset, there are two directions and the set is a plane. This is the structure theorem for linear systems in one picture: one particular solution plus every homogeneous solution.

Reading the Scene Player

Each scene shows the augmented matrix with the current operation in the caption.

• In a pivot scene, the pivot cell is accent and its row is primary
• In an eliminate or back-eliminate scene, the pivot row is primary, the row being changed is secondary, and the entry being cleared is accent
• In a normalize scene, the pivot being scaled to 11 is accent
• In a swap scene, the two rows exchanging places are primary and secondary
• In a skip scene, the zero entries scanned are muted, and the caption names the free variable
• In the inconsistent scene, the offending row is highlighted and its constant marked
• In the unique scene, the pivots and the right-hand column are highlighted and the solution vector appears beside the matrix
• In the infinite scene, the pivots and free columns are highlighted and the particular solution and direction vectors appear beside the matrix, with the parameters named

Choosing a System

The six presets cover the whole map.

One solution — three equations, three unknowns, three pivots, solution (5,3,2)(5, 3, -2); the textbook case
Infinitely many — two equations, three unknowns; the middle column has no pivot, and the solution is a line p+tv\mathbf{p} + t\mathbf{v}
No solution — three equations, two unknowns, and the second equation contradicts twice the first; a row reduces to 0=10 = 1
Homogeneousb=0\mathbf{b} = \mathbf{0}; always consistent, and the solution set is the null space of AA, here a line through the origin
Overdetermined — three equations, two unknowns, but consistent; the third equation is implied by the first two and reduces to a zero row
Two free variables — two equations, four unknowns; the solution set is a plane, with two parameters

The shape of the system does not decide the outcome. Overdetermined systems can be consistent, square systems can have infinitely many solutions, and only the reduction says which.

The Three Outcomes

A system Ax=bA\mathbf{x} = \mathbf{b} of mm equations in nn unknowns has exactly one of three solution sets, and the reduced row echelon form of [Ab][A \mid \mathbf{b}] displays which.

No solution. Some row of the reduced matrix is (0,,0c)(0, \ldots, 0 \mid c) with c0c \neq 0, the equation 0=c0 = c. The system is inconsistent: b\mathbf{b} is not a combination of the columns of AA. In rank terms, rank[Ab]=rankA+1\operatorname{rank}[A \mid \mathbf{b}] = \operatorname{rank} A + 1.

Exactly one solution. The system is consistent and every column of AA has a pivot, so rankA=n\operatorname{rank} A = n. Each row of the reduced matrix reads xj=cjx_j = c_j, and the solution is the right-hand column. This needs at least as many equations as unknowns, mnm \geq n, but is not guaranteed by it.

Infinitely many solutions. The system is consistent and some column of AA has no pivot, so rankA<n\operatorname{rank} A < n. Each free variable is a parameter, and each leading variable is its constant minus the free-column entries times the parameters:

x=p+t1v1++tkvk,k=nrankA\mathbf{x} = \mathbf{p} + t_1 \mathbf{v}_1 + \cdots + t_k \mathbf{v}_k, \qquad k = n - \operatorname{rank} A


Here p\mathbf{p} is the solution with all parameters zero, and each vj\mathbf{v}_j is the direction obtained by setting one parameter to 11. The vj\mathbf{v}_j span the null space of AA, and the solution set is that null space shifted to pass through p\mathbf{p}.

The tool reduces all the way to reduced form because that is where the three cases separate cleanly. For echelon forms and the reduction algorithm in detail, see the echelon form theory page; for the rank conditions behind the three cases, see the solvability theory page; for the homogeneous case, see the homogeneous systems page.

Key Properties

Facts that hold for every system, whatever its shape.

Row operations preserve solutions: each is reversible and replaces an equation by an equivalent one
Reduced form is unique: whatever sequence of operations is used, the reduced row echelon form of a matrix is the same
Consistency: Ax=bA\mathbf{x} = \mathbf{b} is consistent exactly when rank[Ab]=rankA\operatorname{rank}[A \mid \mathbf{b}] = \operatorname{rank} A
Uniqueness: a consistent system has a unique solution exactly when rankA=n\operatorname{rank} A = n
Number of parameters: a consistent system with rankA=r\operatorname{rank} A = r has an (nr)(n - r)-parameter family of solutions
Homogeneous systems are always consistent, since x=0\mathbf{x} = \mathbf{0} works, and have non-trivial solutions exactly when rankA<n\operatorname{rank} A < n
Structure: the solutions of Ax=bA\mathbf{x} = \mathbf{b} are one particular solution plus every solution of Ax=0A\mathbf{x} = \mathbf{0}
Square case: for m=nm = n, a unique solution exists exactly when detA0\det A \neq 0, which is where Cramer's rule applies

Why It Matters

Classifying a system is the first question asked of any set of linear constraints.

Modelling: whether a set of conditions can be met at all, met in exactly one way, or leaves freedom, is the inconsistent, unique and infinite case respectively
Circuits, structures, balances: node and loop equations, force balances and chemical balances are linear systems, and free variables correspond to undetermined currents, redundant members or adjustable proportions
Least squares: when a system is inconsistent, as measured data usually makes it, the next question is the closest consistent system, which is what least squares answers
Null spaces and eigenvectors: eigenvectors are the non-trivial solutions of the homogeneous system (AλI)x=0(A - \lambda I)\mathbf{x} = \mathbf{0}, read off exactly as in the homogeneous preset
Rank in practice: the reduction is the practical way to find rank, and the free-variable count is the nullity
Algorithms: Gauss-Jordan elimination is the basis of every direct linear solver, with pivoting added for numerical stability

Worked Example

Take the default preset,

[1116025425127]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 2 & 5 & -4 \\ 2 & 5 & -1 & 27 \end{array}\right]


Forward pass. Column 11: pivot 11 in row 11; row 22 already has 00; R3R32R1R_3 \leftarrow R_3 - 2R_1 gives (0,3,315)(0, 3, -3 \mid 15). Column 22: pivot 22 in row 22; R3R332R2R_3 \leftarrow R_3 - \tfrac{3}{2}R_2 gives (0,0,21221)(0, 0, -\tfrac{21}{2} \mid 21). Column 33: pivot 212-\tfrac{21}{2} in row 33.

[111602540021221]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 2 & 5 & -4 \\ 0 & 0 & -\tfrac{21}{2} & 21 \end{array}\right]


No row reads 0=c0 = c, so the system is consistent, and with three pivots for three unknowns the solution is unique.

Backward pass. R3R3/(212)R_3 \leftarrow R_3 / (-\tfrac{21}{2}) gives (0,0,12)(0, 0, 1 \mid -2). Clear above: R2R25R3=(0,2,06)R_2 \leftarrow R_2 - 5R_3 = (0, 2, 0 \mid 6) and R1R1R3=(1,1,08)R_1 \leftarrow R_1 - R_3 = (1, 1, 0 \mid 8). Then R2R2/2=(0,1,03)R_2 \leftarrow R_2 / 2 = (0, 1, 0 \mid 3) and R1R1R2=(1,0,05)R_1 \leftarrow R_1 - R_2 = (1, 0, 0 \mid 5).

[100501030012],x=(5,3,2)\left[\begin{array}{ccc|c} 1 & 0 & 0 & 5 \\ 0 & 1 & 0 & 3 \\ 0 & 0 & 1 & -2 \end{array}\right], \qquad \mathbf{x} = (5, 3, -2)


Check: 5+32=65 + 3 - 2 = 6, 610=46 - 10 = -4, 10+15+2=2710 + 15 + 2 = 27.

For contrast, the infinitely many preset reduces to rows (1,2,04)(1, 2, 0 \mid 4) and (0,0,11)(0, 0, 1 \mid 1): x2x_2 is free, x1=42x2x_1 = 4 - 2x_2, x3=1x_3 = 1, so x=(4,0,1)+t(2,1,0)\mathbf{x} = (4, 0, 1) + t(-2, 1, 0). And the no solution preset produces the row (0,01)(0, 0 \mid 1) after one elimination, the equation 0=10 = 1.

Common Mistakes

A few mistakes recur.

Forgetting the constants — a row operation applies to the whole augmented row; leaving b\mathbf{b} unchanged turns a legal move into a different system
Reading a zero row as inconsistency(0,0,00)(0, 0, 0 \mid 0) is a redundant equation, harmless; only (0,,0c)(0, \ldots, 0 \mid c) with c0c \neq 0 signals no solution
Counting equations to predict the outcome — more equations than unknowns does not mean no solution, and fewer does not mean infinitely many; the pivots decide
Stopping at echelon form for the infinite case — the parametric solution is easiest to write from reduced form, where each leading variable appears in exactly one row
Choosing the wrong free variables — free variables are the non-pivot columns; picking a pivot variable as a parameter produces a valid but tangled description
Missing the swap — a 00 in the pivot position with a non-zero entry below it is not a free variable; swap and continue