# Linear system solutions using Gauss-Jordan elimination

• January 28th 2011, 10:35 AM
qaz
Linear system solutions using Gauss-Jordan elimination
$
\left\{
\begin{matrix}
ax - 3y + z = a\\
-x + 6y = -2\\
x + 5z = 4\\
\end{matrix}\right.
$

system matrix:
$
\[
A =
\left[ \begin{array}{ccc|c}
a & -3 & 1 & a\\
-1 & 6 & 0 & -2\\
1 & 0 & 5 & 4\end{array}\right]

$

I'm not sure where to start. Should I switch row 3 and row 1?
• January 28th 2011, 10:55 AM
alexmahone
Quote:

Originally Posted by qaz
$
\left\{
\begin{matrix}
ax - 3y + z = a\\
-x + 6y = -2\\
x + 5z = 4\\
\end{matrix}\right.
$

system matrix:
$
\[
A =
\left[ \begin{array}{ccc|c}
a & -3 & 1 & a\\
-1 & 6 & 0 & -2\\
1 & 0 & 5 & 4\end{array}\right]

$

I'm not sure where to start. Should I switch the 3rd line with the 1st?

What's the question? Are you supposed to solve for x, y, z in terms of a or find a value of a for which the system has a unique solution or ...?

If you're required to solve for x, y, z in terms of a, you can indeed start by switching row 1 and row 3.
• January 28th 2011, 12:31 PM
HallsofIvy
Your first objective, in row reduction, is to get a "1" in the first column, first row. Yes, you can do that by swapping the first and third rows (which is a row operation). In general, as long as the number already is "first column, first row" is not 0, you can get a "1" there by dividing the entire row by that number (here, "a") but for this problem swapping rows is simpler.
• January 28th 2011, 01:29 PM
dwsmith
Quote:

Originally Posted by qaz
$
\left\{
\begin{matrix}
ax - 3y + z = a\\
-x + 6y = -2\\
x + 5z = 4\\
\end{matrix}\right.
$

system matrix:
$
\[
A =
\left[ \begin{array}{ccc|c}
a & -3 & 1 & a\\
-1 & 6 & 0 & -2\\
1 & 0 & 5 & 4\end{array}\right]

$

I'm not sure where to start. Should I switch the 3rd line with the 1st?

I would switch the 1st and 3rd, then add row 1 to 2, divide row 2 by 6, .....

You keep going until you have an upper triangular matrix or you if you are feeling ambitious you can do the rref i.e. until you have the identity matrix.
• January 29th 2011, 07:46 AM
qaz
Hello,
So I did start by switching row 1 and row 3...

$
\[
\left[ \begin{array}{ccc|c}
a & -3 & 1 & a\\
-1 & 6 & 0 & -2\\
1 & 0 & 5 & 4\end{array}\right]
$

$\begin{array}{c}\\ R_3<->R_1\end{array} \left[\begin{array}{ccc|c}1&0&5&4 \\ -1&6&0&-2 \\ a&-3&1&a \end{array}\right]$

$\begin{array}{c}\\ R_2+R_1\\R_3-aR_1\end{array} \left[\begin{array}{ccc|c}1&0&5&4 \\ 0&6&5&2 \\ 0&-3&1-5a&-3a \end{array}\right]$

$\begin{array}{c}\\ R_3+\frac{1}{2}R_2 \end{array} \left[\begin{array}{ccc|c}1&0&5&4 \\ 0&6&5&2 \\ 0&0&-5a+7/2&-3a+1 \end{array}\right]$

$\begin{array}{c}\\ \frac{1}{-5a+7/2}R_3 \end{array} \left[\begin{array}{ccc|c}1&0&5&4 \\ 0&6&5&2 \\ 0&0&1&3/5a+2/7 \end{array}\right]$

$\begin{array}{c}\\ \frac{1}{5}R_1-R_3\\\frac{1}{5}R_2-R_3 \end{array} \left[\begin{array}{ccc|c}1/5&0&0&3/5a-18/35 \\ 0&6/5&0&3/5a-4/35 \\ 0&0&1&3/5a+2/7 \end{array}\right]$

$\begin{array}{c}\\ \frac{1}{5}R_1\\\frac{6}{5}R_2 \end{array} \left[\begin{array}{ccc|c}1&0&0&3/25a-18/175 \\ 0&1&0&18/25a-24/175 \\ 0&0&1&3/5a+2/7 \end{array}\right]$

if $a \ne \frac{5}{3}*-\frac{2}{7}$ than rank(A) = 3 = rank([A|B]) = 3 -> Possible,

if $a=\frac{5}{3}*-\frac{2}{7}$ than rank(A) = 3 > rank([A|B]) = 2 -> ??
• January 29th 2011, 01:33 PM
dwsmith
Quote:

Originally Posted by qaz

$\begin{array}{c}\\ R_3+\frac{1}{2}R_2 \end{array} \left[\begin{array}{ccc|c}1&0&5&4 \\ 0&6&5&2 \\ 0&0&-5a+7/2&-3a+1 \end{array}\right]$

Assuming everything is correct. If a = 7/10, your matrix is inconsistent.

If a = 1/2, then your solution is (x,y,z).