solving linear (v2)
solving linear (v2)
Linear Equations
Equivalent
• Two systems of linear equations are equivalent if
they have exactly the same solution set.
{3 𝑥1 + 𝑥2 ¿ 10
𝑥1 − 3 𝑥2 ¿ 0 { 𝑥1 ¿= 3
𝑥2 ¿ 1
{ 3 𝑥1 + 𝑥2 ¿ 10
𝑥1 − 3 𝑥2 ¿ 0 { 𝑥1 − 3 𝑥2 ¿ 0
3 𝑥1 + 𝑥2 ¿ 10
• 2. Scaling
{ 3 𝑥1 + 𝑥2 ¿ 10
𝑥 1 − 3 𝑥 2 ¿ 0 X(-3) { 3 𝑥 1 + 𝑥 2 ¿ 10
−3 𝑥 1 +9 𝑥 2 ¿ 0
• 3. Row Addition
{3 𝑥1 + 𝑥2 ¿ 10
𝑥 1 − 3 𝑥 2 ¿ 0X(-3) { 10 𝑥 2 ¿ 10
𝑥1 − 3 𝑥2 ¿ 0
Solving system of linear
equation
• Two systems of linear equations are equivalent if
they have exactly the same solution set.
• Strategy:
{
𝑥1
3 𝑥1
− 3 𝑥2
+ 𝑥2 {
¿ 0𝑥1 − 3 𝑥2
¿ 10 10 𝑥 2 ¿ 10
¿ 0𝑥1
{ − 3 𝑥2
𝑥2 ¿1 {¿𝑥
0 1
𝑥2
¿= 3
¿1
[ ] [] []
𝑎 11 𝑎1 2 ⋯ 𝑎1 𝑛 𝑥1 𝑏1
𝑎2 1 𝑎 22 ⋯ 𝑎2 𝑛 𝑥2 𝑏2
𝐴= 𝑥= 𝑏=
⋮ ⋮ ⋱ ⋮ ⋮ ⋮
mxn 𝑎 𝑎𝑚 2 ⋯ 𝑎 𝑚𝑛 𝑥𝑛
𝑚1 𝑏𝑚
coefficient matrix
Augmented Matrix
• a system of linear equation
m x (n+1)
mxn mx1
augmented matrix
Solving system of linear
equation
• Two systems of linear equations are equivalent if
they have exactly the same solution set.
• Strategy of solving:
{
𝑥1
3 𝑥1
− 3 𝑥2
+ 𝑥2 {
¿ 0𝑥1 − 3 𝑥2
¿ 10 10 𝑥 2 ¿ 10
¿ 0𝑥1
{ − 3 𝑥2
𝑥2 ¿1 {
¿𝑥
0 1
𝑥2
¿= 3
¿1
[ 13 −3
1
0
10 ] [ 10 −3
10
0
10 ] [ 1
0
−3
1
0
1 ] [ 10 0
1
3
1 ]
1. Interchange any two rows of the matrix
2. Multiply every entry of some row by the same nonzero scalar
3. Add a multiple of one row of the matrix to another row
Solving system of linear
equation
A complex system of A simple system of
linear equations linear equations
Ax = b Ax = b
equivalent
Leading Entry
x1 x2 x3 b
Free variables
Basic variables
With free variables, there are
infinitely many solutions.
Parametric Representation:
Reduced Row Echelon
Form
• Example 3. No Solution
x1 x2 x3 b
inconsistent
1
-2
3
Example 1
Example 1
-1
Example 1
-2
Example 1
Example 1
x1 x2 x3 x4 x5 b
Example 1
[][ ] [] [][]
𝑥1 − 5 − 2 𝑥 2+ 𝑥 5 −2 1 −5
𝑥2 𝑥2 1 0 0
𝑥3 ¿ −3 ¿ 𝑥2 0 + 𝑥5 0 + −3
𝑥4 2 − 𝑥5 0 −1 2
𝑥5 𝑥5 0 1 0
[][ ] [] [][]
𝑥1 − 5 − 2 𝑥 2+ 𝑥 5 -8 −2 1 −5
𝑥2 𝑥2 1 1 1 -1 0 0
𝑥3 ¿ −3 ¿ 𝑥2 0 + 𝑥5 0 + −3
𝑥4 2 − 𝑥5 3 0 −1 2
𝑥5 𝑥5 0 1 0
-1
𝑥1 𝑓𝑟𝑒𝑒
5 1 1
𝑥 2=− − 𝑥 1 + 𝑥5
2 2 2
[ ][ ] [ ] [ ][ ]
𝑥1 𝑥 1 -8 1 1 0 0
𝑥2 − 5 / 2− 1 / 2 𝑥 1+ 1/ 2 𝑥 5 -8 − 1/ 2 -1 1/ 2 −5 /2
𝑥3 ¿ −3 ¿ 𝑥1 0 + 𝑥5 0 + −3
𝑥4 2− 𝑥 5 3 0 −1 2
𝑥5 𝑥5 0 1 0
-1
[] ] [ ]
Example 2 10 0
1
−3
2
0
0
1
0
0 −3
1 2
0
0
0 0 0 1 0 0 0 1
0 0 0 0 0 0 0 0
• Find the RREF of 2 0 −6 0 0 0 0 0
[
0 2 4 0 0 0 0 0
1 0 −3 0
0 0 0 2 0 0 0 0
0 1 2 0
𝑅= 0 0 0 0 0 0 0 0
0 0 0 1
0 0 0 0
𝑅 𝑅
×(− 2)
2𝑅 𝑶
Example 3
[ ]
1 0 −3 0
[ ]
[ ] [
1 0 −3 0 0 0 0 0
𝑅
𝑅
2𝑅
−𝑅
𝑅
𝑶
2𝑅
−3 𝑅 ] 0
0
1
0
2
0 1
0 0
0
0 0
0 0
0
0
0 0 0 0 0 0 0 0
0 0 0 0 1 0 −3 0
0 0 0 0 0 1 2 0
[ 𝑅
𝑶
𝑶
−3 𝑅 ] [ 𝑅
𝑶
𝑶
𝑅 ] 0
0
0 0
0 0
0
0
0
0
0
0
0
0
1
0
RREF is unique
• A matrix can be transformed into multiple REF by row
operation, but only one RREF
REF
[ ]
1 −2 −1 3
0 3 3 −6
0 0 1 3
RREF
REF
[ ]
1 −2 −1 3
0 3 3 −6
0 0 3 9
REF
[ ]
1 −2 −1 3
0 3 0 − 15
0 0 3 9
Checking Independence
Linear independent
or not?
Given a vector set, {a1, a2, , an}, if there exists any ai that is
a linear combination of other vectors
Given a vector set, {a1, a2, , an}, there exists scalars x1, x2,
, xn, that are not all zero, such that x1a1 + x2a2 + + xnan =
0.
have non-zero solution 𝐴= [ 𝑎1 𝑎2 ⋯ 𝑎𝑛 ]
Checking Independence
Linear independent
or not?
][ ] [ ]
A
𝑥1
[
have non-zero solution 1 1 1 1 𝑥2
0
2 0 4 2 ¿ 0
or not 𝑥3
1 1 1 3 0
𝑥4
x1 x2 x3 x4 x1 x2 x3 x4
RREF
Checking Independence
x1 x2 x3 x4 x1 x2 x3 x4
RREF
𝑥1 +2 𝑥 3= 0 𝑥1 =−2 𝑥3
𝑥 2 − 𝑥 3= 0 𝑥 2= 𝑥 3
𝑥 3 𝑖𝑠 𝑓𝑟𝑒𝑒
𝑥 4= 0 𝑥 4= 0
[ ][ ] [ ] [ ][ ]
𝑥1 − 2 𝑥3 −2 setting x3 = 1 𝑥1 −2
𝑥2
= 1
𝑥2
𝑥3
¿
𝑥3
𝑥3 ¿𝑥 3
1
1 𝑥3 1
0
𝑥4 0 𝑥4
0
[ ]
1 0 0 1 3 0 0 3
0 1 0 2 0 3 0 6
0 0 1 3 0 0 3 9
1 0 0 1 2 0 0 2
0 1 0 2 0 2 0 4
0 0 1 3 0 0 2 6
[ ]
1 0 0 1 0 0 0 0
0 1 0 2 0 0 0 0
0 0 1 3 0 0 0 0
0 0 0 0 1 0 0 1
0 0 0 0 0 1 0 2
0 0 0 0 0 0 1 3