Free Variables and Basic Variables in a Linear System

Every linear system, once reduced to echelon form, splits its variables into two camps: those whose values are pinned down by the pivots, and those that can float freely. Understanding this distinction is the key to writing out a complete solution set rather than just declaring "infinitely many solutions exist."

Basic Variables and Free Variables Defined

A basic variable (also called a leading variable or pivot variable) is any variable that corresponds to a pivot column in the reduced row echelon form (RREF) of the augmented matrix. The pivot in each row gives that variable a definite value, possibly expressed in terms of other variables.

A free variable is any variable that does NOT correspond to a pivot column. After row reduction, free variables never appear as the leading entry of any row. They have no equation that uniquely determines them, so you are free to assign them any real number value.

This directly determines how many solutions the system has:

For more detail on how pivot positions are identified, see pivot positions and pivot columns.

How to Spot Them in the RREF

Once you have the RREF, the rule is mechanical. Look at the columns corresponding to the coefficient variables (not the augmented column). Every column that contains a pivot is a basic-variable column. Every column with no pivot is a free-variable column.

Consider a system with three unknowns x₁, x₂, x₃ whose RREF looks like this:

[ 1  0  -3  |  2 ]
[ 0  1   5  |  -1 ]
[ 0  0   0  |  0 ]

Columns 1 and 2 have pivots (the leading 1s in rows 1 and 2). So x₁ and x₂ are basic variables. Column 3 has no pivot, so x₃ is a free variable.

The third row is all zeros, which tells us nothing about x₃ and confirms the system is consistent with at least one degree of freedom.

Writing the General Solution Using Parameters

The standard approach is to assign the free variable a parameter, typically the letter t (or s, r, ... if there are multiple free variables). Then use the pivot rows to express each basic variable in terms of that parameter.

From the RREF above:

The general solution is:

x₁ =  2 + 3t
x₂ = -1 - 5t
x₃ =  t

where t can be any real number. Each value of t produces a distinct solution. Set t = 0 and you get the particular solution (2, -1, 0). Set t = 1 and you get (5, -6, 1). The full solution set is a line through (2, -1, 0) in three-dimensional space.

This parametric form is the conventional way to describe a solution set with infinitely many members. For vector notation of the same idea, see parametric vector form.

Fully Worked Example

Solve the following system:

 x₁ + 2x₂ - x₃ + x₄ = 3
 2x₁ + 4x₂ - x₃ + 3x₄ = 7
-x₁ - 2x₂ + x₃ - x₄ = -3

Step 1: Write the augmented matrix.

[  1  2  -1  1  |  3 ]
[  2  4  -1  3  |  7 ]
[ -1 -2   1 -1  | -3 ]

Step 2: Row reduce.

R2 = R2 - 2·R1:

[  1  2  -1  1  |  3 ]
[  0  0   1  1  |  1 ]
[ -1 -2   1 -1  | -3 ]

R3 = R3 + R1:

[  1  2  -1  1  |  3 ]
[  0  0   1  1  |  1 ]
[  0  0   0  0  |  0 ]

R1 = R1 + R2 (to eliminate x₃ from row 1):

[  1  2  0  2  |  4 ]
[  0  0  1  1  |  1 ]
[  0  0  0  0  |  0 ]

This is the RREF.

Step 3: Identify basic and free variables.

Two free variables, two basic variables.

Step 4: Assign parameters.

Set x₂ = s and x₄ = t (both arbitrary real numbers).

Step 5: Express basic variables.

From row 1: x₁ + 2x₂ + 2x₄ = 4, so x₁ = 4 - 2s - 2t From row 2: x₃ + x₄ = 1, so x₃ = 1 - t

General solution:

x₁ = 4 - 2s - 2t
x₂ = s
x₃ = 1 - t
x₄ = t

where s, t ∈ ℝ. This is a two-parameter family of solutions, geometrically a plane in ℝ⁴. To walk through the full reduction process step by step, see using RREF to solve linear systems.

Why the Number of Free Variables Matters

The count of free variables equals the number of degrees of freedom in the solution set. One free variable gives a line, two give a plane, three give a hyperplane, and so on. In the language of linear algebra, this number is the dimension of the solution set (for homogeneous systems it's the dimension of the null space, also called the nullity of the matrix).

A quick formula worth remembering: if an m × n coefficient matrix has r pivot columns, then there are n - r free variables. For a 3 × 5 matrix with 2 pivots, expect 3 free variables. This is a handy sanity check after reduction.

Frequently Asked Questions

Can a free variable ever equal a specific value?

Free variables can take any real number value, but a particular solution fixes each free variable at a specific number. When you set t = 7, for instance, you get exactly one solution from an infinite family. The variable is still "free" in the sense that you chose to assign it 7; nothing in the system forced that choice.

What happens if the system has no free variables?

A consistent system with no free variables has a unique solution. Every variable is a basic variable, and each pivot row directly yields one variable's value. After back-substitution (or reading off the RREF directly), you get a single point. See no solution, one solution, or infinitely many for the complete case breakdown.

Do free variables always appear in the same columns?

Not across different problems, but within one row reduction they are stable. The choice of which columns become pivot columns depends on the specific matrix. Row swaps can change which column gets a pivot first, but a correctly performed reduction always produces the same RREF (it's unique), so the free-variable columns are uniquely determined for any given matrix.

How do free variables behave in a homogeneous system?

In a homogeneous system Ax = 0, the augmented column is always zero, so the system is always consistent. Any free variables produce a non-trivial solution (something other than the zero vector). This is precisely why a homogeneous system with more unknowns than equations is guaranteed to have infinitely many solutions. You can explore this further in solving homogeneous systems.