Free Variables Count Independent Solution Directions
A homogeneous system \(\mathbf{A}\mathbf{x}=\mathbf{0}\) always has at least one solution: \(\mathbf{x}=\mathbf{0}\). The more informative question is whether there are nonzero solutions, and how many independent ways there are to choose one. Row reduction answers this by identifying the variables that can be assigned freely. Each free variable contributes one independent direction in the solution set; the number of such directions is the nullity of \(\mathbf{A}\).
Throughout, \(\mathbf{A}\in\mathbb{R}^{m\times n}\) and \(\mathbf{x}\in\mathbb{R}^n\) is a column vector. A pivot variable corresponds to a pivot column in the reduced row echelon form (RREF) of \(\mathbf{A}\). A free variable corresponds to a column without a pivot. The rank \(\operatorname{rank}\mathbf{A}\) is the number of pivot columns, and the nullity \(\operatorname{nullity}\mathbf{A}\) is the dimension of the null space \(\operatorname{Nul}\mathbf{A}\), the set of solutions of \(\mathbf{A}\mathbf{x}=\mathbf{0}\).
The final equality is the matrix Rank-Nullity Theorem, established earlier in the course. Here we focus on why the free-variable count describes the solutions themselves. The number of free variables counts independent parameters, not the total number of solutions. Over \(\mathbb{R}\), even one free variable typically allows infinitely many solutions, while nullity zero means the zero vector is the only solution.
How Parameters Produce a Basis
Row reduction of a homogeneous system is useful because each elementary row operation preserves its solution set. Swapping two equations does not change which \(\mathbf{x}\) satisfies all the equations; multiplying an equation by a nonzero scalar does not change its solutions; and adding a multiple of one equation to another replaces an equation by a consequence of the equations already present. Thus, solving the system in RREF gives the same solutions as solving the original system.
Suppose the RREF has \(r\) pivot columns, indexed \(p_1,\dots,p_r\), and \(k=n-r\) free columns, indexed \(j_1,\dots,j_k\). In the pivot row for \(p_i\), the equation has the form \(x_{p_i}+\sum_{\ell=1}^{k}a_{i,j_\ell}x_{j_\ell}=0\). Consequently, each pivot variable is determined by the free variables. Assigning values to the free variables determines exactly one solution.
Proof. Row reduction preserves the solutions of the homogeneous system, so it is enough to describe the solutions using the RREF. Let the free variables be \(x_{j_1},\dots,x_{j_k}\), where \(k=n-r\). In each pivot row, the pivot variable is uniquely determined by these \(k\) values. For each \(\ell\in\{1,\dots,k\}\), define \(\mathbf{z}_{\ell}\) to be the solution obtained by setting \(x_{j_\ell}=1\), setting every other free variable to \(0\), and then using the pivot equations to determine all pivot variables. Every solution \(\mathbf{x}\) is \(\sum_{\ell=1}^{k}x_{j_\ell}\mathbf{z}_{\ell}\): both sides have the same free-variable entries, and the pivot equations uniquely determine the remaining entries. This proves that the vectors \(\mathbf{z}_{1},\dots,\mathbf{z}_{k}\) span the null space. If \(c_1\mathbf{z}_{1}+\cdots+c_k\mathbf{z}_{k}=\mathbf{0}\), then the entry in free-variable coordinate \(j_\ell\) of this sum is \(c_\ell\), so every \(c_\ell=0\). The vectors are therefore linearly independent and form a basis. If \(k=0\), there are no such vectors; there are no free variables, all pivot variables are determined as zero, and the null space is \(\{\mathbf{0}\}\), whose dimension is \(0\). Since \(r=\operatorname{rank}\mathbf{A}\), the stated equality follows. \(\square\)
This proof also clarifies what “independent solutions” means. A basis is not a list of every solution; it is a smallest list of independent directions from which every solution can be formed. If there are \(k\) free variables, there are \(k\) such directions. When \(k>0\), varying even one parameter over \(\mathbb{R}\) gives infinitely many solutions.
Reading Free Variables from a Reduced System
Worked Example: Two Free Variables in a System with Five Unknowns
Find the nullity and a basis for the null space of
First eliminate the entry below the first pivot by \(R_2\to R_2-2R_1\), then swap rows 2 and 3:
Now use \(R_3\to R_3+2R_2\), scale row 3 by \(\tfrac13\), and clear the entries above the pivots in columns 4 and 3:
The pivot columns are 1, 3, and 4. Columns 2 and 5 are free, so the nullity is \(5-3=2\). Writing \(x_2=s\) and \(x_5=t\), the RREF equations give \(x_1=-2s\), \(x_3=-t\), and \(x_4=0\). Therefore
The two displayed vectors form a basis for \(\operatorname{Nul}\mathbf{A}\). To check that they really are solutions, multiply each by the original matrix:
They are independent because their entries in the two free-variable coordinates, columns 2 and 5, are respectively \((1,0)\) and \((0,1)\). Thus neither direction can be made from the other.
Zero Free Variables and No Pivot Variables
Worked Example: No Free Variables Means Only the Zero Solution
Consider the homogeneous system with coefficient matrix
Apply \(R_2\to R_2-R_1\) and \(R_3\to R_3-2R_1\). Then scale row 2 by \(-\tfrac12\), use \(R_3\to R_3+2R_2\), and clear the entry above the second pivot:
There are two columns and two pivots, so there are no free variables and the nullity is \(2-2=0\). The equations in the RREF are \(x_1=0\) and \(x_2=0\), so the only solution is \(\mathbf{x}=\mathbf{0}\). Substitution in the original system confirms the solution: \(\mathbf{A}\begin{bmatrix}0\\0\end{bmatrix}=\begin{bmatrix}0\\0\\0\end{bmatrix}\). There are no nonzero null-space basis vectors because the null space contains only the zero vector.
Worked Example: No Pivots Means Every Variable Is Free
Let \(\mathbf{A}\) be the \(2\times3\) zero matrix. Its RREF is itself:
There are no pivot columns, so all three variables are free and the nullity is \(3-0=3\). The equations impose no restrictions: every \(\mathbf{x}=(x_1,x_2,x_3)^\top\) is a solution. A basis is the standard basis of \(\mathbb{R}^3\):
Each basis vector checks directly: \(\mathbf{A}\mathbf{e}_1=\mathbf{A}\mathbf{e}_2=\mathbf{A}\mathbf{e}_3=\begin{bmatrix}0\\0\end{bmatrix}\). Every solution is \(x_1\mathbf{e}_1+x_2\mathbf{e}_2+x_3\mathbf{e}_3\), and the three vectors are independent because the three coordinates of that combination are exactly \(x_1,x_2,x_3\).
Counting Correctly and Avoiding a Common Error
The number of columns determines how many variables there are. The number of pivots determines how many variables are dependent on the others. Subtracting gives the number of free variables:
A common mistake is to subtract the rank from the number of equations \(m\), rather than from the number of variables \(n\). For the \(3\times5\) matrix in the first example, this incorrect calculation gives \(3-3=0\) free variables. But there are five variables and only three pivot columns, so columns 2 and 5 are free. The correct calculation is \(5-3=2\). The dimensions of the matrix matter: nullity counts independent choices of input coordinates, so it is based on the number of columns.
A second related mistake is to interpret nullity as the total number of solutions. Nullity is the dimension of the solution space, or equivalently the number of vectors in a basis for it. In the first example, nullity \(2\) means every solution is determined by two real parameters; it does not mean there are only two solutions. In the second example, nullity \(0\) means there is exactly one solution to the homogeneous system, namely the zero vector.
This count is useful beyond a single computation. It tells whether a homogeneous system has nonzero solutions: that happens exactly when there is at least one free variable. It also gives a compact description of the whole solution set: a basis for the null space records the independent directions, and arbitrary linear combinations of those basis vectors produce every solution.
Check Your Understanding
Use the pivot count and the equations in RREF to justify each answer.
- A matrix has 6 columns and 4 pivots. How many free variables does its homogeneous system have, and what is its nullity?
- If a homogeneous system has no free variables, what can you conclude about its solutions?
- A \(2\times4\) matrix has rank \(2\). How many independent solution directions does its null space have?
- Explain why one free variable over \(\mathbb{R}\) generally gives infinitely many solutions, even though it contributes only one to the nullity.
- For a zero matrix with 3 columns, give a basis for its null space and verify the number of basis vectors using the pivot count.