Problem to start with
-
Do gaussian elimination to put the following matrix in
row echelon form. Show your work!
$$
\begin{bmatrix}
2 & -4 & 0 & -1\\
6 & -10 & 10 & -7\\
4 & -7.5 & 3.5 & 6
\end{bmatrix}
$$
-
Using your solution to the previous problem, find a
non-trivial solution to
$$
\begin{bmatrix}
2 & -4 & 0 & -1\\
6 & -10 & 10 & -7\\
4 & -7.5 & 3.5 & 6
\end{bmatrix}
\cdot
\boldsymbol{x}
=
\boldsymbol{0}
$$
in which the 4th component of $\boldsymbol{x}$ is $-1$.
Verify that your
$x_1,x_2,x_3$ (the first three components of the
non-trivial solution) satisfy:
$$
\begin{bmatrix}
2 & -4 & 0 \\
6 & -10 & 10 \\
4 & -7.5 & 3.5
\end{bmatrix}
\cdot
\begin{bmatrix}
x_1\\
x_2\\
x_3
\end{bmatrix}
=
\begin{bmatrix}
-1\\
-7\\
6
\end{bmatrix}
$$
Look: you solved a matrix vector product equation with
a right-hand side that
is not zero by solving a slightly
different matrix vector product equation with a right-hand side
that
is zero!
An analogy
Everyone knows that the solution(s) to
$a x^2 + b x + c = 0$
are $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$, right? Right?
Suppose your english major friend
came to you and said, "I have this equation
$$
3 x^2 + 5 x = 2
$$
but I don't know how to solve it because the quadratic equation
only works when there is a zero on the right-hand side of the
equals sign."
What would you recommend they do?
Just move the 2 to the left side of the equals sign and multiply it
by -1. Now ... read the next section!
Solving $A\cdot\boldsymbol{x}=\boldsymbol{b}$
We now know how to use Gaussian elmination and back substitution
to solve matrix-vector product equations of the form $A\cdot\boldsymbol{x}=\boldsymbol{0}$.
But what about $A\cdot\boldsymbol{x}=\boldsymbol{b}$? I.e. what can
we do when the left-hand side is not zero? The last problem
from the homework pointed the way.
Notation: If $A$ is an $m\times n$ matrix and
$\boldsymbol{b}$ is an $n$-dimensional column vector, we write
$[A|\boldsymbol{b}]$ to denote the $m\times(n+1)$ matrix
formed by adding $\boldsymbol{b}$ as an extra column on the
end of $A$.
Let $A$ be an $m\times n$ matrix and
$\boldsymbol{b}$ an $n$-dimensional column vector.
Vector $\boldsymbol{u}$ is a solution to $A\cdot\boldsymbol{x}=\boldsymbol{b}$
if and only if the column vector
$\boldsymbol{u'} = [u_1,\ldots,u_n,-1]$ is a solution to
$[A|\boldsymbol{b}]\cdot\boldsymbol{x}=\boldsymbol{0}$.
The following sequence of equivalences shows that the theorem
is true.
$$
A\cdot\boldsymbol{u}=\boldsymbol{b}
\Longleftrightarrow
\begin{array}{ccc}
a_{1,1} u_1 + a_{1,2} u_2 + ... + a_{1,n} u_n & = & b_1\\
\vdots & &\\
a_{m,1} u_m + a_{m,2} u_2 + ... + a_{m,n} u_n & = & b_m
\end{array}
\Longleftrightarrow
\begin{array}{ccc}
a_{1,1} u_1 + a_{1,2} u_2 + ... + a_{1,n} u_n + b_1 (-1)& = & 0\\
\vdots & &\\
a_{m,1} u_m + a_{m,2} u_2 + ... + a_{m,n} u_n + b_m (-1)& = & 0
\end{array}
\Longleftrightarrow
[A|\boldsymbol{b}]\cdot
\begin{bmatrix}
u_1\\
\vdots\\
u_n\\
-1
\end{bmatrix}
=\boldsymbol{0}
\Longleftrightarrow
[A|\boldsymbol{b}]\cdot\boldsymbol{u'}=\boldsymbol{0}
$$
In class activity
We did the following in-class activity:
activity. I'll give a solution to
the first one here:
Problem: Solve the following matrix-vector product equation:
$$
\begin{bmatrix}
3 & -1 & 4\\
6 & -4 & 12\\
-1.5 & -5.5 & 12
\end{bmatrix}
\cdot
\boldsymbol{x}
=
\begin{bmatrix}
2\\
-1\\
5
\end{bmatrix}
$$
The system is equivalent to:
$$
\underbrace{
\begin{bmatrix}
3 & -1 & 4 & 2\\
6 & -4 & 12 & -1\\
-1.5 & -5.5 & 12 & 5
\end{bmatrix}
}_{\text{called the "augmented matrix"}}
\cdot
\begin{bmatrix}
x_1\\
x_2\\
x_3\\
-1
\end{bmatrix}
=
\boldsymbol{0}
\text{, do gaussian elimination: }
\begin{bmatrix}
3 & -1 & 4 & 2\\
0 & -2 & 4 & -5\\
0 & 0 & 2 & 21
\end{bmatrix}
\text{, back sub. with "$x_4$"=-1: }
\left\{
\begin{array}{rl}
2x_3=21 &\rightarrow x_3=21/2\\
-2x_2+4x_3=-5 &\rightarrow -2x_2 + 4(21/2) = -5 \rightarrow x_2=47/2\\
3x_1 - x_2 + 4x_3 = 2 &\rightarrow 3x_1 - 47/2 + 42 = 2
\rightarrow 3x_1 = -33/2 \rightarrow x_1 = -11/2
\end{array}
\right.
$$
Let's check our work by multiplying $A$ by our proposed
solution vector ...
$$
\begin{bmatrix}
3 & -1 & 4\\
6 & -4 & 12\\
-1.5 & -5.5 & 12
\end{bmatrix}
\cdot
\begin{bmatrix}
-11/2\\
47/2\\
21/2
\end{bmatrix}
=
\begin{bmatrix}
2\\
-1\\
5
\end{bmatrix}
$$
Yay!
Note:
In the last problem from the activity (Problem c) we find that
there is no solution! This is because, after Gaussian
elimination, the last row is $[0\ 0\ 0\ 25]$, which when we do
back substitition (remembering that the last componant of $x$ is
-1), gives us $25\cdot(-1) = 0$, which ... is never satisfied.