From Equations to a Subspace
A homogeneous system of linear equations describes a collection of vectors: all the vectors that satisfy every equation. Because the right-hand sides are zero, adding two solutions or multiplying a solution by a scalar produces another solution. The solution set is therefore a subspace. Row reduction then gives a practical route from the equations to a basis: identify the free variables, express every solution using them, and read off vectors that generate the whole subspace.
For a system in \(n\) variables, place the coefficients in a matrix \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and write the variable vector as a column \(\mathbf{x}\in\mathbb{R}^n\). The system has the form \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Its solution set is the null space \(\operatorname{Nul}\mathbf{A}=\{\mathbf{x}\in\mathbb{R}^n:\mathbf{A}\mathbf{x}=\mathbf{0}\}\). A basis for this subspace must both span all its solutions and be linearly independent. The dimension is the number of vectors in such a basis.
Proof. First, \(\mathbf{A}\mathbf{0}=\mathbf{0}\), so \(\mathbf{0}\in\operatorname{Nul}\mathbf{A}\). If \(\mathbf{x},\mathbf{y}\in\operatorname{Nul}\mathbf{A}\), then \(\mathbf{A}\mathbf{x}=\mathbf{0}\) and \(\mathbf{A}\mathbf{y}=\mathbf{0}\). For any \(a,b\in\mathbb{R}\), matrix multiplication gives \(\mathbf{A}(a\mathbf{x}+b\mathbf{y})=a\mathbf{A}\mathbf{x}+b\mathbf{A}\mathbf{y}=a\mathbf{0}+b\mathbf{0}=\mathbf{0}\). Thus every linear combination of vectors in the solution set is also in the solution set, which proves it is a subspace. \(\square\)
Free Variables Produce Candidate Basis Vectors
Row-reduce the coefficient matrix to reduced row echelon form (RREF). Row operations preserve the solutions of a homogeneous system, so the original system and its RREF have the same solution set. A variable in a pivot column is a pivot variable; a variable in a column without a pivot is a free variable. Each pivot variable is expressed in terms of the free variables. Assigning values to all the free variables therefore determines the entire solution.
To turn that description into vectors, write the free variables as parameters. In the expression for a general solution, collect the coefficient of each parameter into a vector. These vectors span the solution set: every solution is a linear combination of them. They are also independent: each one has value \(1\) in its own free-variable coordinate and \(0\) in the other free-variable coordinates. The theorem below proves both claims, including why the dimension can be read from the number of free variables.
Proof. Let \(\mathbf{R}\) be the RREF of \(\mathbf{A}\). Row operations preserve the solutions, so \(\mathbf{A}\mathbf{x}=\mathbf{0}\) and \(\mathbf{R}\mathbf{x}=\mathbf{0}\) have the same solution set. Suppose first that there are \(q=n-p>0\) free variables, denoted \(t_1,\dots,t_q\). Solving the equations in \(\mathbf{R}\mathbf{x}=\mathbf{0}\) expresses each pivot variable as a linear combination of \(t_1,\dots,t_q\). Thus every coordinate of \(\mathbf{x}\) is a linear expression in those parameters, and the full solution can be written \(\mathbf{x}=t_1\mathbf{v}_1+\cdots+t_q\mathbf{v}_q\), where \(\mathbf{v}_j\) is the solution obtained by setting \(t_j=1\) and every other parameter to \(0\). This expression proves that the vectors span the solution set. For independence, suppose \(c_1\mathbf{v}_1+\cdots+c_q\mathbf{v}_q=\mathbf{0}\). In the coordinate belonging to free variable \(t_j\), the vector \(\mathbf{v}_j\) has entry \(1\), while every \(\mathbf{v}_i\) with \(i\ne j\) has entry \(0\). Therefore that coordinate of the combination is \(c_j\), so \(c_j=0\). This holds for each \(j\), proving independence. There are \(q=n-p\) basis vectors, so the dimension is \(n-p\). If \(p=n\), there are no free variables. Every variable is a pivot variable, and the homogeneous equations force every variable to be \(0\); the solution set is \(\{\mathbf{0}\}\), whose dimension is \(0\). \(\square\)
Worked Examples
Worked Example: Two Equations in Four Variables
Find a basis and dimension for the subspace of \(\mathbb{R}^4\) defined by \(x_1+2x_2-x_3+x_4=0\) and \(2x_1+4x_2+x_3-2x_4=0\).
Form the coefficient matrix and reduce it. Subtracting \(2R_1\) from \(R_2\), scaling the second row by \(\tfrac13\), and then adding the second row to the first gives:
The pivot variables are \(x_1,x_3\), and \(x_2,x_4\) are free. Write \(x_2=s\) and \(x_4=3t\). The RREF equations give \(x_1=-2s+t\) and \(x_3=4t\), so every solution has the form
To check the first vector against the original equations, its left-hand sides are \(-2+2-0+0=0\) and \(2(-2)+4(1)+0-0=0\). For the second vector, they are \(1+0-4+3=0\) and \(2+0+4-6=0\). The vectors are independent because their second and fourth coordinates, respectively, are \((1,0)\) and \((0,3)\); a linear combination equal to zero must have both coefficients zero. They span by the displayed parameterization. Thus they form a basis, and the subspace has dimension \(2\).
Worked Example: A Redundant Equation
Find a basis and dimension for the solutions in \(\mathbb{R}^4\) of \(x_1+x_2+x_3+x_4=0\), \(2x_1+x_2+3x_3+2x_4=0\), and \(3x_1+2x_2+4x_3+3x_4=0\).
Reduce the coefficient matrix. Apply \(R_2\to R_2-2R_1\) and \(R_3\to R_3-3R_1\), then multiply the second row by \(-1\), add it to the third row, and subtract it from the first:
The pivot variables are \(x_1,x_2\); the free variables are \(x_3=s\) and \(x_4=t\). The reduced equations give \(x_1=-2s-t\) and \(x_2=s\). Therefore
For \((-2,1,1,0)^{\top}\), the three original left-hand sides are \(-2+1+1+0=0\), \(-4+1+3+0=0\), and \(-6+2+4+0=0\). For \((-1,0,0,1)^{\top}\), they are \(-1+0+0+1=0\), \(-2+0+0+2=0\), and \(-3+0+0+3=0\). Their third and fourth coordinates show independence: a combination equal to zero has coefficients \(0\) in both those coordinates. The parameterization shows they span, so they form a basis and the dimension is \(2\). The zero row records a redundant equation; it does not introduce another free variable.
Worked Example: Free Variables Need Not Be Adjacent
Find a basis and dimension for the solutions in \(\mathbb{R}^3\) of \(x_1+x_3=0\) and \(x_1+2x_3=0\).
Reducing the coefficient matrix gives:
Columns 1 and 3 are pivot columns, so \(x_1=x_3=0\). Variable \(x_2=t\) is free, even though its column lies between the pivot columns. Thus \(\mathbf{x}=t(0,1,0)^{\top}\). Substitution into the original equations gives \(0+0=0\) in both. A single nonzero vector is independent, and the parameterization shows it spans the solution set. Hence \(\{(0,1,0)^{\top}\}\) is a basis and the dimension is \(1\).
Why the Parameterization Is the Essential Step
The row-reduced equations describe the same subspace as the original equations, but a list of free-variable names is not itself a basis. The basis vectors must be vectors in the original coordinate space \(\mathbb{R}^n\). To construct one, set one free variable to \(1\), set the other free variables to \(0\), and compute every pivot variable from the reduced equations. Repeat for each free variable. The resulting vectors use all \(n\) coordinates and automatically satisfy the original equations because row reduction has preserved the solution set.
For a system with \(n\) variables and \(p\) pivot columns, there are \(n-p\) free variables. The theorem shows that each independent free parameter contributes exactly one basis vector, so the dimension is \(n-p\). This count concerns the solution subspace—not the number of equations as originally written. Equations may be redundant, as in the second example, and a zero row in RREF contributes no pivot.
Common Pitfall: Treating Free Variables as Basis Vectors
Consider the single equation \(x_1+2x_2-x_3=0\) in \(\mathbb{R}^3\). Since \(x_2\) and \(x_3\) are free, a tempting but incorrect answer is that \((0,1,0)^{\top}\) and \((0,0,1)^{\top}\) form a basis. Neither vector satisfies the equation: substituting the first gives \(0+2(1)-0=2\), and substituting the second gives \(0+0-1=-1\). The free variables are parameters, not the coordinates of the basis vectors by themselves.
To correct the calculation, write \(x_2=s\), \(x_3=t\). The equation forces \(x_1=-2s+t\), so
Both vectors satisfy the equation: \(-2+2-0=0\) and \(1+0-1=0\). Their second and third coordinates show that a linear combination equal to zero has both coefficients zero. The corrected vectors are therefore independent and, by the parameterization, span every solution.
Check Your Understanding
For each system, use the coefficient matrix and its RREF to construct and verify a basis.
- Find a basis and dimension for the solutions of \(x_1+x_2+x_3=0\) and \(x_1-x_2+x_3=0\).
- For a homogeneous system in \(\mathbb{R}^5\), the RREF has three pivot columns. How many free variables are there, and what is the dimension of the solution subspace?
- For \(x_1+2x_2-x_3=0\), write the general solution and explain why \((0,1,0)^{\top}\) is not a solution.
- Explain why each vector obtained by setting one free variable to \(1\) and the others to \(0\) satisfies the original homogeneous system.
- What does a zero row in the RREF tell you about pivot variables and free variables?