Tutorials › Linear Algebra › Building Nonhomogeneous Solutions From One Particular Solution

Span and the Column Space View · Tutorial 150 of 1000

Building Nonhomogeneous Solutions From One Particular Solution

Use homogeneous solutions as directions for building and verifying solutions to the same nonhomogeneous system.

Beginner 9 min read

What You'll Learn

  • Identify a particular solution and a homogeneous solution for the same matrix.
  • Prove that adding any homogeneous solution preserves the right-hand side.
  • Combine several homogeneous solutions using arbitrary real coefficients.
  • Compute and check explicit families of solutions in small systems.
  • Recognize when a sign error means a proposed direction is not homogeneous.

From One Solution to More Solutions

A nonhomogeneous system \(\mathbf{A}\mathbf{x}=\mathbf{b}\) asks for vectors whose matrix product is a specified vector \(\mathbf{b}\). If we already know one solution, it can serve as a starting point for constructing others. The key is to change that solution only by a vector that the matrix sends to zero: such a change does not alter the product.

Throughout, let \(\mathbf{A}\in\mathbb{R}^{m\times n}\) and \(\mathbf{b}\in\mathbb{R}^m\). A solution \(\mathbf{x}_p\in\mathbb{R}^n\) of \(\mathbf{A}\mathbf{x}=\mathbf{b}\) is called a particular solution. A vector \(\mathbf{z}\in\mathbb{R}^n\) is a homogeneous solution when \(\mathbf{A}\mathbf{z}=\mathbf{0}\); equivalently, \(\mathbf{z}\in\operatorname{Nul}\mathbf{A}\). The subscripts distinguish the chosen particular solution from other possible solutions.

Theorem: Suppose \(\mathbf{A}\mathbf{x}_p=\mathbf{b}\), and let \(\mathbf{z}_1,\dots,\mathbf{z}_k\in\mathbb{R}^n\) satisfy \(\mathbf{A}\mathbf{z}_i=\mathbf{0}\) for each \(i\). For any real numbers \(c_1,\dots,c_k\), the vector \(\mathbf{x}_p+c_1\mathbf{z}_1+\cdots+c_k\mathbf{z}_k\) solves \(\mathbf{A}\mathbf{x}=\mathbf{b}\).

Proof. By linearity of matrix-vector multiplication, the matrix applied to the constructed vector is

$$ \mathbf{A}\left(\mathbf{x}_p+\sum_{i=1}^{k}c_i\mathbf{z}_i\right) =\mathbf{A}\mathbf{x}_p+\sum_{i=1}^{k}c_i\mathbf{A}\mathbf{z}_i =\mathbf{b}+\sum_{i=1}^{k}c_i\mathbf{0} =\mathbf{b}. $$

Thus the constructed vector satisfies the required equation. \(\square\)

The theorem gives a reliable way to produce solutions: start with one known solution and add any linear combination of known homogeneous solutions. It makes a one-way guarantee: every vector built this way works. Whether this construction accounts for every solution is a separate question, so we will not assume that conclusion here. In computations, the homogeneous solutions are often found by describing the null space with free parameters, as in the earlier material on homogeneous systems.

One Homogeneous Direction

Worked Example: Two Homogeneous Directions in \(\mathbb{R}^3\)

Consider the system \(\mathbf{A}\mathbf{x}=\mathbf{b}\) with

$$ \mathbf{A}=\begin{bmatrix}1&2&-1\\2&4&-2\end{bmatrix}, \qquad \mathbf{b}=\begin{bmatrix}3\\6\end{bmatrix}. $$

First check a particular solution. Choose \(\mathbf{x}_p=\begin{bmatrix}3\\0\\0\end{bmatrix}\). Then

$$ \mathbf{A}\mathbf{x}_p =\begin{bmatrix}1&2&-1\\2&4&-2\end{bmatrix} \begin{bmatrix}3\\0\\0\end{bmatrix} =\begin{bmatrix}3\\6\end{bmatrix} =\mathbf{b}. $$

To find homogeneous directions, solve \(\mathbf{A}\mathbf{z}=\mathbf{0}\). Row reduction gives

$$ \begin{bmatrix}1&2&-1\\2&4&-2\end{bmatrix} \xrightarrow{R_2\to R_2-2R_1} \begin{bmatrix}1&2&-1\\0&0&0\end{bmatrix}. $$

Writing \(\mathbf{z}=\begin{bmatrix}z_1\\z_2\\z_3\end{bmatrix}\), the remaining equation is \(z_1+2z_2-z_3=0\), so \(z_1=-2z_2+z_3\). Set \(z_2=s\) and \(z_3=t\), where \(s,t\in\mathbb{R}\). Then

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

Both directions are indeed homogeneous. For the first, \(\mathbf{A}\begin{bmatrix}-2\\1\\0\end{bmatrix}=\begin{bmatrix}-2+2\\-4+4\end{bmatrix}=\mathbf{0}\); for the second, \(\mathbf{A}\begin{bmatrix}1\\0\\1\end{bmatrix}=\begin{bmatrix}1-1\\2-2\end{bmatrix}=\mathbf{0}\). The theorem therefore gives the following solutions, for every \(s,t\in\mathbb{R}\):

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

Check: multiplying the displayed vector by \(\mathbf{A}\) gives first entry \((3-2s+t)+2s-t=3\) and second entry \(2(3-2s+t)+4s-2t=6\). Hence \(\mathbf{A}\mathbf{x}=\begin{bmatrix}3\\6\end{bmatrix}\) for all \(s,t\), as required.

This example illustrates how free parameters from the homogeneous equation become adjustable directions from the particular solution. A choice such as \(s=1,t=0\) gives \(\begin{bmatrix}1\\1\\0\end{bmatrix}\); choosing \(s=0,t=1\) gives \(\begin{bmatrix}4\\0\\1\end{bmatrix}\). Both are different vectors, and the direct multiplication check confirms that both produce the same right-hand side.

Combining and Checking Solutions

Worked Example: A One-Parameter Family

Let

$$ \mathbf{A}=\begin{bmatrix}1&1\\2&2\\-1&-1\end{bmatrix}, \qquad \mathbf{b}=\begin{bmatrix}4\\8\\-4\end{bmatrix}. $$

The vector \(\mathbf{x}_p=\begin{bmatrix}4\\0\end{bmatrix}\) is a particular solution, since

$$ \mathbf{A}\mathbf{x}_p =\begin{bmatrix}4\\8\\-4\end{bmatrix} =\mathbf{b}. $$

The homogeneous equation has the same row pattern without the right-hand side. Its first row gives \(z_1+z_2=0\), so \(z_1=-z_2\). Taking \(z_2=t\) yields \(\mathbf{z}=t\begin{bmatrix}-1\\1\end{bmatrix}\). The direction is homogeneous because

$$ \mathbf{A}\begin{bmatrix}-1\\1\end{bmatrix} =\begin{bmatrix}-1+1\\-2+2\\1-1\end{bmatrix} =\begin{bmatrix}0\\0\\0\end{bmatrix}. $$

Consequently, for every \(t\in\mathbb{R}\), the theorem constructs

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

Check: the three entries of \(\mathbf{A}\mathbf{x}\) are \((4-t)+t=4\), \(2(4-t)+2t=8\), and \(-(4-t)-t=-4\). Thus the result is \(\mathbf{b}\) for every real \(t\). For example, \(t=2\) gives \(\mathbf{x}=\begin{bmatrix}2\\2\end{bmatrix}\), and \(\mathbf{A}\begin{bmatrix}2\\2\end{bmatrix}=\begin{bmatrix}4\\8\\-4\end{bmatrix}\).

It is not necessary to use a single homogeneous direction at a time. The theorem allows any real coefficients on any finite list of homogeneous vectors. The coefficients can be zero, negative, or positive; the only condition is that each direction being added must be sent to \(\mathbf{0}\) by the same matrix \(\mathbf{A}\).

Worked Example: Changing the Particular Solution

Consider

$$ \mathbf{A}=\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}, \qquad \mathbf{b}=\begin{bmatrix}2\\-1\end{bmatrix}. $$

Choose \(\mathbf{x}_p=\begin{bmatrix}2\\-1\\0\end{bmatrix}\). Direct multiplication gives

$$ \mathbf{A}\mathbf{x}_p =\begin{bmatrix}2+0\\-1+0\end{bmatrix} =\begin{bmatrix}2\\-1\end{bmatrix} =\mathbf{b}. $$

For a homogeneous vector \(\mathbf{z}=\begin{bmatrix}z_1\\z_2\\z_3\end{bmatrix}\), the equations are \(z_1+z_3=0\) and \(z_2+z_3=0\). Taking \(z_3=t\) gives \(z_1=-t\) and \(z_2=-t\), so \(\mathbf{z}=t\begin{bmatrix}-1\\-1\\1\end{bmatrix}\). Verify the direction:

$$ \mathbf{A}\begin{bmatrix}-1\\-1\\1\end{bmatrix} =\begin{bmatrix}-1+1\\-1+1\end{bmatrix} =\begin{bmatrix}0\\0\end{bmatrix}. $$

Every vector of the constructed form is therefore a solution:

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

Check: the first row of \(\mathbf{A}\mathbf{x}\) is \((2-t)+t=2\), and the second is \((-1-t)+t=-1\). In particular, at \(t=2\) the constructed vector is \(\begin{bmatrix}0\\-3\\2\end{bmatrix}\), and its product is \(\begin{bmatrix}0+2\\-3+2\end{bmatrix}=\begin{bmatrix}2\\-1\end{bmatrix}\).

What the Construction Does—and Does Not—Require

The operation depends on two checks, both of which matter. First, \(\mathbf{x}_p\) must solve the nonhomogeneous equation with the specified right-hand side. Second, every added direction must solve the homogeneous equation for the same coefficient matrix. If either check fails, linearity does not produce the desired conclusion. The argument also works when a homogeneous direction is multiplied by any real scalar, because the matrix sends every scalar multiple of a zero-product vector to zero.

This construction is useful when a system has already yielded one solution and its homogeneous solutions have been described using free parameters. Rather than solving the nonhomogeneous equations again for each new answer, we can keep the particular solution fixed and adjust its homogeneous components. Each adjustment leaves the image under \(\mathbf{A}\) unchanged, so all constructed vectors have the same right-hand side.

It is important not to confuse a valid construction with a completeness claim. The theorem proved here guarantees that adding homogeneous solutions produces solutions. It does not, by itself, establish that every solution of the nonhomogeneous system must arise in this way. A proof of that stronger statement needs an additional argument. For the present method, verify the two inputs and use the theorem to certify each output.

Common Mistake: A Sign Error in a Direction

In the first worked example, the homogeneous equation is \(z_1+2z_2-z_3=0\). If we choose \(z_2=1\) and \(z_3=0\), this equation requires \(z_1=-2\), not \(z_1=2\). A mistaken sign leads to the proposed direction \(\widetilde{\mathbf{z}}=\begin{bmatrix}2\\1\\0\end{bmatrix}\), but

$$ \mathbf{A}\widetilde{\mathbf{z}} =\begin{bmatrix}1&2&-1\\2&4&-2\end{bmatrix} \begin{bmatrix}2\\1\\0\end{bmatrix} =\begin{bmatrix}4\\8\end{bmatrix} \ne\begin{bmatrix}0\\0\end{bmatrix}. $$

Therefore \(\widetilde{\mathbf{z}}\) is not a homogeneous solution and cannot be used as a direction in the construction. For instance, adding it to \(\mathbf{x}_p=\begin{bmatrix}3\\0\\0\end{bmatrix}\) gives \(\begin{bmatrix}5\\1\\0\end{bmatrix}\), whose product is \(\begin{bmatrix}7\\14\end{bmatrix}\), not \(\mathbf{b}=\begin{bmatrix}3\\6\end{bmatrix}\). The correction is to check each proposed direction by computing \(\mathbf{A}\mathbf{z}\) before adding it to a particular solution.

A second practical check is to keep vector dimensions visible. If \(\mathbf{A}\) has \(n\) columns, then both the particular solution and every homogeneous direction must be in \(\mathbb{R}^n\); their sum is then defined and remains in the domain of \(\mathbf{A}\). The right-hand side, by contrast, must be in \(\mathbb{R}^m\), matching the number of rows of \(\mathbf{A}\).

Check Your Understanding

For each proposed construction, identify the particular solution and homogeneous direction, and use matrix multiplication to check the result.

  1. If \(\mathbf{A}\mathbf{x}_p=\mathbf{b}\) and \(\mathbf{A}\mathbf{z}=\mathbf{0}\), show directly that \(\mathbf{x}_p-3\mathbf{z}\) solves \(\mathbf{A}\mathbf{x}=\mathbf{b}\).
  2. For \(\mathbf{A}=\begin{bmatrix}1&1\\2&2\end{bmatrix}\) and \(\mathbf{b}=\begin{bmatrix}5\\10\end{bmatrix}\), find one particular solution and one nonzero homogeneous direction, then construct a one-parameter family of solutions.
  3. For the matrix in question 2, test whether \(\begin{bmatrix}1\\0\end{bmatrix}\) is a valid homogeneous direction. Show the product that decides.
  4. In the first worked example, substitute \(s=1\) and \(t=2\) into the constructed vector and verify its matrix product.
  5. State precisely what the construction theorem guarantees, and what additional claim it does not establish by itself.

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