Linear
Linear Sy
Sy
stems
stems
y
y
Solve Ax=b, where A is an
Solve Ax=b, where A is an
nnv
v
nn mmatrix and
atrix and
b is an
b is an
nnv
v
11colu
colu
mmn vector
n vector
y
y CC
an also talk about non-
an also talk about non-square syste
square syste
mms where
s where
A is
A is
mmv
v
nn, b is
, b is
mmv
v
11, and x is
, and x is
nnv
v
11 yy Overdetermined Overdetermined if if mm>>nn::
mmore equations than unknownsore equations than unknowns
y
y U U nderdetermined nderdetermined if if nn>>mm::
mmore unknowns than equationsore unknowns than equations
C
Singular Systems
Singular Systems
y
y
A is singular if so
A is singular if so
mme row is
e row is
linear co
linear co
mmbinatio
bination
n
of
of other rows
other rows
y
y
Singul
Singular
ar
syste
syste
mms can be underdeter
s can be underdeter
mmined:
ined:
or inconsistent:
or inconsistent:
G
G
auss-Jordan Elimination
auss-Jordan Elimination
y
y FF
unda
unda
mmental operations:
ental operations:
1.
1. R R eplace one equation with lineaeplace one equation with linear cr coommbinationbination
of other equations
of other equations
2
2.. IInterchange two equationsnterchange two equations 3
3.. R R e-label two variablese-label two variables
y
y CC
o
o
mmbine to reduce to trivial syste
bine to reduce to trivial syste
mm yy
Si
Si
mmplest variant only uses #
plest variant only uses #
11operations,
operations,
but get better
but get better
stabil
stabil
ity by adding
ity by adding
#2 (partial pivoting) or #2 and #3 (
G
G
auss-Jordan Elimination
auss-Jordan Elimination
y
y
Solve:
Solve:
y
y
Only care about nu
Only care about nu
mmbe
bers
rs
f
for
or
mmtableau or
tableau or
aug
G
G
auss-Jordan Elimination
auss-Jordan Elimination
y
y GG
iven:
iven:
y
y GG
oal: reduce this to trivial syste
oal: reduce this to trivial syste
mmand read off a
G
G
auss-Jordan Elimination
auss-Jordan Elimination
y
y BB
asic operation
asic operation
11: replace any row by
: replace any row by
linear co
linear co
mmbinatio
bination with any other r
n with any other row
ow
y
G
G
auss-Jordan Elimination
auss-Jordan Elimination
y
y R R
eplace
eplace
ro
row2 w
w2 w
ith r
ith row2
ow2
4 * row
4 * row
11y
G
G
auss-Jordan Elimination
auss-Jordan Elimination
y
y R R
epla
eplace ro
ce ro
w
w
11with row
with row
11
33//22* row2
* row2
y
G
G
auss-Jordan Elimination
auss-Jordan Elimination
y
y FF
or each row i:
or each row i:
y
y Multiply row i by Multiply row i by 1/1/aaiiii y
y FFor each other row j:or each other row j:
y
y Add a Add a ji ji titimmes row i to row jes row i to row j
y
y
At the end, left part of
At the end, left part of
mmatrix is
atrix is identity
identity
,
,
answer in right part
answer in right part
y
R
R ecall that we'd like to use row operations on an augecall that we'd like to use row operations on an augmmentedented
m
matrix to get it into the following foratrix to get it into the following formm::
This is not always possibl
This is not always possible thoughe though.. The following areThe following are
m
matrices that cannot be put into this foratrices that cannot be put into this form.m.
1 1 2 2 3 3 1 1 1 1 00 00 00 00 0 0 11 00 00 00 0 0 00 11 00 00 0 0 00 00 11 00 0 0 00 00 00 11 n n n n b b b b b b b b b b « « »» ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ - - ½½ L L M M O O MM L L L L 1 1 2 2 3 3 77 1 1 0 0 5 5 22 0 0 0 0 0 0 00 0 0 1 1 6 6 33 0 0 0 0 0 0 00 « « »» « « »» ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ - - ½½ ¬ ¬ ¼¼ - - ½½
R
R ecognize that if we cant get ourecognize that if we cant get our mmatrix to the desired foratrix to the desired formm,,
then it wont be as easy to see what the solution to the
then it wont be as easy to see what the solution to the
syste
systemm of equations will beof equations will be..
F
For exaor exammple, thisple, this mmatrix has a solution that is easy atrix has a solution that is easy
to
to see, see, ((11, 3, 5), b, 3, 5), because tecause thehe mmatrix is in the finalatrix is in the final
for
formm that we wantthat we want..
1 1 0 0 0 0 11 0 0 1 1 0 0 33 0 0 0 0 1 1 55
«
«
»»
¬
¬
¼¼
¬
¬
¼¼
¬
¬
¼¼
-
-
½½
1 1 2 2 3 3 77 0 0 0 0 0 0 00 0 0 0 0 0 0 00
« «
»»
¬ ¬
¼¼
¬ ¬
¼¼
¬ ¬
¼¼
- -
½½
1
1 0
0 5
5 2
2
0
0 1
1 6
6 3
3
« «
»»
¬ ¬
¼¼
- -
½½
ThisThis mmatrix (on the right) has a solution but isatrix (on the right) has a solution but is
not as clear what the solution is
not as clear what the solution is.. What we canWhat we can
conclude about the solution, (
conclude about the solution, ( x x,, y y,, zz), ), is is thatthat
the co
the commponentsponents x x,, y y, and, and zz mmust obey theust obey the
equation
equation x x + 2+ 2 y y + 3+ 3zz = 7= 7..
This
This mmatrix (on the right) has a solution, butatrix (on the right) has a solution, but
again it is not as clear what it is
again it is not as clear what it is.. What we canWhat we can
conclude about the solution, (
conclude about the solution, ( x x,, y y,, zz), ), is is thatthat
the co
the commponentsponents x x,, y y, and, and zz mmust obey the twoust obey the two
equations
These last two
These last two mmatrices represent systeatrices represent systemms that do nos that do not have at have a
unique solution
unique solution.. Whenever aWhenever a mmatrix does not have a uniqueatrix does not have a unique
solution (if it has inf
solution (if it has infinitelinitely y mmany solutions or no solution at all)any solutions or no solution at all)
we will not be able to get our aug
we will not be able to get our augmmentedented mmatrix into the foratrix into the formm
that we really want
that we really want.. When this happens, we want to at least getWhen this happens, we want to at least get
our
our mmatrix as close as possibatrix as close as possible to le to this forthis formm that we would really that we would really
like it to be in
like it to be in.. When it When it is as close as it can posis as close as it can possibly get, we sibly get, we say say
it is in reduced row echelon for
it is in reduced row echelon form.m.
1 1 2 2 3 3 1 1 1 1 00 00 00 00 0 0 11 00 00 00 0 0 00 11 00 00 0 0 00 00 11 00 0 0 00 00 00 11 n n n n b b b b b b b b b b « « »» ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ ¬ ¬ ¼¼ - - ½½ L L M M O O MM L L L L
PIVOTING
PIVOTING
y
y CC
onsider this syste
onsider this syste
mm:
:
y
y ImmImm
ediately run into proble
ediately run into proble
mm:
:
algorith
algorith
mmwants us to divide by zero!
wants us to divide by zero!
y
P
P
artial
artial
P
P
ivoting
ivoting
y
y
Swap rows
Swap rows
11and 2:
and 2:
y
F
F
ull
ull
P
P
ivoting
ivoting
y
y
Swap largest ele
Swap largest ele
mment onto diag
ent onto diag
onal
onal by swapping rows
by swapping rows
11and 2 and colu
and 2 and colu
mmns
ns
11and 2:
and 2:
y
y CC
ritical: when swapping colu
ritical: when swapping colu
mmns,
ns,
mmust re
ust re
mme
e
mmber to
ber to
swap r
F
F
ull
ull
P
P
ivoting
ivoting
y