4system of Linear Equations 2021
4system of Linear Equations 2021
HCMC — 2021.
(HCMUT-OISP) SYSTEMS OF LINEAR EQUATIONS HCMC — 2021. 1 / 41
OUTLINE
1 DEFINITION
4 MATL AB
No solution
DEFINITION 1.1
A general linear system of m equations in the
n unknowns can be written as:
DEFINITION 1.1
A general linear system of m equations in the
n unknowns can be written as:
a 11 x 1 + a 12 x 2 + . . . + a 1 j x j + . . . + a 1n x n = b1
.................................... ... ...
ai 1 x1 + ai 2 x2 + . . . + ai j x j + . . . + ai n xn = bi (1)
.................................... ... ...
a m1 x 1 + a m2 x 2 + . . . + a m j x j + . . . + a mn x n = bm
DEFINITION 1.2
A solution of the system (1) is a sequence of n
numbers (s 1, s 2, . . . , s n ) such that the
equations of the system (1) are satisfied
when we substitute x 1 = s 1, x 2 = s 2, . . . , x n = s n .
DEFINITION 1.3
Matrix A = (ai j )m×n is called the coefficient
matrix of the system (1).
DEFINITION 1.3
Matrix A = (ai j )m×n is called the coefficient
matrix of the system (1).
a 11 a 12 ... a1 j . . . a 1n
... ... ... ... ... ...
ai 1
A= ai 2 ... ai j . . . ai n
... ... ... ... ... ...
a m1 a m2 ... am j . . . a mn
m×n
DEFINITION 1.4
Matrix
¯
a 11 a 12 . . . a 1 j . . . a 1n ¯ b1
¯
... ... ... ... ... ... ¯ ...
¯
¯
A B = a i 1 a i 2 . . . a i j . . . a i n ¯¯
bi
... ... ... ... ... ... ¯ ...
¯
a m1 a m2 . . . a m j . . . a mn ¯ bm
¯
m×(n+1)
DEFINITION 1.5
The system (1) is called a homogeneous if
B = 0m×1 and a nonhomogeneous if B 6= 0m×1 .
DEFINITION 2.1
A linear system is consistent if it has at least
one solution (unique solution or infinitely
many solutions) and inconsistent if it has no
solutions.
(HCMUT-OISP) SYSTEMS OF LINEAR EQUATIONS HCMC — 2021. 18 / 41
Non-homogeneous linear system Echelon form
EXAMPLE 2.1
Solve the system by Gaussian elimination
x 1 + 2x 2 + 3x 3 = 7
2x 1 + x 2 + 2x 3 = 6
3x + 2x + x = 7
1 2 3
EXAMPLE 2.1
Solve the system by Gaussian elimination
x 1 + 2x 2 + 3x 3 =
7
2x 1 + x 2 + 2x 3 = 6
3x + 2x + x =
1 2 3 7
¯ ¯
1 2 3 ¯¯ 7 r 2 →r 2 −2r 1 1 2 3 ¯ 7
¯
¯ r 3 →r 3 −3r 1
2 1 2 ¯ 6 −−−−−−→ 0 −3 −4 ¯ −8
¯
¯ ¯
3 2 1 ¯7 0 −4 −8 ¯ −14
¯
1 2 3 ¯ 7
¯
r 2 →r 2 −r 3 r 3 →r 3 +4r 2
−−−−−−→ 0 1 4 ¯ 6 −−−−−−→
¯
¯
0 −4 −8 ¯ −14
¯
1 2 3 ¯ 7 ¯
0 1 4 ¯ 6
¯
¯
0 0 8 ¯ 10
EXAMPLE 2.2
Solve the system by Gaussian elimination
x 1 + 2x 2 − 3x 3 = 1
x 1 + 3x 2 − 13x 3 = −1
3x + 5x + x = 5
1 2 3
EXAMPLE 2.2
Solve the system by Gaussian elimination
x 1 + 2x 2 − 3x 3 = 1
x 1 + 3x 2 − 13x 3 = −1
3x + 5x + x = 5
1 2 3
¯ ¯
1 2 −3 ¯¯ 1 r 2 →r 2 −r 1 1 2 −3 ¯¯ 1
r 3 →r 3 −3r 1
1 3 −13 ¯ −1 −−−−−−−→ 0 1 −10 ¯ −2
¯ ¯
¯ ¯
3 5 1 ¯ 5 0 −1 10 ¯ 2
EXAMPLE 2.3
Solve the system by Gaussian elimination
x 1 −2x 2 +3x 3 = 2
3x 1 +3x 2 = −3
3x
1 +3x 3 = 8
EXAMPLE 2.3
Solve the system by Gaussian elimination
x 1 −2x 2 +3x 3 = 2
3x 1 +3x 2 = −3
3x
1 +3x 3 = 8
¯
1 −2 3 ¯¯ 2 r 2 →r 2 −3r 1
r 3 →r 3 −3r 1
3 3 0 ¯ −3 −−−−−−−→
¯
¯
3 0 3 ¯ 8
EXAMPLE 2.3
Solve the system by Gaussian elimination
x 1 −2x 2 +3x 3 = 2
3x 1 +3x 2 = −3
3x
1 +3x 3 = 8
¯ ¯
1 −2 3 ¯¯ 2 r 2 →r 2 −3r 1 1 −2 3 ¯¯ 2
r 3 →r 3 −3r 1
3 3 0 ¯ −3 −−−−−−−→ 0 9 −9 ¯ −9
¯ ¯
¯ ¯
3 0 3 ¯ 8 0 6 −6 ¯ 2
¯
1 −2 3 ¯ 2
¯
r 2 ↔r 2 /9 r 3 →r 3 −6r 2
−−−−−→ 0 1 −1 ¯ −1 −−−−−−→
¯
¯
0 6 −6 ¯ 2
¯
1 −2 3 ¯ 2
¯
r 2 ↔r 2 /9 r 3 →r 3 −6r 2
−−−−−→ 0 1 −1 ¯ −1 −−−−−−→
¯
¯
0 6 −6 ¯ 2
¯
1 −2 3 ¯ 2 ¯
0 1 −1 ¯ −1
¯
¯
0 0 0 ¯ 8
DEFINITION 3.1
A system of linear equations is said to be
homogeneous if the constant terms are all
zero.
a 11 x 1 + a 12 x 2 + . . . + a 1 j x j + . . . + a 1n x n = 0
.................................... ... ...
ai 1 x1 + ai 2 x2 + . . . + ai j x j + . . . + ai n xn = 0
.................................... ... ...
a m1 x 1 + a m2 x 2 + . . . + a m j x j + . . . + a mn x n = 0
(2)
(HCMUT-OISP) SYSTEMS OF LINEAR EQUATIONS HCMC — 2021. 31 / 41
Homogeneous system of linear equations Definition
¡ ¢T
1
The trivial solution is X = 0 0 . . . 0 .
¡ ¢T
1
The trivial solution is X = 0 0 . . . 0 .
2
The¡nontrivial solution is
¢ T
X 6= 0 0 . . . 0 .
¡ ¢T
1
The trivial solution is X = 0 0 . . . 0 .
2
The¡nontrivial solution is
¢ T
X 6= 0 0 . . . 0 .
¡ ¢T
1
The trivial solution is X = 0 0 . . . 0 .
2
The¡nontrivial solution is
¢ T
X 6= 0 0 . . . 0 .
THEOREM 3.1
A homogeneous linear system (2) has
non-trivial solutions if and only if
r (A) < n,
THEOREM 3.1
A homogeneous linear system (2) has
non-trivial solutions if and only if
r (A) < n,
THEOREM 3.1
A homogeneous linear system (2) has
non-trivial solutions if and only if
r (A) < n,
EXAMPLE 3.1
Solve the system by Gaussian elimination
x 1 + 3x 2 + 3x 3 + 2x 4 + 4x 5 = 0
x + 4x + 5x + 3x + 7x
1 2 3 4 5 = 0
2x 1 + 5x 2 + 4x 3 + x 4 + 5x 5 = 0
x 1 + 5x 2 + 7x 3 + 6x 4 + 10x 5 = 0
EXAMPLE 3.1
Solve the system by Gaussian elimination
x 1 + 3x 2 + 3x 3 + 2x 4 + 4x 5 = 0
x + 4x + 5x + 3x + 7x =
1 2 3 4 5 0
2x 1 + 5x 2 + 4x 3 + x 4 + 5x 5 = 0
x 1 + 5x 2 + 7x 3 + 6x 4 + 10x 5 = 0
1 3 3 2 4 r 2 →r 2 −r 1
1 4 5 3 7 r 3 →r 3 −2r 1
r 4 →r 4 −r 1
Solution. −−−−−−→
2 5 4 1 5
1 5 7 6 10
(HCMUT-OISP) SYSTEMS OF LINEAR EQUATIONS HCMC — 2021. 35 / 41
Homogeneous system of linear equations General solution
1 3 3 2 4
0 1 2 1 3 r 3 →r 3 +r 2
r 4 →r 4 −2r 2
−−−−−−→
0
−1 −2 −3 −3
0 2 4 4 6
1 3 3 2 4
0 r 3 →r 3 +r 2
1 2 1 3 r 4 →r 4 −2r 2
−−−−−−→
0
−1 −2 −3 −3
0 2 4 4 6
1 3 3 2 4
1 3 3 2 4
0 1 2 1 3 r 4 →r 4 +r 3 0 1
2 1 3
−−−−−−→
0 0 0 −2 0 0 0 0 −2 0
0 0 0 2 0 0 0 0 0 0
1 3 3 2 4
0 r 3 →r 3 +r 2
1 2 1 3 r 4 →r 4 −2r 2
−−−−−−→
0
−1 −2 −3 −3
0 2 4 4 6
1 3 3 2 4
1 3 3 2 4
0 1 2 1 3 r 4 →r 4 +r 3 0 1
2 1 3
−−−−−−→
0 0 0 −2 0 0 0 0 −2 0
0 0 0 2 0 0 0 0 0 0
Free variables: x 3 , x 5
MATL AB
1 3 3 2 4
1 4 5 3 7
A=
2 5 4 1 5
1 5 7 6 10
0 0
>> nul
l (A, r )
3 5
−2 −3
ans = 1 0
0 0
0 1
(HCMUT-OISP) SYSTEMS OF LINEAR EQUATIONS HCMC — 2021. 40 / 41
MatLab