Linear AlgebraLinear Systems7 of 8
Linear Systems · 7

The Complete Solution to Ax = b

We already know how to find every vector that solves Ax=0Ax = \hitzero{0}, and now we want a formula that gives every solution to Ax=bAx = \hitb{b} when the right-hand side is a nonzero target vector b\hitb{b}.

Why x = xₚ + xₙ Gives Every Solution
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
x+2y=5x + 2y = \hitb{5}
all [xy]=  ?\text{all } \begin{bmatrix} x \\ y \end{bmatrix} = \;?
Text solution
Set the free variable to 00 to find one starting solution xp\hitb{x_p}In x+2y=5x + 2y = \hitb{5}, xx is the pivot variable and yy is the free variable, so setting y=0y = 0 gives a single vector that makes x+2yx + 2y equal to 5\hitb{5}.
y=0  ⟹  x=5,xp=[50]\displaystyle \begin{aligned} y = 0 &\implies x = 5, \\ \hitb{x_p} &= \hitb{\begin{bmatrix} 5 \\ 0 \end{bmatrix}} \end{aligned}
Solve Ax=0Ax = \hitzero{0} to find the null space part xn\hitzero{x_n}Any change from [50]\hitb{\begin{bmatrix} 5 \\ 0 \end{bmatrix}} that keeps x+2yx + 2y at 5\hitb{5} must add 0\hitzero{0} to the sum, so it satisfies x+2y=0x + 2y = \hitzero{0}. Setting the free variable to y=1y = 1 gives one direction, and any multiple of it works too.
y=1  ⟹  x=−2,xn=c[−21]\displaystyle \begin{aligned} y = 1 &\implies x = -2, \\ \hitzero{x_n} &= \hitzero{c\begin{bmatrix} -2 \\ 1 \end{bmatrix}} \end{aligned}
Add xp\hitb{x_p} and xn\hitzero{x_n} for the complete solutionEvery vector of this form makes x+2yx + 2y equal to 5\hitb{5}, because xp\hitb{x_p} gives 5\hitb{5} and xn\hitzero{x_n} gives 0\hitzero{0}. And because any other solution xx satisfies A(x−xp)=b−b=0A\hitzero{(x - x_p)} = \hitb{b} - \hitb{b} = \hitzero{0}, no solution can be missed.
x=[50]⏟particular solution xp(one vector with Axp=b)+c[−21]⏟null space part xn(all vectors with Axn=0)\displaystyle \begin{aligned} x &= \underbrace{\hitb{\begin{bmatrix} 5 \\ 0 \end{bmatrix}}}_{\substack{\text{particular solution } \hitb{x_p} \\ \text{(one vector with } A\hitb{x_p} = \hitb{b}\text{)}}} \\ &\quad + \underbrace{\hitzero{c\begin{bmatrix} -2 \\ 1 \end{bmatrix}}}_{\substack{\text{null space part } \hitzero{x_n} \\ \text{(all vectors with } A\hitzero{x_n} = \hitzero{0}\text{)}}} \end{aligned}

So the complete solution is the line x=[50]+c[−21]x = \hitb{\begin{bmatrix} 5 \\ 0 \end{bmatrix}} + \hitzero{c\begin{bmatrix} -2 \\ 1 \end{bmatrix}}.

Let's see how this shifted line looks in the plane.

From a starting solution, the total stays the same only when you step along the null space direction, where the step adds nothing.
1

Why Free Variables Can Be Set to Zero

To see why setting the free variables to 00 always works when a system has a solution, let's look at what the columns of AA are doing in a system of three equations and four unknowns:

1x1+2x2+1x3+3x4=51x1+2x2+2x3+5x4=82x1+4x2+3x3+8x4=13\displaystyle \begin{aligned} \pivA{1x_1} + 2x_2 + \pivB{1x_3} + 3x_4 &= \hitb{5} \\ \pivA{1x_1} + 2x_2 + \pivB{2x_3} + 5x_4 &= \hitb{8} \\ \pivA{2x_1} + 4x_2 + \pivB{3x_3} + 8x_4 &= \hitb{13} \end{aligned}
Pivot Columns and Redundant Free Columns
x1[112]+x2[224]+  x3[123]+x4[358]=[5813]\displaystyle \begin{aligned} &\pivA{x_1 \begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix}} + x_2 \begin{bmatrix} 2 \\ 2 \\ 4 \end{bmatrix} \\ +\; &\pivB{x_3 \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}} + x_4 \begin{bmatrix} 3 \\ 5 \\ 8 \end{bmatrix} = \hitb{\begin{bmatrix} 5 \\ 8 \\ 13 \end{bmatrix}} \end{aligned}
[224]=  ?[358]=  ?\displaystyle \begin{bmatrix} 2 \\ 2 \\ 4 \end{bmatrix} = \;? \qquad \begin{bmatrix} 3 \\ 5 \\ 8 \end{bmatrix} = \;?

Writing the system by columns shows how the four variables scale the four columns of AA to reach b\hitb{b}:

x1[112]⏟pivot col.+x2[224]⏟free col.2(Col. 1)+x3[123]⏟pivot col.+x4[358]⏟free col.Col. 1+2(Col. 3)=[5813]\displaystyle \begin{aligned} &\pivA{x_1 \underbrace{\begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix}}_{\text{pivot col.}}} + x_2 \underbrace{\begin{bmatrix} 2 \\ 2 \\ 4 \end{bmatrix}}_{\substack{\text{free col.} \\ 2(\pivA{\text{Col. 1}})}} \\ &\quad + \pivB{x_3 \underbrace{\begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}}_{\text{pivot col.}}} + x_4 \underbrace{\begin{bmatrix} 3 \\ 5 \\ 8 \end{bmatrix}}_{\substack{\text{free col.} \\ \pivA{\text{Col. 1}} + 2(\pivB{\text{Col. 3}})}} = \hitb{\begin{bmatrix} 5 \\ 8 \\ 13 \end{bmatrix}} \end{aligned}

Because the free columns are built out of the pivot columns, they don't add any new directions in space: if b\hitb{b} can be reached at all, the pivot columns can reach it on their own with x2=0x_2 = 0 and x4=0x_4 = 0, while each free column gives one independent way to combine the columns to get 0\hitzero{0}.

2

Finding Which Target Vectors bb Can Be Reached

Even though the columns of AA have three components, the two pivot columns only span a flat 2D plane inside 3D space. We want to find the exact condition on b=[b1b2b3]\hitb{b} = \hitb{\begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}} for b\hitb{b} to lie on that plane so Ax=bAx = \hitb{b} has a solution.

Which Target Vectors b Can Be Reached
b1\htmlClass{lc-mute}{b_1}
b2\htmlClass{lc-mute}{b_2}
b3\htmlClass{lc-mute}{b_3}
[123]\htmlClass{lc-pink}{\begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}}
[112]\htmlClass{lc-green}{\begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix}}
b=[b1b2b3]\hitb{b} = \hitb{\begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}}
on the plane\text{on the plane}
when  ?\text{when}\;?
Text solution
Clear below the first pivotKeep b1,b2,b3\hitb{b_1}, \hitb{b_2}, \hitb{b_3} in the augmented column and subtract multiples of Row 1 from Rows 2 and 3.
[1213b11225b22438b3]→R2←R2−R1R3←R3−2R1[1213b10012b2−b10012b3−2b1]\displaystyle \begin{aligned} &\left[\begin{array}{cccc|c} \pivA{1} & 2 & 1 & 3 & \hitb{b_1} \\ 1 & 2 & 2 & 5 & \hitb{b_2} \\ 2 & 4 & 3 & 8 & \hitb{b_3} \end{array}\right] \\ &\xrightarrow{\substack{R_2 \leftarrow R_2 - R_1 \\ R_3 \leftarrow R_3 - 2R_1}} \\ &\left[\begin{array}{cccc|c} \pivA{1} & 2 & 1 & 3 & \hitb{b_1} \\ 0 & 0 & \pivB{1} & 2 & \hitb{b_2 - b_1} \\ 0 & 0 & 1 & 2 & \hitb{b_3 - 2b_1} \end{array}\right] \end{aligned}
Clear below the second pivotColumn 2 has no pivot, so move to the second pivot in Column 3 and subtract Row 2 from Row 3.
[1213b10012b2−b10000b3−b1−b2]\displaystyle \left[\begin{array}{cccc|c} \pivA{1} & 2 & 1 & 3 & \hitb{b_1} \\ 0 & 0 & \pivB{1} & 2 & \hitb{b_2 - b_1} \\ 0 & 0 & 0 & 0 & \hitb{b_3 - b_1 - b_2} \end{array}\right]
Set the zero row equal to 00Since the left side of the bottom row is 0x1+0x2+0x3+0x4=00x_1 + 0x_2 + 0x_3 + 0x_4 = 0, the right side must also equal 00 for the system to have a solution.
b3−b1−b2\displaystyle \hitb{b_3 - b_1 - b_2} =0(or b3=b1+b2)\displaystyle = 0 \quad (\text{or } \hitb{b_3} = \hitb{b_1} + \hitb{b_2})

So Ax=bAx = \hitb{b} has a solution exactly when b3=b1+b2\hitb{b_3} = \hitb{b_1} + \hitb{b_2}: the target b=[5810]\hitb{b} = \hitb{\begin{bmatrix} 5 \\ 8 \\ 10 \end{bmatrix}} gives 0=−30 = \miss{-3} and cannot be reached, whereas b=[5813]\hitb{b} = \hitb{\begin{bmatrix} 5 \\ 8 \\ 13 \end{bmatrix}} gives 0=00 = 0 and lies on the plane.

Here is how the condition b3=b1+b2\hitb{b_3} = \hitb{b_1} + \hitb{b_2} picks out the plane of reachable vectors b\hitb{b} in 3D space.

The pivot columns can only reach vectors on their plane, which is right when the bottom zero row ends in zero.
3

Finding the Complete Solution by Row Reduction

Now that we know b=[5813]\hitb{b} = \hitb{\begin{bmatrix} 5 \\ 8 \\ 13 \end{bmatrix}} satisfies b3=b1+b2\hitb{b_3} = \hitb{b_1} + \hitb{b_2}, we want to find the complete solution x=xp+xnx = \hitb{x_p} + \hitzero{x_n} for the system.

Finding the Complete Solution by Row Reduction
[121350012300000]\displaystyle \left[\begin{array}{cccc|c} \pivA{1} & 2 & 1 & 3 & \hitb{5} \\ 0 & 0 & \pivB{1} & 2 & \hitb{3} \\ 0 & 0 & 0 & 0 & \hitb{0} \end{array}\right]
x\displaystyle x =xp+xn\displaystyle = \hitb{x_p} + \hitzero{x_n} =  ?\displaystyle = \;?
Text solution
Finish reducing to RREFPlug b=[5813]\hitb{b} = \hitb{\begin{bmatrix} 5 \\ 8 \\ 13 \end{bmatrix}} into the eliminated matrix and subtract Row 2 from Row 1 to clear the entry above the second pivot.
[121350012300000]→R1←R1−R2[120120012300000]\displaystyle \begin{aligned} &\left[\begin{array}{cccc|c} \pivA{1} & 2 & 1 & 3 & \hitb{5} \\ 0 & 0 & \pivB{1} & 2 & \hitb{3} \\ 0 & 0 & 0 & 0 & \hitb{0} \end{array}\right] \\ &\xrightarrow{R_1 \leftarrow R_1 - R_2} \left[\begin{array}{cccc|c} \pivA{\mathbf{1}} & 2 & 0 & 1 & \hitb{2} \\ 0 & 0 & \pivB{\mathbf{1}} & 2 & \hitb{3} \\ 0 & 0 & 0 & 0 & \hitb{0} \end{array}\right] \end{aligned}
Write the RREF equationsThe pivots are in Columns 1 and 3, so x1\pivA{x_1} and x3\pivB{x_3} are pivot variables and x2x_2 and x4x_4 are free variables.
x1+2x2+1x4=2x3+2x4=3\displaystyle \begin{aligned} \pivA{x_1} + 2x_2 + 1x_4 &= \hitb{2} \\ \pivB{x_3} + 2x_4 &= \hitb{3} \end{aligned}
Set the free variables to 00 for xp\hitb{x_p}With x2=0x_2 = 0 and x4=0x_4 = 0, the right-hand numbers 2\hitb{2} and 3\hitb{3} go straight into the pivot positions for x1\pivA{x_1} and x3\pivB{x_3}.
xp=[2030]\displaystyle \hitb{x_p} = \hitb{\begin{bmatrix} 2 \\ 0 \\ 3 \\ 0 \end{bmatrix}}
Find the special solutions for xn\hitzero{x_n}Replace the right-hand side with 0\hitzero{0}, then set one free variable at a time to 11 and the other to 00.
x2=1, x4=0  ⟹  s1=[−2100]⏟first special solution,x2=0, x4=1  ⟹  s2=[−10−21]⏟second special solution\displaystyle \begin{aligned} &\underbrace{x_2 = 1,\, x_4 = 0 \implies \hitzero{s_1} = \hitzero{\begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix}}}_{\text{first special solution}}, \\ &\underbrace{x_2 = 0,\, x_4 = 1 \implies \hitzero{s_2} = \hitzero{\begin{bmatrix} -1 \\ 0 \\ -2 \\ 1 \end{bmatrix}}}_{\text{second special solution}} \end{aligned}
Add xp\hitb{x_p} and xn\hitzero{x_n}Combine the particular solution with all linear combinations of the special solutions.
x=[2030]⏟xp+c1[−2100]+c2[−10−21]⏟xn\displaystyle x = \underbrace{\hitb{\begin{bmatrix} 2 \\ 0 \\ 3 \\ 0 \end{bmatrix}}}_{\hitb{x_p}} + \underbrace{\hitzero{c_1 \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix}} + \hitzero{c_2 \begin{bmatrix} -1 \\ 0 \\ -2 \\ 1 \end{bmatrix}}}_{\hitzero{x_n}}

So the complete solution is a 2D plane in 4D space: the special solutions span a plane xn\hitzero{x_n} through the origin where Axn=0A\hitzero{x_n} = \hitzero{0}, and adding xp\hitb{x_p} shifts that entire plane so it passes through [2030]\hitb{\begin{bmatrix} 2 \\ 0 \\ 3 \\ 0 \end{bmatrix}}.

4

Starting from Any Particular Solution

Because the complete solution is a shifted line or plane, any point on it can serve as the starting point xp\hitb{x_p}. Next, let's find the complete solution when we aren't given the matrix AA at all, only that x=[412]x = \hitb{\begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix}} solves Ax=bAx = \hitb{b} and the null space of AA is spanned by [110]\hitzero{\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}}.

Starting from Any Particular Solution
x1\htmlClass{lc-mute}{x_1}
x2\htmlClass{lc-mute}{x_2}
x3\htmlClass{lc-mute}{x_3}
(4,1,2)\htmlClass{lc-blue}{(4, 1, 2)}
A[412]=bA\hitb{\begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix}} = \hitb{b}
A[110]=0A\hitzero{\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}} = \hitzero{0}
x=  ?x = \;?
Text solution
Use the given solution directly as xp\hitb{x_p}Because [412]\hitb{\begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix}} already satisfies Ax=bAx = \hitb{b}, we don't need a zero in its free position to write the complete solution.
x=[412]+c[110]\displaystyle x = \hitb{\begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix}} + \hitzero{c\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}}
Shift along the line if you want x2=0x_2 = 0Choosing c=−1\hitzero{c} = \hitzero{-1} moves along the same line to the point whose second component is 00.
xp=[412]−1[110]=[302]\displaystyle \hitb{x_p} = \hitb{\begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix}} - \hitzero{1\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}} = \hitb{\begin{bmatrix} 3 \\ 0 \\ 2 \end{bmatrix}}

So x=[412]+c[110]x = \hitb{\begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix}} + \hitzero{c\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}} and x=[302]+c[110]x = \hitb{\begin{bmatrix} 3 \\ 0 \\ 2 \end{bmatrix}} + \hitzero{c\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}} describe the exact same line of solutions, just starting from two different points on that line.

You can drag the starting point xp\hitb{x_p} anywhere along the solution line without changing the line itself.

Any point on the shifted line can be the starting vector without changing the line of solutions itself, and the one with a zero in the middle is just where that line crosses the plane x2=0x_2 = 0.
5

The Three Possible Outcomes for Ax=bAx = b

Looking at the zero rows at the bottom together with the free columns gives the three possible outcomes when we row-reduce any system Ax=bAx = \hitb{b}.

The Three Possible Outcomes for Ax = b
Ax=bAx = \hitb{b}
??
??
??
No solution
0=−20 = \miss{-2}
One solution
x=xpx = \hitb{x_p}
Infinitely many solutions
x=xp+xnx = \hitb{x_p} + \hitzero{x_n}

Key concepts

Every solution to Ax=bAx = \hitb{b} has the form x=xp+xnx = \hitb{x_p} + \hitzero{x_n}, where xp\hitb{x_p} is one particular solution to Axp=bA\hitb{x_p} = \hitb{b} and xn\hitzero{x_n} is the general null space solution to Axn=0A\hitzero{x_n} = \hitzero{0}.

When you start from an augmented matrix [Ab]\left[\begin{array}{c|c} A & \hitb{b} \end{array}\right], row-reduce and look at the zero rows first. If any zero row has a nonzero right-hand side (such as [00−3]\left[\begin{array}{cc|c} 0 & 0 & \miss{-3} \end{array}\right]), stop right there: the system has no solution, and you don't need to find xp\hitb{x_p} or xn\hitzero{x_n}. If you are asked which target vectors b=[b1b2b3]\hitb{b} = \hitb{\begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}} can be reached, keep b1,b2,b3\hitb{b_1}, \hitb{b_2}, \hitb{b_3} on the right-hand side during elimination and set the right-hand side of every zero row equal to 00 (such as b3−b1−b2=0\hitb{b_3 - b_1 - b_2} = 0).

When every zero row is 0=00 = 0, finish reducing to RREF. Set all free variables to 00 so the right-hand numbers go into the pivot positions to give xp\hitb{x_p}, and set one free variable at a time to 11 (with the right-hand side set to 0\hitzero{0}) to get the special solutions in xn\hitzero{x_n}. For example, in x1+2x2=5x_1 + 2x_2 = \hitb{5}, setting x2=0x_2 = 0 gives xp=[50]\hitb{x_p} = \hitb{\begin{bmatrix} 5 \\ 0 \end{bmatrix}} and setting x2=1x_2 = 1 in x1+2x2=0x_1 + 2x_2 = \hitzero{0} gives xn=c[−21]\hitzero{x_n} = \hitzero{c\begin{bmatrix} -2 \\ 1 \end{bmatrix}}, so x=[50]+c[−21]x = \hitb{\begin{bmatrix} 5 \\ 0 \end{bmatrix}} + \hitzero{c\begin{bmatrix} -2 \\ 1 \end{bmatrix}}. If there are no free variables at all, xn=0\hitzero{x_n} = \hitzero{0} and x=xpx = \hitb{x_p} is the single solution. And if a problem already gives you a solution vector (like x=[412]x = \hitb{\begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix}}), don't try to force zeros into its entries: use it directly as xp\hitb{x_p}, or if you are given two solutions u\hitb{u} and v\hitb{v} to Ax=bAx = \hitb{b}, subtract them to get a null space vector u−v\hitzero{u - v} since A(u−v)=b−b=0A\hitzero{(u - v)} = \hitb{b} - \hitb{b} = \hitzero{0}.

6

Practice

1

Row-reduce the system to reduced row echelon form and find the complete solution x=xp+xnx = \hitb{x_p} + \hitzero{x_n}:

1x1+2x2−1x3+1x4=32x1+4x2−1x3+4x4=81x1+2x2+1x3+5x4=7\displaystyle \begin{aligned} & 1x_1 + 2x_2 - 1x_3 \\ &\quad + 1x_4 = \hitb{3} \\ & 2x_1 + 4x_2 - 1x_3 \\ &\quad + 4x_4 = \hitb{8} \\ & 1x_1 + 2x_2 + 1x_3 \\ &\quad + 5x_4 = \hitb{7} \end{aligned}

After reaching reduced row echelon form, check which columns contain the pivots before placing the right-hand numbers into xp\hitb{x_p}.

Row-reducing the augmented matrix to RREF gives:
[12−11324−14812157]→R2←R2−2R1R3←R3−R1[12−1130012200244]→R3←R3−2R2R1←R1+R2[120350012200000]\displaystyle \begin{aligned} &\left[\begin{array}{cccc|c} \pivA{1} & 2 & -1 & 1 & \hitb{3} \\ 2 & 4 & -1 & 4 & \hitb{8} \\ 1 & 2 & 1 & 5 & \hitb{7} \end{array}\right] \\ &\xrightarrow{\substack{R_2 \leftarrow R_2 - 2R_1 \\ R_3 \leftarrow R_3 - R_1}} \left[\begin{array}{cccc|c} \pivA{1} & 2 & -1 & 1 & \hitb{3} \\ 0 & 0 & \pivB{1} & 2 & \hitb{2} \\ 0 & 0 & 2 & 4 & \hitb{4} \end{array}\right] \\ &\xrightarrow{\substack{R_3 \leftarrow R_3 - 2R_2 \\ R_1 \leftarrow R_1 + R_2}} \left[\begin{array}{cccc|c} \pivA{\mathbf{1}} & 2 & 0 & 3 & \hitb{5} \\ 0 & 0 & \pivB{\mathbf{1}} & 2 & \hitb{2} \\ 0 & 0 & 0 & 0 & \hitb{0} \end{array}\right] \end{aligned}
The equations are x1+2x2+3x4=5\pivA{x_1} + 2x_2 + 3x_4 = \hitb{5} and x3+2x4=2\pivB{x_3} + 2x_4 = \hitb{2}, with pivots x1,x3\pivA{x_1}, \pivB{x_3} and free variables x2,x4x_2, x_4. Setting x2=0x_2 = 0 and x4=0x_4 = 0 puts 5\hitb{5} and 2\hitb{2} into the first and third positions to give xp=[5020]\hitb{x_p} = \hitb{\begin{bmatrix} 5 \\ 0 \\ 2 \\ 0 \end{bmatrix}} (be careful not to put 55 and 22 into the top two positions to get [5200]\begin{bmatrix} 5 \\ 2 \\ 0 \\ 0 \end{bmatrix}, because x2x_2 is free and x3\pivB{x_3} is the second pivot variable). Setting x2=1,x4=0x_2 = 1, x_4 = 0 in Ax=0Ax = \hitzero{0} gives s1=[−2100]\hitzero{s_1} = \hitzero{\begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix}}, and setting x2=0,x4=1x_2 = 0, x_4 = 1 gives s2=[−30−21]\hitzero{s_2} = \hitzero{\begin{bmatrix} -3 \\ 0 \\ -2 \\ 1 \end{bmatrix}} (remember to flip the signs when moving the free variables across the equals sign, rather than reading the positive entries directly to get [2100]\begin{bmatrix} 2 \\ 1 \\ 0 \\ 0 \end{bmatrix} and [3021]\begin{bmatrix} 3 \\ 0 \\ 2 \\ 1 \end{bmatrix}):
x=[5020]+c1[−2100]+c2[−30−21]\displaystyle x = \hitb{\begin{bmatrix} 5 \\ 0 \\ 2 \\ 0 \end{bmatrix}} + \hitzero{c_1 \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix}} + \hitzero{c_2 \begin{bmatrix} -3 \\ 0 \\ -2 \\ 1 \end{bmatrix}}
2

For A=[1−212−434−85]A = \begin{bmatrix} 1 & -2 & 1 \\ 2 & -4 & 3 \\ 4 & -8 & 5 \end{bmatrix}, keep b=[b1b2b3]\hitb{b} = \hitb{\begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}} on the right-hand side during elimination to find the equation that b1,b2,b3\hitb{b_1}, \hitb{b_2}, \hitb{b_3} must satisfy for Ax=bAx = \hitb{b} to have a solution, and determine whether b=[215]\hitb{b} = \hitb{\begin{bmatrix} 2 \\ 1 \\ 5 \end{bmatrix}} and b=[214]\hitb{b} = \hitb{\begin{bmatrix} 2 \\ 1 \\ 4 \end{bmatrix}} can be reached.

Clear below the first pivot in Column 1, then use the second pivot in Column 3 to create a zero row at the bottom.

Eliminating down the columns with b=[b1b2b3]\hitb{b} = \hitb{\begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}} gives:
[1−21b12−43b24−85b3]→R2←R2−2R1R3←R3−4R1[1−21b1001b2−2b1001b3−4b1]→R3←R3−R2[1−21b1001b2−2b1000b3−b2−2b1]\displaystyle \begin{aligned} &\left[\begin{array}{ccc|c} \pivA{1} & -2 & 1 & \hitb{b_1} \\ 2 & -4 & 3 & \hitb{b_2} \\ 4 & -8 & 5 & \hitb{b_3} \end{array}\right] \\ &\xrightarrow{\substack{R_2 \leftarrow R_2 - 2R_1 \\ R_3 \leftarrow R_3 - 4R_1}} \\ &\left[\begin{array}{ccc|c} \pivA{1} & -2 & 1 & \hitb{b_1} \\ 0 & 0 & \pivB{1} & \hitb{b_2 - 2b_1} \\ 0 & 0 & 1 & \hitb{b_3 - 4b_1} \end{array}\right] \\ &\xrightarrow{R_3 \leftarrow R_3 - R_2} \\ &\left[\begin{array}{ccc|c} \pivA{1} & -2 & 1 & \hitb{b_1} \\ 0 & 0 & \pivB{1} & \hitb{b_2 - 2b_1} \\ 0 & 0 & 0 & \hitb{b_3 - b_2 - 2b_1} \end{array}\right] \end{aligned}
(In the second step, distribute the minus sign across all of b2−2b1\hitb{b_2 - 2b_1} when computing (b3−4b1)−(b2−2b1)=b3−b2−2b1\hitb{(b_3 - 4b_1)} - \hitb{(b_2 - 2b_1)} = \hitb{b_3 - b_2 - 2b_1}; adding −4b1-4b_1 and −2b1-2b_1 instead of subtracting gives the wrong condition b3−b2−6b1=0b_3 - b_2 - 6b_1 = 0.) Setting the zero row equal to 00 gives the condition for Ax=bAx = \hitb{b} to have a solution:
b3−b2−2b1\displaystyle \hitb{b_3 - b_2 - 2b_1} =0(or b3=2b1+b2)\displaystyle = 0 \quad (\text{or } \hitb{b_3} = \hitb{2b_1} + \hitb{b_2})
For b=[215]\hitb{b} = \hitb{\begin{bmatrix} 2 \\ 1 \\ 5 \end{bmatrix}}, 5−1−2(2)=05 - 1 - 2(2) = 0, so [215]\hitb{\begin{bmatrix} 2 \\ 1 \\ 5 \end{bmatrix}} can be reached; for b=[214]\hitb{b} = \hitb{\begin{bmatrix} 2 \\ 1 \\ 4 \end{bmatrix}}, 4−1−2(2)=−1≠04 - 1 - 2(2) = \miss{-1} \neq 0, so [214]\hitb{\begin{bmatrix} 2 \\ 1 \\ 4 \end{bmatrix}} cannot be reached.
3

Suppose x=[52−1]x = \hitb{\begin{bmatrix} 5 \\ 2 \\ -1 \end{bmatrix}} is one solution to Ax=bAx = \hitb{b} and the null space of AA is spanned by [21−1]\hitzero{\begin{bmatrix} 2 \\ 1 \\ -1 \end{bmatrix}}. Write the complete solution to Ax=bAx = \hitb{b}, and find the particular solution on this line that has a zero in the second component (x2=0x_2 = 0).

Use the given solution as your starting point for the line, then find the value of c\hitzero{c} that makes the second component 2+c(1)2 + \hitzero{c}(1) equal to 00.

Using the given solution directly as xp\hitb{x_p}, the complete solution is:
x=[52−1]+c[21−1]\displaystyle x = \hitb{\begin{bmatrix} 5 \\ 2 \\ -1 \end{bmatrix}} + \hitzero{c\begin{bmatrix} 2 \\ 1 \\ -1 \end{bmatrix}}
To make the second component 00, we need 2+c(1)=02 + \hitzero{c}(1) = 0, so c=−2\hitzero{c} = \hitzero{-2} (don't simply replace the middle entry with 00 to get [50−1]\begin{bmatrix} 5 \\ 0 \\ -1 \end{bmatrix}, which isn't on the solution line, and watch the minus-times-minus in the third entry −1+(−2)(−1)=1-1 + (-2)(-1) = 1 so you don't get [10−3]\begin{bmatrix} 1 \\ 0 \\ -3 \end{bmatrix}):
xp=[52−1]−2[21−1]=[101]\displaystyle \hitb{x_p} = \hitb{\begin{bmatrix} 5 \\ 2 \\ -1 \end{bmatrix}} - \hitzero{2\begin{bmatrix} 2 \\ 1 \\ -1 \end{bmatrix}} = \hitb{\begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}}
4

Suppose AA is a matrix with one free variable, and u=[321]\hitb{u} = \hitb{\begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix}} and v=[13−1]\hitb{v} = \hitb{\begin{bmatrix} 1 \\ 3 \\ -1 \end{bmatrix}} are two different solutions to Ax=bAx = \hitb{b}. Without knowing AA or b\hitb{b}, find a nonzero vector in the null space of AA and write the complete solution to Ax=bAx = \hitb{b}.

If Au=bA\hitb{u} = \hitb{b} and Av=bA\hitb{v} = \hitb{b}, what does AA do to the difference u−v\hitzero{u - v}?

Because A(u−v)=Au−Av=b−b=0A\hitzero{(u - v)} = A\hitb{u} - A\hitb{v} = \hitb{b} - \hitb{b} = \hitzero{0}, the difference between the two solutions is a nonzero vector in the null space of AA (be careful not to use the second solution v=[13−1]\hitb{v} = \hitb{\begin{bmatrix} 1 \\ 3 \\ -1 \end{bmatrix}} directly as the null space vector, since Av=bA\hitb{v} = \hitb{b} rather than 0\hitzero{0}):
xn direction=u−v=[321]−[13−1]=[2−12]\displaystyle \hitzero{x_n \text{ direction}} = \hitzero{u - v} = \hitb{\begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix}} - \hitb{\begin{bmatrix} 1 \\ 3 \\ -1 \end{bmatrix}} = \hitzero{\begin{bmatrix} 2 \\ -1 \\ 2 \end{bmatrix}}
Using u\hitb{u} (or v\hitb{v}) as xp\hitb{x_p} gives the complete solution:
x=[321]+c[2−12]\displaystyle x = \hitb{\begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix}} + \hitzero{c\begin{bmatrix} 2 \\ -1 \\ 2 \end{bmatrix}}
5

Three systems Ax=bAx = \hitb{b} row-reduce to the following augmented matrices: (a) [102301−140002]\left[\begin{array}{ccc|c} 1 & 0 & 2 & 3 \\ 0 & 1 & -1 & 4 \\ 0 & 0 & 0 & 2 \end{array}\right], \quad (b) [100301040012]\left[\begin{array}{ccc|c} 1 & 0 & 0 & 3 \\ 0 & 1 & 0 & 4 \\ 0 & 0 & 1 & 2 \end{array}\right], \quad (c) [102301−140000]\left[\begin{array}{ccc|c} 1 & 0 & 2 & 3 \\ 0 & 1 & -1 & 4 \\ 0 & 0 & 0 & 0 \end{array}\right]. For each system, state how many solutions it has and write the complete solution if one exists.

Check the bottom row for 0=nonzero0 = \miss{\text{nonzero}} first; if every zero row is 0=00 = 0, check whether any column has no pivot.

(a)The bottom row reads 0x1+0x2+0x3=20x_1 + 0x_2 + 0x_3 = \miss{2} (0=20 = \miss{2}), so there are zero solutions (don't ignore the bottom row and write x=[340]+c[−211]x = \begin{bmatrix} 3 \\ 4 \\ 0 \end{bmatrix} + c\begin{bmatrix} -2 \\ 1 \\ 1 \end{bmatrix}).
(b)Every column has a pivot and there is no 0=nonzero0 = \miss{\text{nonzero}} row, so there are no free variables (xn=0\hitzero{x_n} = \hitzero{0}) and there is exactly one solution:
x=[342]\displaystyle x = \hitb{\begin{bmatrix} 3 \\ 4 \\ 2 \end{bmatrix}}
(c)The bottom row is 0=00 = 0 and x3x_3 is a free variable, so there are infinitely many solutions. Setting x3=0x_3 = 0 gives xp=[340]\hitb{x_p} = \hitb{\begin{bmatrix} 3 \\ 4 \\ 0 \end{bmatrix}}, and setting x3=1x_3 = 1 in x1+2x3=0x_1 + 2x_3 = \hitzero{0}, x2−x3=0x_2 - x_3 = \hitzero{0} gives s1=[−211]\hitzero{s_1} = \hitzero{\begin{bmatrix} -2 \\ 1 \\ 1 \end{bmatrix}} (don't forget to put 11 in the third position for x3=1x_3 = 1; leaving it out gives [−210]\begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}):
x=[340]+c[−211]\displaystyle x = \hitb{\begin{bmatrix} 3 \\ 4 \\ 0 \end{bmatrix}} + \hitzero{c\begin{bmatrix} -2 \\ 1 \\ 1 \end{bmatrix}}