Ma · Mathematics

How to Find a Basis of Solutions to a Homogeneous System

Published By the 9to5Science editorial team

At a glance

  1. 1. Write the matrix equation

    Express the homogeneous system as Ax = 0 and identify the variables corresponding to the columns of A.

  2. 2. Reduce the matrix

    Use Gaussian elimination to find the pivot columns and identify the free variables.

  3. 3. Choose free variables

    Set one free variable to 1 and the others to 0, then solve for the pivot variables.

  4. 4. Form the basis

    Use each resulting solution vector as a basis vector; every solution is a linear combination of them.

Advertisement

A homogeneous linear system has the form Ax=0A\mathbf{x}=\mathbf{0}, where AA is a matrix and the right-hand side is the zero vector. Its solutions form a subspace, called the null space or kernel of AA. To find a set of basic solutions, you usually want a basis for that subspace: a collection of independent solution vectors from which every solution can be built.

The practical method is to row-reduce the coefficient matrix, write the pivot variables in terms of the free variables, and then construct one solution vector for each free variable. The number of vectors you obtain is the dimension of the null space.

What “basic solutions” means

In a typical linear algebra exercise, “basic solutions” means a basis for all solutions of the homogeneous system. Each basis vector must satisfy the system, the vectors must be linearly independent, and every solution must be a linear combination of them.

This is different from the term basic solution in linear programming, which has a more specific meaning involving selected variables and constraints. Unless the problem mentions linear programming, the null-space basis interpretation is generally intended.

The method

Suppose the system has nn variables, so AA has nn columns.

  1. Row-reduce AA to echelon form or reduced row-echelon form. Row operations do not change the solutions of Ax=0A\mathbf{x}=\mathbf{0}.
  2. Mark the pivot columns. Variables corresponding to those columns are pivot variables; the remaining variables are free variables.
  3. Solve the reduced equations for the pivot variables in terms of the free variables.
  4. For each free variable, set it to 11 and set all other free variables to 00. Substitute these values into the pivot-variable formulas to get a solution vector.
  5. Collect the resulting vectors. They form a basis for the solution space.

If there are kk free variables, this produces kk basis vectors. By the rank–nullity theorem, k=n−rank⁡(A)k=n-\operatorname{rank}(A). If there are no free variables, the null space contains only the zero vector, and its basis is the empty set.

Worked example

Find a basis for the solutions of

x1+2x2−x3+x4=0,2x1+4x2+x3+3x4=0.\begin{aligned} x_1+2x_2-x_3+x_4&=0,\\ 2x_1+4x_2+x_3+3x_4&=0. \end{aligned}

The coefficient matrix is

A=[12−112413].A=\begin{bmatrix} 1&2&-1&1\\ 2&4&1&3 \end{bmatrix}.

Subtract twice the first row from the second. The resulting system is

x1+2x2−x3+x4=0,3x3+x4=0.\begin{aligned} x_1+2x_2-x_3+x_4&=0,\\ 3x_3+x_4&=0. \end{aligned}

The pivot variables are x1x_1 and x3x_3; the free variables are x2x_2 and x4x_4. From the second equation,

x3=−x43.x_3=-\frac{x_4}{3}.

Substituting this into the first equation gives

x1=−2x2−4x43.x_1=-2x_2-\frac{4x_4}{3}.

Let x2=sx_2=s and x4=tx_4=t. Then every solution has the form

x=[−2s−4t/3s−t/3t]=s[−2100]+t[−4/30−1/31].\begin{aligned} \mathbf{x} &=\begin{bmatrix}-2s-4t/3\\s\\-t/3\\t\end{bmatrix}\\ &=s\begin{bmatrix}-2\\1\\0\\0\end{bmatrix} +t\begin{bmatrix}-4/3\\0\\-1/3\\1\end{bmatrix}. \end{aligned}

Therefore one basis is

{[−2100],[−4/30−1/31]}.\left\{ \begin{bmatrix}-2\\1\\0\\0\end{bmatrix}, \begin{bmatrix}-4/3\\0\\-1/3\\1\end{bmatrix} \right\}.

You can multiply a basis vector by any nonzero scalar without changing the basis. For example, the second vector can be replaced by (−4,0,−1,3)T(-4,0,-1,3)^T, which avoids fractions. Both vectors satisfy the original equations, and the two free variables show that every solution is their linear combination.

Why the vectors form a basis

Each constructed vector is a solution because its free-variable values were substituted into the equations for the pivot variables. The vectors are independent because each has a 11 in its own free-variable position and 00 in the other free-variable positions. Finally, any solution is obtained by choosing values for all the free variables, so it is a linear combination of the constructed vectors.

These facts establish all three requirements: the vectors belong to the solution space, are linearly independent, and span the solution space.

Common mistakes

  • Including the zero vector in the basis. The zero vector is always a solution, but it cannot be part of a linearly independent set. It is not a basis vector.
  • Choosing pivot variables as the parameters. In the standard procedure, free variables are the parameters. Pivot variables are solved in terms of them.
  • Making a separate vector for every variable. Only free variables produce basis vectors. Pivot variables are determined by the free variables.
  • Forgetting the signs or fractions. Substitute each proposed vector into the original equations, not just the row-reduced equations, as a check.
  • Assuming there is always a nonzero solution. If every variable is a pivot variable, then the only solution is x=0\mathbf{x}=\mathbf{0}.

A quick check on your final answer is to multiply the original matrix by each proposed basis vector. Every product must equal the zero vector.

References

  1. Linear Algebra and Its Applications — David C. Lay, Steven R. Lay, and Judi J. McDonald

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.