Tutorials › Linear Algebra › Parametrizing the Null Space

Fundamental Subspaces and Rank · Tutorial 350 of 1000

Parametrizing the Null Space

Use pivot and free variables to construct a basis for a matrix’s null space, then check the parametrization directly.

Intermediate 11 min read

What You'll Learn

  • Translate the homogeneous system for a matrix into equations from its RREF
  • Identify pivot variables and free variables
  • Write the full solution as a linear combination of parameter vectors
  • Construct a null-space basis from the free-variable columns
  • Verify the basis vectors by multiplication and by checking independence
  • Recognize when the null space is the zero subspace and its basis is empty

From a Homogeneous System to a Parametrization

The null space of a matrix records all coefficient vectors that produce the zero vector when multiplied by that matrix. Solving the homogeneous system \(\mathbf{A}\mathbf{x}=\mathbf{0}\) therefore does more than find one solution: it describes every dependence among the columns of \(\mathbf{A}\). Reduced row-echelon form (RREF) makes that description systematic. Pivot variables are determined by the free variables, and each free variable contributes one direction in the null space.

Throughout, \(\mathbf{A}\) is a matrix over \(\mathbb{R}\), and its vectors are columns. The null space is the set \(\operatorname{Nul}\mathbf{A}=\{\mathbf{x}:\mathbf{A}\mathbf{x}=\mathbf{0}\}\). A parametrization describes every vector in this set using freely chosen real parameters. A basis for the null space is an independent list whose linear combinations give exactly that set.

Definition: In the RREF of a matrix, a variable corresponding to a pivot column is a pivot variable. A variable corresponding to a column without a pivot is a free variable. To parametrize the null space, assign arbitrary real values to the free variables and use the RREF equations to determine the pivot variables.

Row reduction is valid here because each elementary row operation preserves the solutions of a homogeneous system. Swapping two equations does not change which vectors satisfy them. Multiplying an equation by a nonzero scalar preserves its solutions, and adding a multiple of one equation to another replaces an equation by an equivalent one. Thus \(\mathbf{A}\mathbf{x}=\mathbf{0}\) and \(\operatorname{rref}(\mathbf{A})\mathbf{x}=\mathbf{0}\) have the same solutions.

Reading Parameters from the RREF

Worked Example: Two Free Variables

Find a parametrization and a basis for the null space of

$$ \mathbf{B}= \begin{bmatrix} 1&1&0&0\\ 0&1&1&0\\ 1&2&1&0 \end{bmatrix}. $$

Apply \(R_3\to R_3-R_1\), then \(R_3\to R_3-R_2\), and finally \(R_1\to R_1-R_2\):

$$ \begin{bmatrix} 1&1&0&0\\ 0&1&1&0\\ 1&2&1&0 \end{bmatrix} \sim \begin{bmatrix} 1&1&0&0\\ 0&1&1&0\\ 0&1&1&0 \end{bmatrix} \sim \begin{bmatrix} 1&1&0&0\\ 0&1&1&0\\ 0&0&0&0 \end{bmatrix} \sim \begin{bmatrix} 1&0&-1&0\\ 0&1&1&0\\ 0&0&0&0 \end{bmatrix}. $$

The pivot columns are 1 and 2, so \(x_1,x_2\) are pivot variables. The free variables are \(x_3,x_4\). The two nonzero equations are \(x_1-x_3=0\) and \(x_2+x_3=0\). Set \(x_3=s\) and \(x_4=t\), where \(s,t\in\mathbb{R}\). Then \(x_1=s\), \(x_2=-s\), and

$$ \mathbf{x} = \begin{bmatrix}s\\-s\\s\\t\end{bmatrix} = s\begin{bmatrix}1\\-1\\1\\0\end{bmatrix} +t\begin{bmatrix}0\\0\\0\\1\end{bmatrix}. $$

Consequently, the null space is the span of the two displayed vectors. To check them in the original system, multiply each by \(\mathbf{B}\). For the first vector, the three row products are \(1-1+0+0=0\), \(0-1+1+0=0\), and \(1-2+1+0=0\). For the second vector, all three row products are \(0\), since the fourth column of \(\mathbf{B}\) is zero. Both vectors are in the null space. They are independent: in a linear combination of them equal to \(\mathbf{0}\), the third coordinate gives the coefficient of the first vector as zero, and the fourth coordinate gives the coefficient of the second as zero. They therefore form a basis.

The free-variable values are the coefficients in this particular parametrization. Each parameter vector is obtained by setting its own free variable to \(1\), setting the other free variables to \(0\), and solving for the pivot variables. This choice makes the parameters easy to read back from the corresponding free coordinates of \(\mathbf{x}\).

The Parameter-Vector Basis Theorem

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and let \(\mathbf{R}=\operatorname{rref}(\mathbf{A})\). For each free-variable column \(j\), set \(x_j=1\) and all other free variables to \(0\), then solve \(\mathbf{R}\mathbf{x}=\mathbf{0}\) for the pivot variables. Call the resulting vector \(\mathbf{z}_j\). Then the vectors \(\mathbf{z}_j\), one for each free-variable column, form a basis for \(\operatorname{Nul}\mathbf{A}\). If there are no free-variable columns, the basis is the empty list and the null space is \(\{\mathbf{0}\}\).

Proof. Elementary row operations preserve the solutions of a homogeneous system, so \(\operatorname{Nul}\mathbf{A}=\operatorname{Nul}\mathbf{R}\). Consider any solution \(\mathbf{x}\) of \(\mathbf{R}\mathbf{x}=\mathbf{0}\). Its free-variable coordinates can be assigned arbitrarily, and the pivot equations then determine the pivot-variable coordinates. For each free column \(j\), the vector \(\mathbf{z}_j\) has free coordinate \(1\) in position \(j\), and \(0\) in every other free position. The vector \(\sum_j x_j\mathbf{z}_j\), where the sum is over the free columns, therefore has the same free coordinates as \(\mathbf{x}\). Both vectors solve the same pivot equations, which determine each pivot variable from the free variables, so their pivot coordinates also agree. Hence \(\mathbf{x}=\sum_j x_j\mathbf{z}_j\), proving that these vectors span the null space. For independence, suppose \(\sum_j c_j\mathbf{z}_j=\mathbf{0}\). In the free coordinate corresponding to \(j\), every vector in this sum has coordinate \(0\) except \(\mathbf{z}_j\), which has coordinate \(1\). That coordinate of the sum is therefore \(c_j\), so \(c_j=0\) for every free column. Thus the vectors are independent. If there are no free columns, every variable is a pivot variable and the homogeneous RREF system forces every variable to be \(0\); the null space is \(\{\mathbf{0}\}\), which has the empty list as a basis. \(\square\)

This proof gives two direct checks on a proposed parametrization: every parameter vector must solve the original homogeneous system, and their free-variable coordinates must force every coefficient in a zero linear combination to vanish. The spanning argument is also essential. Checking only that proposed vectors lie in the null space does not show that they account for every solution.

A Second Parametrization, with Fractions

Worked Example: Pivot Equations with Fractions

Find a basis for the null space of

$$ \mathbf{A}= \begin{bmatrix} 1&2&-1&3\\ 2&4&1&7 \end{bmatrix}. $$

Apply \(R_2\to R_2-2R_1\), scale the second row by \(\tfrac13\), and then apply \(R_1\to R_1+R_2\):

$$ \begin{bmatrix} 1&2&-1&3\\ 2&4&1&7 \end{bmatrix} \sim \begin{bmatrix} 1&2&-1&3\\ 0&0&3&1 \end{bmatrix} \sim \begin{bmatrix} 1&2&-1&3\\ 0&0&1&\tfrac13 \end{bmatrix} \sim \begin{bmatrix} 1&2&0&\tfrac{10}{3}\\ 0&0&1&\tfrac13 \end{bmatrix}. $$

The pivot variables are \(x_1,x_3\), and \(x_2,x_4\) are free. The equations give \(x_1=-2x_2-\tfrac{10}{3}x_4\) and \(x_3=-\tfrac13x_4\). Set \(x_2=s\) and \(x_4=t\). Then

$$ \mathbf{x} = \begin{bmatrix} -2s-\tfrac{10}{3}t\\ s\\ -\tfrac13t\\ t \end{bmatrix} = s\begin{bmatrix}-2\\1\\0\\0\end{bmatrix} +t\begin{bmatrix}-\tfrac{10}{3}\\0\\-\tfrac13\\1\end{bmatrix}. $$

Check the first vector against the original matrix: the row products are \(-2+2+0+0=0\) and \(-4+4+0+0=0\). For the second vector they are \(-\tfrac{10}{3}+\tfrac13+3=0\) and \(-\tfrac{20}{3}-\tfrac13+7=-7+7=0\). Both vectors lie in the null space. They are independent because their second coordinates are \(1,0\), respectively, and their fourth coordinates are \(0,1\), respectively: a linear combination equal to zero must have both coefficients zero. The parametrization shows that they span the entire null space, so they form a basis.

When There Are No Free Variables

Worked Example: The Zero Null Space

Find the null space and a basis for it when

$$ \mathbf{C}= \begin{bmatrix} 1&2\\ 2&5\\ 1&1 \end{bmatrix}. $$

First apply \(R_2\to R_2-2R_1\) and \(R_3\to R_3-R_1\). Then apply \(R_3\to R_3+R_2\), followed by \(R_1\to R_1-2R_2\):

$$ \begin{bmatrix} 1&2\\ 2&5\\ 1&1 \end{bmatrix} \sim \begin{bmatrix} 1&2\\ 0&1\\ 0&-1 \end{bmatrix} \sim \begin{bmatrix} 1&2\\ 0&1\\ 0&0 \end{bmatrix} \sim \begin{bmatrix} 1&0\\ 0&1\\ 0&0 \end{bmatrix}. $$

Both columns are pivot columns. The homogeneous system in RREF is \(x_1=0,\ x_2=0\), so \(\operatorname{Nul}\mathbf{C}=\{\mathbf{0}\}\). Its basis is the empty list: the span of the empty list is \(\{\mathbf{0}\}\), and there can be no nontrivial linear combination of an empty list that violates independence. As a direct check, the only proposed null-space vector is \(\mathbf{0}\), and \(\mathbf{C}\mathbf{0}=\mathbf{0}\).

Common Mistake: Reversing a Sign

A frequent error is to copy the coefficient of a free variable from a pivot equation without moving it to the other side. In the second example, the first equation is \(x_1+2x_2+\tfrac{10}{3}x_4=0\). Setting \(x_2=1\) and \(x_4=0\) gives \(x_1=-2\), not \(x_1=2\). The incorrect candidate \((2,1,0,0)^\top\) does not solve the original system: its row products are \(2+2+0+0=4\) and \(4+4+0+0=8\), not zero. The corrected vector \((-2,1,0,0)^\top\) gives row products \(-2+2+0+0=0\) and \(-4+4+0+0=0\).

Another useful safeguard is to verify vectors using the original matrix, not only the RREF. Row operations preserve the solution set, so an RREF solution should pass that check; multiplying back can expose a sign error or an arithmetic mistake in the row reduction.

Why the Parametrization Matters

A vector in \(\operatorname{Nul}\mathbf{A}\) gives coefficients for a combination of the columns of \(\mathbf{A}\) that equals \(\mathbf{0}\). Thus a null-space basis provides independent parameter vectors that describe all such coefficient choices. The method also tells exactly how to construct a basis rather than merely confirming that a candidate list works: identify free columns, turn on one free variable at a time, solve for the pivots, and verify the result.

1
Reduce.
Find \(\operatorname{rref}(\mathbf{A})\); elementary row operations preserve the solutions of \(\mathbf{A}\mathbf{x}=\mathbf{0}\).
2
Identify variables.
Mark the pivot variables and assign a separate parameter to each free variable.
3
Build vectors.
Write the solution as a linear combination, with one parameter vector for each free variable.
4
Check.
Multiply each basis vector by the original matrix and use its free coordinates to check independence.

Check Your Understanding

For each problem, use the RREF equations to account for every solution and check any proposed basis vectors by multiplication.

  1. Find a parametrization and basis for \(\operatorname{Nul}\begin{bmatrix}1&0&2\\0&1&-1\end{bmatrix}\).
  2. For the RREF \(\begin{bmatrix}1&0&3&0\\0&1&-2&0\\0&0&0&1\end{bmatrix}\), identify the free variable and construct a basis vector for the null space.
  3. Why does a linear combination of the parameter vectors recover every solution, not just some solutions?
  4. If every column of the RREF is a pivot column, what is the null space, and what is its basis?
  5. For \(\mathbf{D}=\begin{bmatrix}1&1&0\\2&2&0\end{bmatrix}\), find a null-space basis and verify each vector by multiplication.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon