Linear algebra Systems of linear equations
Outline
1
Systems of linear equations Basic notation Gaussian elimination Cramer’s rule
2
Examples
3
List of tasks for students
Lucie Doudová (UoD Brno)
Linear algebra
2 / 27
Outline
1
Systems of linear equations Basic notation Gaussian elimination Cramer’s rule
2
Examples
3
List of tasks for students
Lucie Doudová (UoD Brno)
Linear algebra
2 / 27
Outline
1
Systems of linear equations Basic notation Gaussian elimination Cramer’s rule
2
Examples
3
List of tasks for students
Lucie Doudová (UoD Brno)
Linear algebra
2 / 27
Systems of linear equations
Outline
1
Systems of linear equations Basic notation Gaussian elimination Cramer’s rule
2
Examples
3
List of tasks for students
Lucie Doudová (UoD Brno)
Linear algebra
3 / 27
Systems of linear equations
Basic notation
Basic notation
Definition The system of equations a11 x1 a21 x1 am1 x1
+ + +
a12 x2 a22 x2 am2 x2
+ + +
... ... .. . ...
+ +
a1n xn a2n xn
= =
b1 b2 (1)
+
amn xn
=
bm ,
where numbers aij , i = 1, . . . , m, j = 1, . . . , n are called coefficients, numbers b1 , . . . , bm are called absolute (or constant) terms and x1 , . . . , xn are unknowns, is called the system of linear algebraic equations.
Lucie Doudová (UoD Brno)
Linear algebra
4 / 27
Systems of linear equations
Basic notation
Basic notation
Notation
a11 a21 Matrix of the system: A = . .. am1
a12 a22 .. . am2
... ... ...
Augmented matrix of the system: R = Vector of unknowns: ~ x = (x1 , . . . , xn )
a1n a2n .. . amn
a11 a21 .. . am1
a12 a22 .. . am2
... ... ...
a1n a2n .. . amn
b1 b2 .. . bm
0
Vector of absolute terms: ~ b = (b1 , . . . , bm )0
Lucie Doudová (UoD Brno)
Linear algebra
5 / 27
Systems of linear equations
Basic notation
Basic notation
Remark We can rewrite system (1) in the shorter way: A∗~ x =~ b Definition If b1 = · · · = bn = 0 then system of linear equations is called a homogenous system. We mark it S0 (m, n). Otherwise, the system of linear equations is called non-homogenous. We mark it S(m, n).
Lucie Doudová (UoD Brno)
Linear algebra
6 / 27
Systems of linear equations
Basic notation
Basic notation
Example x1 - 2x2 + x3 = 0 2x1 - 3x2 x3 = 0 Homogenous system of 2 linear equations for 3 unknowns x1 , x2 , x3 . Example x1 + x2 x1 2x2 x1 3x2 Non-homogenous
x3 x3 + 2x3 system of
Lucie Doudová (UoD Brno)
= 1 = 0 = -2 3 linear equations for 3 unknowns x1 , x2 , x3 .
Linear algebra
7 / 27
Systems of linear equations
Basic notation
Solvability of system
Definition Ordered n-tuple X = (r1 , r2 , . . . , rn ) is called solution of equation (1) if after replacing r1 with x1 , . . . , rn with xn in (1) we get m valid identity between numbers. System is solved if we known all its solutions. System which has at least 1 solution is called solvable, in other case it is called insolvable.
Lucie Doudová (UoD Brno)
Linear algebra
8 / 27
Systems of linear equations
Basic notation
Solvability of system
Example x1 2x1
+ –
2x2 x2
= =
3 1
solvable system: ~ x = (1, 1)
Example x1 x1
+ +
x2 x2
= =
4 5
insolvable system
Example 2x1 4x1
+ +
x2 2x2
= =
Lucie Doudová (UoD Brno)
3 6
solvable system: ~ x = (t, 3 − 2t), t ∈ R
Linear algebra
9 / 27
Systems of linear equations
Basic notation
Solvability of system
Forbenius theorem The system of n linear equations has a solution if and only if r (A) = r (R). If r (A) = r (R) = n then the solution is unique. If r (A) = r (R) < n then the system (1) has infinitely many solutions.
Lucie Doudová (UoD Brno)
Linear algebra
10 / 27
Systems of linear equations
Basic notation
Equivalent modifications Definition 1
Two systems S(m1 , n) and S(m2 , n) are called equivalent if they have identical sets of solutions.
2
Modification which transform system S(m, n) to a equivalent system is called a equivalent modification.
Theorem (Equivalent modifications) Let S be given system of linear equations (1). Let S 0 be a new system formed from system S by following equivalent modifications. 1
Interchanging of two equations of system S.
2
Multiplying of a equation of system S by number k 6= 0.
3
Adding k-multiple of one equation of system S to another equation of system S.
4
Adding of arbitrary linear combination of equations of system S to another equation of system S.
5
Inserting of equation which is linear combination of other equations of system S.
6
Omitting of equation which is linear combination of other equations of system S.
Then both systems S and S 0 have the same set of solution. We say that they are equivalent. Lucie Doudová (UoD Brno)
Linear algebra
11 / 27
Systems of linear equations
Gaussian elimination
Gaussian elimination
Gaussian elimination We transform the augmented matrix R of system S(m, n) (by equivalent modifications) to a row echelon form. We write the system of equations which correspond to modified augmented matrix R. We solve this system of equations by back substitution.
Lucie Doudová (UoD Brno)
Linear algebra
12 / 27
Systems of linear equations
Gaussian elimination
Gaussian elimination
Example Solve the system of equations. x1 + 2x2 + x3 = 2x1 + x2 – x3 = x1 – x2 – x3 =
x1
1 2 1
2 1 −1
1 −1 −1
+
2x2 x2
+ +
Lucie Doudová (UoD Brno)
1 −4 −1
1 1 −4 ∼ 0 −1 0 x3 x3 x3
= = =
1 2 4
2 −3 −3
1 1 −6 ∼ 0 −2 0
1 −3 −2 x1 x2 x3
= = =
Linear algebra
1 −2 4
2 −3 0
1 −3 1
1 −6 4
~ x = (1, −2, 4)
13 / 27
Systems of linear equations
Gaussian elimination
Gaussian elimination
Example Different way how x1 + 2x2 2x1 + x2 x1 – x2
1 2 1
2 1 −1
to compute this example. + x3 = 1 – x3 = −4 – x3 = −1 1 1 −4 ∼ 0 −1 0
1 −1 −1
1 0 0
2 −3 0
0 0 1
2 −3 −3
1 −3 −2
1 1 −6 ∼ 0 −2 0
−3 1 6 ∼ 0 4 0
0 1 0
0 0 1
2 −3 0
1 −3 1
1 −6 4
1 −2 4
~ x = (1, −2, 4)
Lucie Doudová (UoD Brno)
Linear algebra
14 / 27
Systems of linear equations
Gaussian elimination
Gaussian elimination
Example x1 2x1 4x1
+
x2
+
2x2 1 0 2
1 2 4
+ 2x3 = – 5x3 = – x3 = 2 1 −5 2 ∼ −1 6
1 2 6 1 0 0
1 −2 −2
2 −9 −9
1 1 0 ∼ 0 2 0
1 −2 0
2 −9 0
1 0 2
from the last row we have equation: 0 = 2 → insolvable system
Lucie Doudová (UoD Brno)
Linear algebra
15 / 27
Systems of linear equations
Gaussian elimination
Gaussian elimination
Example x1
+
2x1 3x1
+ +
x2 + x2 x2 + 2x2 + 1 0 2 3
2x3 4x3 6x3 1 1 1 2
2 0 4 6
– + – –
x4 = x4 = 3x4 = 4x4 = −1 2 1 3 ∼ −3 1 −4 3 1 1 2 ∼ 0 1 0
2 3 1 3 1 0 0 0
1 1 −1 −1 −1 1
2 3
2 −1 0 1 0 −1 0 −1
2 3 ∼ −3 −3
This system has infinitely many solutions.
Lucie Doudová (UoD Brno)
Linear algebra
16 / 27
Systems of linear equations
Gaussian elimination
Gaussian elimination Example 1 1 2 0 1 0 x1
+
x2 x2
−1 1
2 3
+
2x3
– +
x4 x4
= =
2 3
x1
+
x2 x2
= =
2 3
– –
2x3 x4
+
x4
x3 = a, x4 = b; a and b are arbitrary real numbers. x1
+
x2 x2
= =
2 − 2a + b 3−b
x1 x2
= =
−1 − 2a + 2b 3−b
~ x = (−1 − 2a + 2b, 3 − b, a, b)
Lucie Doudová (UoD Brno)
Linear algebra
17 / 27
Systems of linear equations
Gaussian elimination
Jordan method
Example Equivalent method of computation. 1 1 2 −2 1 1 2 −1 2 ∼ 0 1 0 1 3 0 1 3 0 1 0 −1 −2 2 ∼ 3 0 −1 0 1
1 −1
∼
x3 = a, x4 = b; a and b are arbitrary real numbers. ~ x = (−1 − 2a + 2b, 3 − b, a, b) This method is called the Jordan method.
Lucie Doudová (UoD Brno)
Linear algebra
18 / 27
Systems of linear equations
Cramer’s rule
Cramer’s rule
Theorem (Cramer’s rule) Let determinant of matrix of system (1) be nonzero. Then system (1) has just one solution. Let D be determinant of matrix of system and Di determinants which we get from D by replacing of i-th column by column of absolute terms. Then xi =
Lucie Doudová (UoD Brno)
Di , D
i = 1, . . . , n
Linear algebra
19 / 27
Systems of linear equations
Cramer’s rule
Cramer’s rule
Example x x
– +
y y
= =
4 6 A= A1 = A2 =
x=
1 1 4 6 1 1
−1 , 1 −1 , 1 4 , 6
D1 = 5, D
D = |A1 | = 2 D1 = |A| = 10 D2 = |A2 | = 2
y=
D2 =1 D
~ x = (5, 1)
Lucie Doudová (UoD Brno)
Linear algebra
20 / 27
Systems of linear equations
Cramer’s rule
Cramer’s rule
Example x1 3x1 7x1
– – –
2x2 5x2 3x2
+ x3 = 0 – 2x3 = −3 + x3 = 16 1 −2 1 D = 3 −5 −2 = 49, 7 −3 1
1 D2 = 3 7
0 −3 16
x1 =
1 −2 1
= 98,
147 = 3, 49
x2 =
0 D1 = −3 16 1 D3 = 3 7 98 = 2, 49
−2 −5 −3 −2 −5 −3
x3 =
1 −2 1 0 −3 16
= 147
= 49
49 =1 49
~ x = (3, 2, 1)
Lucie Doudová (UoD Brno)
Linear algebra
21 / 27
Examples
Outline
1
Systems of linear equations Basic notation Gaussian elimination Cramer’s rule
2
Examples
3
List of tasks for students
Lucie Doudová (UoD Brno)
Linear algebra
22 / 27
Examples
Examples
Solve systems of linear equations 1
2x 5x x
+ + +
3y 3y 4y
+ + +
3z 2z 3z
= = =
1 −1 2
2
2x x x
− − −
y y 2y
− + +
3x2 2x2 3x2 4x2
+
x3
+ −
x3 x3
2z z 5z
= = =
1 2 4
x4 x4 3x4 2x4
= = = =
3
x1 2x1 2x1 3x1
Lucie Doudová (UoD Brno)
+ − + +
Linear algebra
− + − +
2 −3 −6 0
23 / 27
Examples
Examples
Solve systems of linear equations 1
− − −
x1 x1 x1
2x2 2x2 2x2
+ + +
x3 x3 x3
y y y
− + −
− + +
z 2z z
+ − +
x4 x4 5x4
= = =
z z 2z
= = =
0 0 0
− −
2u u
= = =
1 −1 5
2
x 3x x
+ + −
3
x x
Lucie Doudová (UoD Brno)
+
y y
Linear algebra
0 0 0
24 / 27
List of tasks for students
Outline
1
Systems of linear equations Basic notation Gaussian elimination Cramer’s rule
2
Examples
3
List of tasks for students
Lucie Doudová (UoD Brno)
Linear algebra
25 / 27
List of tasks for students
List of tasks for students
Example 1: 2x x 3x
− − −
4y 2y y
+ + +
3x1 −2x1 x1 4x1
+ − − −
2x2 x2 2x2 2x2
− + + −
x3 x3 2x3 2x3
+ + − +
x4 2x4 x4 3x4
= = = =
0 −2 16 5
x1 3x1
+
2x2
4x1 x1
+ +
x2 3x2 2x2
+ + − + +
3x3 x3 2x3 2x3 5x3
+ − + + +
x4 x4 3x4 3x4 4x4
− + + + +
2x5 4x5 x5 3x5 x5
= = = = =
3y 4z 5z
= = =
1 3 2
Example 2:
Example 3:
Lucie Doudová (UoD Brno)
Linear algebra
1 0 2 7 3
26 / 27
List of tasks for students
List of tasks for students
Example 4: x1 2x1 3x1 4x1
− + + +
x2 x2 3x3 5x2
+ − − −
x3 x3 3x3 5x3
+ − − −
x4 x4 3x4 5x4
− + + +
2x5 2x5 6x5 10x5
= = = =
0 1 2 3
Example 5: 2x x 3x
+ + +
y 2y y
− + −
2z 2z 4z
= = =
0 0 0
2x x x
− + −
y y 2y
− − +
z 2z 2z
= = =
0 0 0
Example 6:
Lucie Doudová (UoD Brno)
Linear algebra
27 / 27